License | GPL-3 |
---|---|
Maintainer | jaredforthdev@gmail.com |
Stability | experimental |
Safe Haskell | Safe |
- primitiveBindings :: IO Env
- primitives :: [(String, [LispVal] -> ThrowsError LispVal)]
- ioPrimitives :: [(String, [LispVal] -> IOThrowsError LispVal)]
- numericBinop :: (Integer -> Integer -> Integer) -> [LispVal] -> ThrowsError LispVal
- boolBinop :: (LispVal -> ThrowsError a) -> (a -> a -> Bool) -> [LispVal] -> ThrowsError LispVal
- numBoolBinop :: (Integer -> Integer -> Bool) -> [LispVal] -> ThrowsError LispVal
- strBoolBinop :: (String -> String -> Bool) -> [LispVal] -> ThrowsError LispVal
- boolBoolBinop :: (Bool -> Bool -> Bool) -> [LispVal] -> ThrowsError LispVal
- unpackStr :: LispVal -> ThrowsError String
- unpackBool :: LispVal -> ThrowsError Bool
- unpackNum :: LispVal -> ThrowsError Integer
- car :: [LispVal] -> ThrowsError LispVal
- cdr :: [LispVal] -> ThrowsError LispVal
- cons :: [LispVal] -> ThrowsError LispVal
- eqv :: [LispVal] -> ThrowsError LispVal
- data Unpacker = Eq a => AnyUnpacker (LispVal -> ThrowsError a)
- unpackEquals :: LispVal -> LispVal -> Unpacker -> ThrowsError Bool
- equal :: [LispVal] -> ThrowsError LispVal
- applyProc :: [LispVal] -> IOThrowsError LispVal
- makePort :: IOMode -> [LispVal] -> IOThrowsError LispVal
- closePort :: [LispVal] -> IOThrowsError LispVal
- readProc :: [LispVal] -> IOThrowsError LispVal
- writeProc :: [LispVal] -> IOThrowsError LispVal
- readContents :: [LispVal] -> IOThrowsError LispVal
- readAll :: [LispVal] -> IOThrowsError LispVal
Documentation
primitiveBindings :: IO Env #
Bind to primitive values when the program starts
primitives :: [(String, [LispVal] -> ThrowsError LispVal)] #
Define the list of primitives that are supported
ioPrimitives :: [(String, [LispVal] -> IOThrowsError LispVal)] #
IO primitives
numericBinop :: (Integer -> Integer -> Integer) -> [LispVal] -> ThrowsError LispVal #
Take a primitive Haskell function and wrap it with code
to unpack args, apply a function, and wrap the result in
Number
constructor
boolBinop :: (LispVal -> ThrowsError a) -> (a -> a -> Bool) -> [LispVal] -> ThrowsError LispVal #
Take two arguments and return a boolean
numBoolBinop :: (Integer -> Integer -> Bool) -> [LispVal] -> ThrowsError LispVal #
Specialize boolBinop
for integers
strBoolBinop :: (String -> String -> Bool) -> [LispVal] -> ThrowsError LispVal #
Specialize boolBinop
for strings
boolBoolBinop :: (Bool -> Bool -> Bool) -> [LispVal] -> ThrowsError LispVal #
Specialize boolBinop
for booleans
unpackStr :: LispVal -> ThrowsError String #
Unpack strings from LispVal
unpackBool :: LispVal -> ThrowsError Bool #
Unpack booleans from LispVal
unpackNum :: LispVal -> ThrowsError Integer #
Unpack numbers from LispVal
car :: [LispVal] -> ThrowsError LispVal #
The car list primitive
cdr :: [LispVal] -> ThrowsError LispVal #
The cdr list primitive
cons :: [LispVal] -> ThrowsError LispVal #
The cons list primitive
eqv :: [LispVal] -> ThrowsError LispVal #
The eqv equivalence predicate
Data type that can hold a function for any `LispVal -> x`
where x
supports equality
Eq a => AnyUnpacker (LispVal -> ThrowsError a) |
unpackEquals :: LispVal -> LispVal -> Unpacker -> ThrowsError Bool #
equal :: [LispVal] -> ThrowsError LispVal #
Define `equal?` with helper functions
applyProc :: [LispVal] -> IOThrowsError LispVal #
Wrapper around apply
. This destructures the
argument list into the proper form
makePort :: IOMode -> [LispVal] -> IOThrowsError LispVal #
Wrap the openFile
Haskell function
closePort :: [LispVal] -> IOThrowsError LispVal #
Wrap the hClose
Haskell function
readProc :: [LispVal] -> IOThrowsError LispVal #
writeProc :: [LispVal] -> IOThrowsError LispVal #
Convert LispVal
to a string and write to specified port
readContents :: [LispVal] -> IOThrowsError LispVal #
Read a file into a string in memory.
This is a wrapper around the readFile
Haskell
function.