shimmer-0.1.3.3: The Reflective Lambda Machine

Safe HaskellSafe
LanguageHaskell98

SMR.Prim.Name

Contents

Synopsis

Documentation

data Prim Source #

Primitive values and operators.

Instances
Eq Prim Source # 
Instance details

Defined in SMR.Prim.Op.Base

Methods

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

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

Ord Prim Source # 
Instance details

Defined in SMR.Prim.Op.Base

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 # 
Instance details

Defined in SMR.Prim.Op.Base

Methods

showsPrec :: Int -> Prim -> ShowS #

show :: Prim -> String #

showList :: [Prim] -> ShowS #

Build Prim Source # 
Instance details

Defined in SMR.Source.Pretty

Methods

build :: Prim -> Builder Source #

Pretty

pprPrim :: Prim -> Text Source #

Pretty print a primitive operator.

readPrim :: Set Text -> Text -> Maybe Prim Source #

Parse a primitive name, without the leading #.

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.