|
|
|
|
Synopsis |
|
|
|
Documentation |
|
data Module id |
Note that some syntactic constructs contain the syntactic construct
Type. However, the rename pass replaces this representation by the internal
type representation NewType and NT. So the syntactic constructs that
use Type are removed by the renaming pass or the type representation is only
half translated (TokenId -> Id). Are the latter still used later?
It probably would have been better if the whole syntax had been parameterised
with respect to the type representation; but such an additional parameter
would also be tiresome.
| Constructors | |
|
|
data Export id |
|
|
data ImpDecl id |
|
|
importedModule :: ImpDecl a -> a |
|
data ImpSpec id |
|
|
data Entity id |
Constructors | EntityVar Pos id | varid | EntityConClsAll Pos id | TyCon(..) | TyCls(..) | EntityConClsSome Pos id [(Pos, id)] | TyCon | TyCls | TyCon(conid,..,conid) | TyCls(varid,..,varid) |
| Instances | |
|
|
data InfixClass a |
Constructors | InfixDef | | InfixL | | InfixR | | Infix | | InfixPre a | |
| Instances | |
|
|
type FixDecl id = (InfixClass id, Int, [FixId id]) |
|
data FixId a |
Constructors | | Instances | |
|
|
stripFixId :: FixId a -> a |
|
data Decls id |
Constructors | | Instances | |
|
|
noDecls :: Decls id |
|
data DeclsDepend id |
Constructors | | Instances | |
|
|
data Decl id |
Constructors | DeclType (Simple id) (Type id) | for type synonym: type simple = type
| DeclTypeRenamed Pos Id | renamer replaces DeclType by this.
the type is in the symbol table, referenced by Id
| DeclData (Maybe Bool) [Context id] (Simple id) [Constr id] [(Pos, id)] | {Nothing = newtype, Just False = data, Just True = data unboxed}
context => simple = constrs
deriving (tycls)
| DeclDataPrim Pos id Int | data primitive conid size
| DeclConstrs Pos id [(Pos, id, id)] | Introduced by Rename to mark that we might need
to generate selector functions
position data/dataprim [(field,selector)]
| DeclClass Pos [Context id] id [id] [FunDep id] (Decls id) | class context => class where { signatures/valdefs; }
position, context, class, type variables, fundeps, method decls
| DeclInstance Pos [Context id] id [Instance id] (Decls id) | instance context => tycls inst where { valdefs }
| DeclDefault [Type id] | default (type,..)
| DeclPrimitive Pos id Int (Type id) | var primitive arity :: type
| DeclForeignImp Pos CallConv String id Int Safety (Type id) id | foreign import [callconv] [extfun] [unsafe|cast|noproto] var :: type
(final id part is wrapper-fn for IO)
callconv extfun intfun arity [u|c|n] ty wrapperId
| DeclForeignExp Pos CallConv String id (Type id) | foreign export callconv [extfun] var :: type
| DeclVarsType [(Pos, id)] [Context id] (Type id) | vars :: context => type
| DeclPat (Alt id) | | DeclFun Pos id [Fun id] | introduced with pattern elimination (id = select Int id)
Used for unimplemented things
| DeclIgnore String | | DeclError String | | DeclAnnot (Decl id) [Annot id] | | DeclFixity (FixDecl id) | infix[rl] int id,..,id
|
| Instances | |
|
|
data Safety |
for foreign imports/exports
| Constructors | | Instances | |
|
|
data CallConv |
supported foreign calling conventions
| Constructors | C | | Cast | | Noproto | | Haskell | | Other String | |
| Instances | |
|
|
data ClassCode ctx id |
introduced by RmClasses
| Constructors | CodeClass Pos id | class id
| CodeInstance Pos id id [id] [ctx] [id] | |
|
|
|
data FunDep id |
We parse MPTC with functional dependencies, only for hat-trans.
| Constructors | |
|
|
data Annot id |
|
|
data Fun id |
lhs pats, guarded exprs, local defs
| Constructors | | Instances | |
|
|
funArity :: Fun id -> Int |
|
data Alt id |
Constructors | | Instances | |
|
|
data Rhs id |
Constructors | Unguarded (Exp id) | | PatGuard [([Qual id], Exp id)] | the list has at least one element
|
| Instances | |
|
|
data Type id |
Constructors | | Instances | |
|
|
data Sig id |
|
|
data Simple id |
Constructors | | Instances | |
|
|
simpleToType :: Simple id -> Type id |
|
data Context id |
Constructors | | Instances | |
|
|
data Constr id |
Data constructor applied to type variables, possibly with field names.
As appearing on right hand side of data or newtype definition.
- ConstrCtx is always used if forall is specified
- the intention is to remove Constr completely when all of nhc13 have been updated
- this isn't nhc13, but rather Yhc
- we have comments on the fields here, but can't make them docstrings without record syntax
| Constructors | | Instances | |
|
|
getConstrId :: Constr id -> id |
|
getConstrArgumentList :: Constr id -> [(Maybe [(Pos, id)], Type id)] |
|
getConstrLabels :: Constr id -> [(Pos, id)] |
|
getConstrArgumentTypes :: Constr id -> [Type id] |
|
constrArity :: Constr id -> Int |
|
type Instance id |
|
|
data Stmt id |
The following is ismorphic to the type constructor Qual.
Possibly Stmt should be removed and its usage replaced everywhere by Qual.
| Constructors | StmtExp (Exp id) | exp | StmtBind (Exp id) (Exp id) | pat <- exp | StmtLet (Decls id) | let { decls ; } |
| Instances | |
|
|
type Pat id = Exp id |
|
data Exp id |
used both for expressions and patterns
| Constructors | ExpScc String (Exp id) | never used! should probably be removed
| ExpDict (Exp id) | hack to mark dictionary arguments
| ExpLambda Pos [Pat id] (Exp id) | pat ... pat -> exp | ExpLet Pos (Decls id) (Exp id) | let { decls ; } in exp | ExpDo Pos [Stmt id] | do { stmts ; } | ExpCase Pos (Exp id) [Alt id] | case exp of { alts; } | ExpFatbar (Exp id) (Exp id) | never used! should probably be removed
| ExpFail | never used! should probably be removed
| ExpIf Pos (Exp id) (Exp id) (Exp id) | if exp then exp else exp | ExpType Pos (Exp id) [Context id] (Type id) | exp :: context => type
next two are sugared lists; introduced for hpc-trans
| ExpListComp Pos (Exp id) [Qual id] | | ExpListEnum Pos (Exp id) (Maybe (Exp id)) (Maybe (Exp id)) | | ExpRecord (Exp id) [Field id] | | ExpApplication Pos [Exp id] | | ExpVar Pos id | | ExpCon Pos id | | ExpInfixList Pos [Exp id] | | ExpVarOp Pos id | | ExpConOp Pos id | | ExpLit Pos (Lit Boxed) | | ExpList Pos [Exp id] | | ExpBrack Pos (Exp id) | | Exp2 Pos id id | e.g. Ord.Eq or Eq.Int
| PatAs Pos id (Pat id) | | PatWildcard Pos | | PatIrrefutable Pos (Pat id) | | PatNplusK Pos id id (Exp id) (Exp id) (Exp id) | | ExpTypeRep Pos NT | typeRep introduced by the type check selection
|
| Instances | |
|
|
data Field id |
Constructors | FieldExp Pos id (Exp id) | | FieldPun Pos id | H98 removes (retained for error msgs)
|
| Instances | |
|
|
data Boxed |
Constructors | | Instances | |
|
|
data Lit boxed |
Constructors | LitInteger boxed Integer | | LitRational boxed Rational | | LitString boxed String | | LitInt boxed Int | | LitDouble boxed Double | | LitFloat boxed Float | | LitChar boxed Char | |
| Instances | Eq b => Eq (Lit b) | Show b => Show (Lit b) |
|
|
|
litEqual :: Eq b => Lit b -> Lit b -> Bool |
|
litshowsPrec :: Show b => Int -> Lit b -> ShowS |
|
data Qual id |
Constructors | | Instances | |
|
|
data Interface id |
|
|
type IImpDecl id = ImpDecl id |
|
type IDecls id = Decls id |
|
data Pos |
abstract type for storing the position of a syntactic construct in a file,
that is, line and column number of both start and end positions.
| Instances | |
|
|
data TokenId |
Instances | |
|
|
Produced by Haddock version 0.8 |