Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- data Bottom = Bottom Text
- displayBottom :: Bottom -> Text
- class (Monad m, MonadIO m, MonadError Bottom m) => MonadEval m where
- type Function = forall m. MonadEval m => Term -> m Term
- data Term
- (/@\) :: Term -> Term -> Term
- (/@@\) :: Term -> (Term, Term) -> Term
- (|->) :: TermPattern -> Term -> Term
- data TermPattern
- type TermPtr = IORef Term
- create'pointer :: MonadIO m => Term -> m Term
- dereference :: MonadIO m => Term -> m Term
- newTermPtr :: MonadIO m => Term -> m Term
- readTermPtr :: MonadIO m => TermPtr -> m Term
- writeTermPtr :: MonadIO m => TermPtr -> Term -> m ()
- bottom :: MonadError Bottom m => Bottom -> m a
Documentation
displayBottom :: Bottom -> Text Source #
Term'Data Text Dynamic | The name of the data type, and a value of that type. |
Term'Function Function | |
Term'Lambda TermPattern Term | The head and body of a lambda expression. |
Term'LetRec (Map Text Term) Term | |
Term'List (Seq Term) | |
Term'Dict (Seq (Term, Term)) | |
Term'Dict'ReducedKeys (Map Text Term) | |
Term'Var Text | |
Term'Apply Term Term | |
Term'Pointer TermPtr |
(/@\) :: Term -> Term -> Term infixl 9 Source #
Alias for Term'Apply
. The name is an allusion to the AST depictions in
The Implementation of Functional Programming Languages, where "f applied to
x" is drawn as:
@ ╱ ╲ f x
For a function of two parameters, see the corresponding /@@\
operator.
(/@@\) :: Term -> (Term, Term) -> Term infixl 9 Source #
Like /@\
, but for a function applied to two arguments. Depicted as an
abstract syntax tree, f /@@\ (x, y)
looks like this:
@ ╱ ╲ @ y ╱ ╲ f x
(|->) :: TermPattern -> Term -> Term infixl 9 Source #
Alias for Term'Lambda
.