Next Previous Contents

5.1 Representing types

Haskell types are represented as terms using the TypeRep abstract type:

data TypeRep  -- abstract, instance of: Eq, Show
data TyCon    -- abstract, instance of: Eq, Show

mkTyCon  :: String  -> TyCon
mkAppTy  :: TyCon   -> [TypeRep] -> TypeRep
mkFunTy  :: TypeRep -> TypeRep   -> TypeRep
applyTy  :: TypeRep -> TypeRep   -> Maybe TypeRep


Next Previous Contents