shimmer-0.1.1: The Reflective Lambda Machine

Safe HaskellSafe
LanguageHaskell98

SMR.Prim.Op.Base

Contents

Synopsis

Documentation

data Prim Source #

Primitive values and operators.

Instances

Eq Prim Source # 

Methods

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

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

Ord Prim Source # 

Methods

compare :: Prim -> Prim -> Ordering #

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

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

(>) :: Prim -> Prim -> Bool #

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

max :: Prim -> Prim -> Prim #

min :: Prim -> Prim -> Prim #

Show Prim Source # 

Methods

showsPrec :: Int -> Prim -> ShowS #

show :: Prim -> String #

showList :: [Prim] -> ShowS #

Build Prim Source # 

Methods

build :: Prim -> Builder Source #

data PrimEval s p w Source #

Primitive evaluator.

Constructors

PrimEval 

Fields

Exp

takeArgExp :: [Exp s Prim] -> Maybe (Exp s Prim, [Exp s Prim]) Source #

Take the first expression argument from a list of primitives.

Bool

makeXBool :: Bool -> Exp s Prim Source #

Make a literal Bool expression.

takeXBool :: Exp s Prim -> Maybe Bool Source #

Take a literal Bool from an expression.

takeArgBool :: [Exp s Prim] -> Maybe (Bool, [Exp s Prim]) Source #

Split a literal Bool from an argument list.

Nat

makeXNat :: Integer -> Exp s Prim Source #

Make a literal Nat expression.

takeXNat :: Exp s Prim -> Maybe Integer Source #

Take a literal Nat from an expression.

takeArgNat :: [Exp s Prim] -> Maybe (Integer, [Exp s Prim]) Source #

Split a literal Nat from an argument list.

List

makeXList :: [Exp s Prim] -> Exp s Prim Source #

Make a list of expressions.