Copyright | (c) Galois Inc, 2015 |
---|---|
License | Apache-2 |
Maintainer | jhendrix@galois.com, lcasburn@galois.com |
Safe Haskell | Trustworthy |
Language | Haskell98 |
Operations for Lean expressions.
- data MacroDef
- data Expr
- data BinderKind
- varExpr :: Word32 -> Expr
- sortExpr :: Univ -> Expr
- constExpr :: Name -> List Univ -> Expr
- appExpr :: Expr -> Expr -> Expr
- lambdaExpr :: BinderKind -> Name -> Expr -> Expr -> Expr
- piExpr :: BinderKind -> Name -> Expr -> Expr -> Expr
- macroExpr :: MacroDef -> List Expr -> Expr
- localExpr :: Name -> Expr -> Expr
- localExtExpr :: BinderKind -> Name -> Name -> Expr -> Expr
- metavarExpr :: Name -> Expr -> Expr
- data ExprView
- exprView :: Expr -> ExprView
- exprLt :: Expr -> Expr -> Bool
- exprToString :: Expr -> String
Documentation
A Lean macro definition
A Lean expression
Eq Expr Source | |
Ord Expr Source | |
Show Expr Source | |
IsLeanValue Expr (Ptr Expr) Source | |
IsList (List Expr) Source | |
Eq (List Expr) Source | |
Show (List Expr) Source | |
IsListIso (List Expr) Source | |
IsLeanValue (List Expr) (Ptr (List Expr)) Source | |
type Item ListExpr = Expr Source | |
data List Expr = ListExpr (ForeignPtr (List Expr)) Source | A list of expressions (constructor not actually exported) |
data BinderKind Source
Kind of binding used for bound variables.
Constructors
constExpr :: Name -> List Univ -> Expr Source
Create a constant with a given name and universe parameters
lambdaExpr :: BinderKind -> Name -> Expr -> Expr -> Expr Source
Create a lambda abstraction for expressions
:: BinderKind | The binder kind for expression |
-> Name | The name of expression |
-> Name | The pretty print name |
-> Expr | The type of the expression |
-> Expr |
Create a local constant with additional parameters
metavarExpr :: Name -> Expr -> Expr Source
Create a metavariable with the given name nm
and type tp
.
View
Information about the expression.
Operations
exprLt :: Expr -> Expr -> Bool Source
Return true if first expression is structurally less than other.
exprToString :: Expr -> String Source
Return the string representation of an expression.