contract-0.1.0.0
Copyright(c) Xie Ruifeng 2020
LicenseAGPL-3
Maintainerkrantz.xrf@outlook.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Language.Contract.AST

Description

 
Synopsis

Documentation

data Type Source #

Types: Nat, Bool, * -> *

Instances

Instances details
Eq Type Source # 
Instance details

Defined in Language.Contract.AST

Methods

(==) :: Type -> Type -> Bool #

(/=) :: Type -> Type -> Bool #

Ord Type Source # 
Instance details

Defined in Language.Contract.AST

Methods

compare :: Type -> Type -> Ordering #

(<) :: Type -> Type -> Bool #

(<=) :: Type -> Type -> Bool #

(>) :: Type -> Type -> Bool #

(>=) :: Type -> Type -> Bool #

max :: Type -> Type -> Type #

min :: Type -> Type -> Type #

Show Type Source # 
Instance details

Defined in Language.Contract.AST

Methods

showsPrec :: Int -> Type -> ShowS #

show :: Type -> String #

showList :: [Type] -> ShowS #

PrettyPrint Type Source # 
Instance details

Defined in Language.Contract.Pretty

data Term Source #

Terms of STLC.

Instances

Instances details
Eq Term Source # 
Instance details

Defined in Language.Contract.AST

Methods

(==) :: Term -> Term -> Bool #

(/=) :: Term -> Term -> Bool #

Ord Term Source # 
Instance details

Defined in Language.Contract.AST

Methods

compare :: Term -> Term -> Ordering #

(<) :: Term -> Term -> Bool #

(<=) :: Term -> Term -> Bool #

(>) :: Term -> Term -> Bool #

(>=) :: Term -> Term -> Bool #

max :: Term -> Term -> Term #

min :: Term -> Term -> Term #

Show Term Source # 
Instance details

Defined in Language.Contract.AST

Methods

showsPrec :: Int -> Term -> ShowS #

show :: Term -> String #

showList :: [Term] -> ShowS #

PrettyPrint Term Source # 
Instance details

Defined in Language.Contract.Pretty

pattern And :: Term -> Term -> Term Source #

x & y = if x then y else false

pattern Or :: Term -> Term -> Term Source #

x | y = if x then true else y

pattern Not :: Term -> Term Source #

not x = if x then false else true

isValue :: Term -> Bool Source #

Is this term a value?

pattern Value :: Term Source #

Bind to a value.

liftAtom :: Natural -> Natural -> Term -> Term Source #

The lift operation of de Bruijn notation.