%
+% (c) The University of Glasgow 2006
% (c) The GRASP/AQUA Project, Glasgow University, 1998
%
\section[TypeRep]{Type - friends' interface}
#include "HsVersions.h"
import {-# SOURCE #-} DataCon( DataCon, dataConName )
--- friends:
-import Var ( Var, Id, TyVar, tyVarKind )
-import VarSet ( TyVarSet )
-import Name ( Name, NamedThing(..), BuiltInSyntax(..), mkWiredInName )
-import OccName ( mkOccNameFS, tcName, parenSymOcc )
-import BasicTypes ( IPName, tupleParens )
-import TyCon ( TyCon, mkFunTyCon, tyConArity, tupleTyConBoxity, isTupleTyCon,
- isRecursiveTyCon, isNewTyCon, mkVoidPrimTyCon,
- mkSuperKindTyCon )
-import Class ( Class )
+-- friends:
+import Var
+import VarSet
+import Name
+import OccName
+import BasicTypes
+import TyCon
+import Class
-- others
-import PrelNames ( gHC_PRIM, funTyConKey, tySuperKindTyConKey,
- coSuperKindTyConKey, liftedTypeKindTyConKey,
- openTypeKindTyConKey, unliftedTypeKindTyConKey,
- ubxTupleKindTyConKey, argTypeKindTyConKey, listTyConKey,
- parrTyConKey, hasKey )
+import PrelNames
import Outputable
\end{code}
-- You might think that (->) should have type (?? -> ? -> *), and you'd be right
-- But if we do that we get kind errors when saying
-- instance Control.Arrow (->)
- -- because the expected kind is (*->*->*). The trouble is that the
+ -- becuase the expected kind is (*->*->*). The trouble is that the
-- expected/actual stuff in the unifier does not go contra-variant, whereas
-- the kind sub-typing does. Sigh. It really only matters if you use (->) in
-- a prefix way, thus: (->) Int# Int#. And this is unusual.
mkPrimTyConName occ key tycon = mkWiredInName gHC_PRIM (mkOccNameFS tcName occ)
key
- Nothing -- No parent object
(ATyCon tycon)
BuiltInSyntax
-- All of the super kinds and kinds are defined in Prim and use BuiltInSyntax,