Copyright | (c) Henry J. Wylde, 2015 |
---|---|
License | BSD3 |
Maintainer | public@hjwylde.com |
Safe Haskell | Safe |
Language | Haskell2010 |
Abstract syntax tree nodes.
- type Id = String
- newtype Program = Program [Decl]
- data Decl = FunctionDecl Id [(Type, Id)] [Stmt]
- name :: Decl -> Id
- types :: Decl -> [Type]
- parameters :: Decl -> [(Type, Id)]
- parameterNames :: Decl -> [Id]
- parameterTypes :: Decl -> [Type]
- returnType :: Decl -> Type
- stmts :: Decl -> [Stmt]
- data Stmt
- data Expr
- data BinaryOp
- data UnaryOp
- data Value
- data Type
Documentation
Nodes
A program is a list of declarations.
A declaration.
parameters :: Decl -> [(Type, Id)] Source
parameterNames :: Decl -> [Id] Source
parameterTypes :: Decl -> [Type] Source
returnType :: Decl -> Type Source
A statement.
A complex expression.
A binary operator.