diff options
-rw-r--r-- | compiler/iface/LoadIface.hs | 2 | ||||
-rw-r--r-- | compiler/prelude/PrelInfo.hs | 7 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_run/TypeOf.hs | 1 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_run/TypeOf.stdout | 1 |
4 files changed, 7 insertions, 4 deletions
diff --git a/compiler/iface/LoadIface.hs b/compiler/iface/LoadIface.hs index 64d100f1ed..ba58c9e456 100644 --- a/compiler/iface/LoadIface.hs +++ b/compiler/iface/LoadIface.hs @@ -169,7 +169,7 @@ for any module with an instance decl or RULE that we might want. * BUT, if the TyCon is a wired-in TyCon, we don't really need its interface; but we must make sure we read its interface in case it has instances or - rules. That is what LoadIface.loadWiredInHomeInterface does. It's called + rules. That is what LoadIface.loadWiredInHomeIface does. It's called from TcIface.{tcImportDecl, checkWiredInTyCon, ifCheckWiredInThing} * HOWEVER, only do this for TyCons. There are no wired-in Classes. There diff --git a/compiler/prelude/PrelInfo.hs b/compiler/prelude/PrelInfo.hs index 74005ed59c..52493b40f5 100644 --- a/compiler/prelude/PrelInfo.hs +++ b/compiler/prelude/PrelInfo.hs @@ -85,19 +85,20 @@ knownKeyNames , concatMap tycon_kk_names typeNatTyCons - , concatMap (rep_names . tupleTyCon Boxed) [2..mAX_TUPLE_SIZE] -- Yuk + , concatMap (tycon_kk_names . tupleTyCon Boxed) [2..mAX_TUPLE_SIZE] -- Yuk , cTupleTyConNames -- Constraint tuples are known-key but not wired-in -- They can't show up in source code, but can appear - -- in intreface files + -- in interface files , map idName wiredInIds , map (idName . primOpId) allThePrimOps , basicKnownKeyNames ] where - -- "kk" short for "known-key" + -- All of the names associated with a known-key thing. + -- This includes TyCons, DataCons and promoted TyCons. tycon_kk_names :: TyCon -> [Name] tycon_kk_names tc = tyConName tc : (rep_names tc ++ concatMap thing_kk_names (implicitTyConThings tc)) diff --git a/testsuite/tests/typecheck/should_run/TypeOf.hs b/testsuite/tests/typecheck/should_run/TypeOf.hs index efd26f9640..53e035923f 100644 --- a/testsuite/tests/typecheck/should_run/TypeOf.hs +++ b/testsuite/tests/typecheck/should_run/TypeOf.hs @@ -31,4 +31,5 @@ main = do print $ typeOf (Proxy :: Proxy *) print $ typeOf (Proxy :: Proxy ★) print $ typeOf (Proxy :: Proxy 'PtrRepLifted) + print $ typeOf (Proxy :: Proxy '(1, "hello")) print $ typeOf (Proxy :: Proxy (~~)) diff --git a/testsuite/tests/typecheck/should_run/TypeOf.stdout b/testsuite/tests/typecheck/should_run/TypeOf.stdout index 6f160f544c..3e3396fa7e 100644 --- a/testsuite/tests/typecheck/should_run/TypeOf.stdout +++ b/testsuite/tests/typecheck/should_run/TypeOf.stdout @@ -20,4 +20,5 @@ Proxy Constraint Constraint Proxy Constraint Constraint Proxy Constraint Constraint Proxy RuntimeRep 'PtrRepLifted +Proxy (Nat,Symbol) ('(,) Nat Symbol 1 "hello") Proxy (Constraint -> Constraint -> Constraint) ~~ |