shimmer-0.1.2: The Reflective Lambda Machine

Safe HaskellSafe
LanguageHaskell98

SMR.Prim.Name

Contents

Synopsis

Documentation

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.