diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-12-19 10:37:13 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-12-19 15:29:35 +0000 |
commit | ff1544d6db26c16d801f9cf9197db6eede57d576 (patch) | |
tree | b2013201937464875b28a3594ef9a8ada4f20d2c /compiler/prelude/PrelRules.hs | |
parent | 10ed31980f30bf2a0091b6f4cef11e0f2f633f22 (diff) | |
download | haskell-ff1544d6db26c16d801f9cf9197db6eede57d576.tar.gz |
Rmove a call to mkStatePrimTy
This is a tiny refactoring that removes one of the calls
to mkStatePrimTy, in service to Trac #14596
Diffstat (limited to 'compiler/prelude/PrelRules.hs')
-rw-r--r-- | compiler/prelude/PrelRules.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs index 8838c4aaff..db795890c7 100644 --- a/compiler/prelude/PrelRules.hs +++ b/compiler/prelude/PrelRules.hs @@ -40,7 +40,7 @@ import TysPrim import TyCon ( tyConDataCons_maybe, isEnumerationTyCon, isNewTyCon , unwrapNewTyCon_maybe, tyConDataCons ) import DataCon ( DataCon, dataConTagZ, dataConTyCon, dataConWorkId ) -import CoreUtils ( cheapEqExpr, exprIsHNF ) +import CoreUtils ( cheapEqExpr, exprIsHNF, exprType ) import CoreUnfold ( exprIsConApp_maybe ) import Type import OccName ( occNameFS ) @@ -932,9 +932,9 @@ dataToTagRule = a `mplus` b -- seq# :: forall a s . a -> State# s -> (# State# s, a #) seqRule :: RuleM CoreExpr seqRule = do - [Type ty_a, Type ty_s, a, s] <- getArgs + [Type ty_a, Type _ty_s, a, s] <- getArgs guard $ exprIsHNF a - return $ mkCoreUbxTup [mkStatePrimTy ty_s, ty_a] [s, a] + return $ mkCoreUbxTup [exprType s, ty_a] [s, a] -- spark# :: forall a s . a -> State# s -> (# State# s, a #) sparkRule :: RuleM CoreExpr |