Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Language.Lambda
- data LambdaExpr name
- = Var name
- | App (LambdaExpr name) (LambdaExpr name)
- | Abs name (LambdaExpr name)
- data ParseError :: *
- class PrettyPrint a where
- evalExpr :: Eq n => [n] -> LambdaExpr n -> LambdaExpr n
- evalString :: String -> Either ParseError (LambdaExpr String)
- parseExpr :: String -> Either ParseError (LambdaExpr String)
- uniques :: [String]
Documentation
data LambdaExpr name Source #
Constructors
Var name | |
App (LambdaExpr name) (LambdaExpr name) | |
Abs name (LambdaExpr name) |
Instances
Eq name => Eq (LambdaExpr name) Source # | |
Show name => Show (LambdaExpr name) Source # | |
PrettyPrint a => PrettyPrint (LambdaExpr a) Source # | |
data ParseError :: * #
The abstract data type ParseError
represents parse errors. It
provides the source position (SourcePos
) of the error
and a list of error messages (Message
). A ParseError
can be returned by the function parse
. ParseError
is an
instance of the Show
and Eq
classes.
Instances
class PrettyPrint a where Source #
Minimal complete definition
Methods
prettyPrint :: a -> String Source #
Instances
PrettyPrint String Source # | |
PrettyPrint s => PrettyPrint (PDoc s) Source # | |
PrettyPrint n => PrettyPrint (Ty n) Source # | |
PrettyPrint a => PrettyPrint (LambdaExpr a) Source # | |
(PrettyPrint n, PrettyPrint t) => PrettyPrint (SystemFExpr n t) Source # | |
evalExpr :: Eq n => [n] -> LambdaExpr n -> LambdaExpr n Source #
evalString :: String -> Either ParseError (LambdaExpr String) Source #
parseExpr :: String -> Either ParseError (LambdaExpr String) Source #