LAM-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

LAM.Types.BV

Description

Terms with base values and operations, currently integers, plus and print.

Synopsis

Documentation

data BVCtrs #

Boxed Int, plus, print

Constructors

CstB Int 
OpPB BVTerm BVTerm 
OPrB BVTerm 

Instances

Instances details
Show BVCtrs # 
Instance details

Defined in LAM.Types.BV

pattern Cst :: XExt d ~ BVCtrs => Int -> ETerm d #

Pattern for boxed integers

pattern OpP :: XExt d ~ BVCtrs => BVTerm -> BVTerm -> ETerm d #

Pattern for t + t'

pattern OPr :: XExt d ~ BVCtrs => BVTerm -> ETerm d #

Pattern for print t

data BVDBCtrs #

DeBruijn version of BVCtrs. Need RetDBBV and CseDBBV for execution.

pattern CstDB :: XExt d ~ BVDBCtrs => Int -> ETerm d #

Boxed Int

pattern RetDB :: XExt d ~ BVDBCtrs => ETerm d #

Closure containing a boxed value

pattern OpPDB :: XExt d ~ BVDBCtrs => ETerm d #

Plus, adds the two values on the top of the stack

pattern OPrDB :: XExt d ~ BVDBCtrs => ETerm d #

Print, prints the value on the top of the stack

pattern CseDB :: XExt d ~ BVDBCtrs => BVDBTerm -> BVDBTerm -> ETerm d #

Case, for casing on a boxed value to access its contents

convBVCtrs :: BVCtrs -> BVDBCtrs #

Convert to DeBruijn

convBVCtrs' :: BVDBCtrs -> BVCtrs #

Convert to named (incomplete)

bvTest :: BVTerm #

Test term

data BV #

Phantom for named terms with base values.

Instances

Instances details
Show BVTerm # 
Instance details

Defined in LAM.Types.BV

type XExt BV # 
Instance details

Defined in LAM.Types.BV

type XExt BV = BVCtrs
type XLet BV # 
Instance details

Defined in LAM.Types.BV

type XLet BV = ()
type XVar BV # 
Instance details

Defined in LAM.Types.BV

type XVar BV = Name

data BVDB #

Phantom for DeBruijn terms with base values.

Instances

Instances details
Show BVDBTerm # 
Instance details

Defined in LAM.Types.BV

type XExt BVDB # 
Instance details

Defined in LAM.Types.BV

type XLet BVDB # 
Instance details

Defined in LAM.Types.BV

type XLet BVDB = ()
type XVar BVDB # 
Instance details

Defined in LAM.Types.BV

type XVar BVDB = Int

type BVTerm = ETerm BV #

Named terms with base values.

type BVDBTerm = ETerm BVDB #

DeBruijn terms with base values.

fromBVDBTerm :: BVDBTerm -> BVTerm #

DeBruijn to named