alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
alphaTy, betaTy, gammaTy, deltaTy,
openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
alphaTy, betaTy, gammaTy, deltaTy,
openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
openAlphaTy, openBetaTy :: Type
openAlphaTy = mkTyVarTy openAlphaTyVar
openAlphaTy, openBetaTy :: Type
openAlphaTy = mkTyVarTy openAlphaTyVar
-openBetaTy = mkTyVarTy openBetaTyVar
+openBetaTy = mkTyVarTy openBetaTyVar
+
+argAlphaTyVar, argBetaTyVar :: TyVar
+(argAlphaTyVar : argBetaTyVar : _) = tyVarList argTypeKind
+argAlphaTy, argBetaTy :: Type
+argAlphaTy = mkTyVarTy argAlphaTyVar
+argBetaTy = mkTyVarTy argBetaTyVar
to have a Unique. Unlike tuples (which are also an infinite family)
there is no convenient way to index them, so we use the Unique from
their OccName instead. That should be unique,
to have a Unique. Unlike tuples (which are also an infinite family)
there is no convenient way to index them, so we use the Unique from
their OccName instead. That should be unique,
- both wrt each other, because their strings differ
- and wrt any other Name, because Names get uniques with
- both wrt each other, because their strings differ
- and wrt any other Name, because Names get uniques with
- | isLiftedTypeKind kind = anyTyCon
- | otherwise = mk_any_tycon kind
-
-mk_any_tycon :: Kind -> TyCon
-mk_any_tycon kind -- Kind other than *
- = tycon
+ | liftedTypeKind `isSubKind` kind = anyTyCon
+ | otherwise = tycon
where
-- Derive the name from the kind, thus:
-- Any(*->*), Any(*->*->*)
where
-- Derive the name from the kind, thus:
-- Any(*->*), Any(*->*->*)