hermit-0.1.2.0: Haskell Equational Reasoning Model-to-Implementation Tunnel

Safe HaskellSafe-Inferred

Language.HERMIT.Expr

Contents

Synopsis

HERMIT Expressions

This is the untyped command and control language for HERMIT.

data ExprH Source

A simple expression language AST, for things parsed from String or JSON structures.

Constructors

SrcName String

Variable names (refers to source code).

CmdName String

Commands (to be looked up in Dictionary).

AppH ExprH ExprH

Application.

Instances

data StmtH expr Source

Nested lists to represent scoping structure.

Constructors

ExprH expr 
ScopeH [StmtH expr] 

Instances

Show expr => Show (StmtH expr) 

parseExprH :: String -> Either String ExprHSource

Parse an expression.

parseStmtsH :: String -> Either String [StmtH ExprH]Source

Parse a list of statements, seperated by semicolons.

numStmtsH :: [StmtH expr] -> IntSource

Count the total number of statements.