-- * Heterogeneous Metaprogramming
mkHetMetCodeTypeTy,
hetMetCodeTypeTyConName,
- hetMetCodeTypeTyCon, isHetMetCodeTypeTyCon,
+ hetMetCodeTypeTyCon,
+ isHetMetCodeTypeTyCon,
hetMetCodeTypeTyCon_RDR,
+ mkHetMetKappaTy,
+ hetMetKappaTyConName,
+ hetMetKappaTyCon,
+ hetMetKappaTyCon_RDR,
+ isHetMetKappaTyCon,
+
-- * Parallel arrays
mkPArrTy,
parrTyCon, parrFakeCon, isPArrTyCon, isPArrFakeCon,
, listTyCon
, parrTyCon
, hetMetCodeTypeTyCon
+ , hetMetKappaTyCon
]
\end{code}
hetMetCodeTypeDataConName =
mkWiredInDataConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "<[]>") hetMetCodeTypeDataConKey hetMetCodeTypeDataCon
+hetMetKappaTyConName :: Name
+hetMetKappaTyConName = mkWiredInTyConName BuiltInSyntax gHC_HETMET_CODETYPES (fsLit "~~>") hetMetKappaTyConKey hetMetKappaTyCon
+
boolTyCon_RDR, false_RDR, true_RDR, intTyCon_RDR, charTyCon_RDR,
- intDataCon_RDR, listTyCon_RDR, consDataCon_RDR, parrTyCon_RDR, hetMetCodeTypeTyCon_RDR :: RdrName
+ intDataCon_RDR, listTyCon_RDR, consDataCon_RDR, parrTyCon_RDR, hetMetCodeTypeTyCon_RDR,
+ hetMetKappaTyCon_RDR :: RdrName
boolTyCon_RDR = nameRdrName boolTyConName
false_RDR = nameRdrName falseDataConName
true_RDR = nameRdrName trueDataConName
consDataCon_RDR = nameRdrName consDataConName
parrTyCon_RDR = nameRdrName parrTyConName
hetMetCodeTypeTyCon_RDR = nameRdrName hetMetCodeTypeTyConName
+hetMetKappaTyCon_RDR = nameRdrName hetMetKappaTyConName
\end{code}
mkHetMetCodeTypeTy :: TyVar -> Type -> Type
mkHetMetCodeTypeTy ecn ty = mkTyConApp hetMetCodeTypeTyCon [(mkTyVarTy ecn), ty]
+mkHetMetKappaTy :: Type -> Type -> Type
+mkHetMetKappaTy a b = mkTyConApp hetMetKappaTyCon [a, b]
+
ecTyVar = head ecTyVars
-- | Represents the type constructor of box types
hetMetCodeTypeTyCon :: TyCon
hetMetCodeTypeTyCon = pcNonRecDataTyCon hetMetCodeTypeTyConName [ecTyVar, betaTyVar] [hetMetCodeTypeDataCon]
+hetMetKappaTyCon :: TyCon
+hetMetKappaTyCon = pcNonRecDataTyCon hetMetKappaTyConName [alphaTyVar, betaTyVar] []
+
-- | Check whether a type constructor is the constructor for box types
isHetMetCodeTypeTyCon :: TyCon -> Bool
isHetMetCodeTypeTyCon tc = tyConName tc == hetMetCodeTypeTyConName
+isHetMetKappaTyCon :: TyCon -> Bool
+isHetMetKappaTyCon tc = tyConName tc == hetMetKappaTyConName
+
hetMetCodeTypeDataCon :: DataCon
hetMetCodeTypeDataCon = pcDataCon
hetMetCodeTypeDataConName