summaryrefslogtreecommitdiff
path: root/compiler/GHC/Tc/TyCl/Build.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-07-12 22:08:10 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-22 20:21:48 -0400
commitcfa89149b55837f822ba619b797781813fdcdabc (patch)
tree932b9af9f50b88b137b6faf42050e3e2445d252c /compiler/GHC/Tc/TyCl/Build.hs
parentff1b7710c9975a3cc1025cb5b9d29197a5f1a98a (diff)
downloadhaskell-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/Tc/TyCl/Build.hs')
-rw-r--r--compiler/GHC/Tc/TyCl/Build.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/GHC/Tc/TyCl/Build.hs b/compiler/GHC/Tc/TyCl/Build.hs
index 5361ff0160..da17266c45 100644
--- a/compiler/GHC/Tc/TyCl/Build.hs
+++ b/compiler/GHC/Tc/TyCl/Build.hs
@@ -21,8 +21,7 @@ import GHC.Prelude
import GHC.Iface.Env
import GHC.Core.FamInstEnv( FamInstEnvs, mkNewTypeCoAxiom )
-import GHC.Builtin.Types( isCTupleTyConName )
-import GHC.Builtin.Types.Prim ( voidPrimTy )
+import GHC.Builtin.Types( isCTupleTyConName, unboxedUnitTy )
import GHC.Core.DataCon
import GHC.Core.PatSyn
import GHC.Types.Var
@@ -209,11 +208,11 @@ buildPatSyn src_name declared_infix matcher@(matcher_id,_) builder
subst = zipTvSubst (univ_tvs1 ++ ex_tvs1)
(mkTyVarTys (binderVars (univ_tvs ++ ex_tvs)))
- -- For a nullary pattern synonym we add a single void argument to the
+ -- For a nullary pattern synonym we add a single (# #) argument to the
-- matcher to preserve laziness in the case of unlifted types.
-- See #12746
compareArgTys :: [Type] -> [Type] -> Bool
- compareArgTys [] [x] = x `eqType` voidPrimTy
+ compareArgTys [] [x] = x `eqType` unboxedUnitTy
compareArgTys arg_tys matcher_arg_tys = arg_tys `eqTypes` matcher_arg_tys