ContentsIndex
Types
Synopsis
data TySpec = TS TyRep [TyDecl]
data TyRep
= TRBase String
| TRVar String
| TRTuple [TyRep]
| TRData String [TyRep]
data TyDecl = TD String [String] [ConRep]
data ConRep = CR String (Maybe [String]) [TyRep]
class Types a where
ty :: a -> TySpec
listDef :: TyDecl
maybeDef :: TyDecl
eitherDef :: TyDecl
merge :: [TyDecl] -> [TyDecl] -> [TyDecl]
merges :: [[TyDecl]] -> [TyDecl]
class TID a where
tid :: a -> ShowS
Documentation
data TySpec
A type specification consists of a type representation TyRep and a list of type declarations.
Constructors
TS TyRep [TyDecl]
Instances
TID TySpec
Read TySpec
Show TySpec
Eq TySpec
data TyRep
A type representation is built from base types, type variables, tuples, and references to data-defined types.
Constructors
TRBase String
TRVar String
TRTuple [TyRep]
TRData String [TyRep]
Instances
TID TyRep
Read TyRep
Show TyRep
Eq TyRep
data TyDecl
A data declaration consists of the name of the data type, a list of type variables, and a list of constructor representations.
Constructors
TD String [String] [ConRep]
Instances
TID TyDecl
Read TyDecl
Show TyDecl
Eq TyDecl
data ConRep
A constructor is represented by its name, a list of field names (if defined using record notation), and the list of its argument types
Constructors
CR String (Maybe [String]) [TyRep]
Instances
TID ConRep
Read ConRep
Show ConRep
Eq ConRep
class Types a where
Methods
ty :: a -> TySpec
Instances
Types ()
Types Bool
Types Int
Types Integer
Types Double
Types Float
Types Char
(Types a, Types b) => Types (a, b)
(Types a, Types b, Types c) => Types (a, b, c)
(Types a, Types b, Types c, Types d) => Types (a, b, c, d)
(Types a, Types b, Types c, Types d, Types e) => Types (a, b, c, d, e)
Types a => Types [a]
Types a => Types (Maybe a)
(Types a, Types b) => Types (Either a b)
listDef :: TyDecl
maybeDef :: TyDecl
eitherDef :: TyDecl
merge :: [TyDecl] -> [TyDecl] -> [TyDecl]
merges :: [[TyDecl]] -> [TyDecl]
class TID a where
Methods
tid :: a -> ShowS
Instances
TID TySpec
TID a => TID [a]
TID TyRep
TID TyDecl
TID ConRep
Produced by Haddock version 0.6