diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2020-07-12 22:08:10 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-22 20:21:48 -0400 |
commit | cfa89149b55837f822ba619b797781813fdcdabc (patch) | |
tree | 932b9af9f50b88b137b6faf42050e3e2445d252c /compiler/GHC/Core | |
parent | ff1b7710c9975a3cc1025cb5b9d29197a5f1a98a (diff) | |
download | haskell-cfa89149b55837f822ba619b797781813fdcdabc.tar.gz |
Define type Void# = (# #) (#18441)
There's one backwards compatibility issue: GHC.Prim no longer exports
Void#, we now manually re-export it from GHC.Exts.
Diffstat (limited to 'compiler/GHC/Core')
-rw-r--r-- | compiler/GHC/Core/Opt/Specialise.hs | 4 | ||||
-rw-r--r-- | compiler/GHC/Core/Opt/WorkWrap/Utils.hs | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs index 173dcdf2c7..935ba04bb5 100644 --- a/compiler/GHC/Core/Opt/Specialise.hs +++ b/compiler/GHC/Core/Opt/Specialise.hs @@ -39,7 +39,7 @@ import GHC.Core.Opt.Arity ( etaExpandToJoinPointRule ) import GHC.Types.Unique.Supply import GHC.Types.Name import GHC.Types.Id.Make ( voidArgId, voidPrimId ) -import GHC.Builtin.Types.Prim ( voidPrimTy ) +import GHC.Builtin.Types ( unboxedUnitTy ) import GHC.Data.Maybe ( mapMaybe, maybeToList, isJust ) import GHC.Utils.Monad ( foldlM ) import GHC.Types.Basic @@ -1427,7 +1427,7 @@ specCalls mb_mod env existing_rules calls_for_me fn rhs (spec_bndrs, spec_rhs, spec_fn_ty) | add_void_arg = ( voidPrimId : spec_bndrs1 , Lam voidArgId spec_rhs1 - , mkVisFunTyMany voidPrimTy spec_fn_ty1) + , mkVisFunTyMany unboxedUnitTy spec_fn_ty1) | otherwise = (spec_bndrs1, spec_rhs1, spec_fn_ty1) join_arity_decr = length rule_lhs_args - length spec_bndrs diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs index 1885de98f2..2ccc743047 100644 --- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs +++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs @@ -28,8 +28,7 @@ import GHC.Types.Cpr import GHC.Core.Make ( mkAbsentErrorApp, mkCoreUbxTup , mkCoreApp, mkCoreLet ) import GHC.Types.Id.Make ( voidArgId, voidPrimId ) -import GHC.Builtin.Types ( tupleDataCon ) -import GHC.Builtin.Types.Prim ( voidPrimTy ) +import GHC.Builtin.Types ( tupleDataCon, unboxedUnitTy ) import GHC.Types.Literal ( absentLiteralOf, rubbishLit ) import GHC.Types.Var.Env ( mkInScopeSet ) import GHC.Types.Var.Set ( VarSet ) @@ -1256,7 +1255,7 @@ mk_absent_let dflags fam_envs arg | Just tc <- tyConAppTyCon_maybe nty , Just lit <- absentLiteralOf tc = Just (Let (NonRec arg (Lit lit `mkCast` mkSymCo co))) - | nty `eqType` voidPrimTy + | nty `eqType` unboxedUnitTy = Just (Let (NonRec arg (Var voidPrimId `mkCast` mkSymCo co))) | otherwise = WARN( True, text "No absent value for" <+> ppr arg_ty ) |