YhcSource codeContentsIndex
NT
Description
Warning: there are a bunch of comments on the positional fields of constructors in this module (perhaps the constructors should be record constructors so that they can have docstrings on their fields?)
Synopsis
data NT
= NTany Id
| NTvar Id Kind
| NTexist Id Kind
| NTstrict NT
| NTapp NT NT
| NTcons Id Kind [NT]
| NTcontext Id Id
data NewType
= NoType
| NewType [Id] [Id] [(Id, Id)] [NT]
data Kind
= Star
| (:->:) Kind Kind
mkNTvar :: Id -> NT
mkNTexist :: Id -> NT
mkNTcons :: Id -> [NT] -> NT
anyNT :: [Id] -> NT -> NT
consNT :: NT -> [Id]
freeNT :: NT -> [Id]
freshNT :: (Id -> Id) -> NT -> NT
polyNT :: [Id] -> NT -> NT
strTVar :: Id -> String
sndNTvar :: (a, Id) -> (a, NT)
strNT :: (Id -> String) -> (Id -> String) -> NT -> String
strictNT :: NT -> Bool
transCtxs :: (a -> b) -> (c -> d) -> [(c, a)] -> [(d, b)]
useNT :: NT -> [Id]
contextNT :: NT -> Bool
ntContext2Pair :: NT -> (Id, Id)
stripNT :: NT -> Id
anyVarNT :: NT -> Maybe Id
Documentation
data NT
Constructors
NTany Idcan be instantiated with unboxed (needed during type checking)
NTvar Id Kind
NTexist Id Kind
NTstrict NT
NTapp NT NT
NTcons Id Kind [NT]combines constructor + application
NTcontext Id Idcontext (class, type variable) purpose here completely unclear (used?)
show/hide Instances
Eq NT
Ord NT
Show NT
Substitute NT
data NewType
Perhaps NewType is a type schema? It quantifies variables over an arrow of NTs.
Constructors
NoType
NewType [Id] [Id] [(Id, Id)] [NT]
show/hide Instances
data Kind
Constructors
Star
(:->:) Kind Kind
show/hide Instances
Eq Kind
Ord Kind
mkNTvar :: Id -> NT
mkNTexist :: Id -> NT
mkNTcons :: Id -> [NT] -> NT
anyNT :: [Id] -> NT -> NT
consNT :: NT -> [Id]
Determine the type constructors that occur in the given type
freeNT :: NT -> [Id]
Determine type variables that occur in given type.
freshNT :: (Id -> Id) -> NT -> NT
Exchange type variables according to given mapping in given type. (not existentially quantified vars.
polyNT :: [Id] -> NT -> NT
strTVar :: Id -> String
sndNTvar :: (a, Id) -> (a, NT)
strNT :: (Id -> String) -> (Id -> String) -> NT -> String
Show function for NT, parameterised by show functions for constructors/class names and for type variables.
strictNT :: NT -> Bool
transCtxs :: (a -> b) -> (c -> d) -> [(c, a)] -> [(d, b)]
FIXME: Isn't this type a tad more general than appropriate for the name?
useNT :: NT -> [Id]
Same as consNT except that constructor from NTcontext goes also into result. used only in module Export
contextNT :: NT -> Bool
ntContext2Pair :: NT -> (Id, Id)
stripNT :: NT -> Id
anyVarNT :: NT -> Maybe Id
Produced by Haddock version 0.8