Portability | portable |
---|---|
Stability | experimental |
Maintainer | github.com/justinethier |
Safe Haskell | Safe-Infered |
This module contains primitive functions written in Haskell. Most of these map directly to an equivalent Scheme function.
- car :: [LispVal] -> ThrowsError LispVal
- cdr :: [LispVal] -> ThrowsError LispVal
- cons :: [LispVal] -> ThrowsError LispVal
- equal :: [LispVal] -> ThrowsError LispVal
- makeVector, listToVector, vectorToList, vectorRef, vectorLength, buildVector :: [LispVal] -> ThrowsError LispVal
- hashTblMake, hashTblCopy, hashTblValues, hashTblKeys, hashTbl2List, hashTblSize, hashTblRef, hashTblExists, isHashTbl :: [LispVal] -> ThrowsError LispVal
- buildString :: [LispVal] -> ThrowsError LispVal
- makeString :: [LispVal] -> ThrowsError LispVal
- doMakeString :: forall a. (Num a, Eq a) => a -> Char -> String -> LispVal
- stringLength :: [LispVal] -> ThrowsError LispVal
- stringRef :: [LispVal] -> ThrowsError LispVal
- substring :: [LispVal] -> ThrowsError LispVal
- stringCIEquals :: [LispVal] -> ThrowsError LispVal
- stringCIBoolBinop :: ([Char] -> [Char] -> Bool) -> [LispVal] -> ThrowsError LispVal
- stringAppend :: [LispVal] -> ThrowsError LispVal
- stringToNumber :: [LispVal] -> ThrowsError LispVal
- stringToList :: [LispVal] -> ThrowsError LispVal
- listToString :: [LispVal] -> ThrowsError LispVal
- stringCopy :: [LispVal] -> ThrowsError LispVal
- symbol2String :: [LispVal] -> ThrowsError LispVal
- string2Symbol :: [LispVal] -> ThrowsError LispVal
- isChar :: [LispVal] -> ThrowsError LispVal
- isString :: [LispVal] -> ThrowsError LispVal
- isBoolean :: [LispVal] -> ThrowsError LispVal
- isDottedList :: [LispVal] -> ThrowsError LispVal
- isProcedure :: [LispVal] -> ThrowsError LispVal
- isVector, isList :: LispVal -> ThrowsError LispVal
- isNull :: [LispVal] -> ThrowsError LispVal
- isEOFObject :: [LispVal] -> ThrowsError LispVal
- isSymbol :: [LispVal] -> ThrowsError LispVal
- unpackEquals :: LispVal -> LispVal -> Unpacker -> ThrowsError Bool
- boolBinop :: (LispVal -> ThrowsError a) -> (a -> a -> Bool) -> [LispVal] -> ThrowsError LispVal
- unaryOp :: (LispVal -> ThrowsError LispVal) -> [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
- makePort :: IOMode -> [LispVal] -> IOThrowsError LispVal
- closePort :: [LispVal] -> IOThrowsError LispVal
- currentInputPort, currentOutputPort :: [LispVal] -> IOThrowsError LispVal
- isInputPort, isOutputPort :: [LispVal] -> IOThrowsError LispVal
- isCharReady :: [LispVal] -> IOThrowsError LispVal
- readProc :: [LispVal] -> IOThrowsError LispVal
- readCharProc :: (Handle -> IO Char) -> [LispVal] -> IOThrowsError LispVal
- writeProc :: (MonadIO m, MonadError LispError m) => (Handle -> LispVal -> IO a) -> [LispVal] -> m LispVal
- writeCharProc :: [LispVal] -> IOThrowsError LispVal
- readContents :: [LispVal] -> IOThrowsError LispVal
- load :: String -> IOThrowsError [LispVal]
- readAll :: [LispVal] -> IOThrowsError LispVal
- fileExists, deleteFile :: [LispVal] -> IOThrowsError LispVal
- gensym :: [LispVal] -> IOThrowsError LispVal
- _gensym :: String -> IOThrowsError LispVal
Pure functions
List
car :: [LispVal] -> ThrowsError LispValSource
cdr :: [LispVal] -> ThrowsError LispValSource
cons :: [LispVal] -> ThrowsError LispValSource
equal :: [LispVal] -> ThrowsError LispValSource
Vector
makeVector, listToVector, vectorToList, vectorRef, vectorLength, buildVector :: [LispVal] -> ThrowsError LispValSource
Hash Table
hashTblMake, hashTblCopy, hashTblValues, hashTblKeys, hashTbl2List, hashTblSize, hashTblRef, hashTblExists, isHashTbl :: [LispVal] -> ThrowsError LispValSource
String
buildString :: [LispVal] -> ThrowsError LispValSource
makeString :: [LispVal] -> ThrowsError LispValSource
stringLength :: [LispVal] -> ThrowsError LispValSource
stringRef :: [LispVal] -> ThrowsError LispValSource
substring :: [LispVal] -> ThrowsError LispValSource
stringCIBoolBinop :: ([Char] -> [Char] -> Bool) -> [LispVal] -> ThrowsError LispValSource
stringAppend :: [LispVal] -> ThrowsError LispValSource
stringToList :: [LispVal] -> ThrowsError LispValSource
listToString :: [LispVal] -> ThrowsError LispValSource
stringCopy :: [LispVal] -> ThrowsError LispValSource
symbol2String :: [LispVal] -> ThrowsError LispValSource
string2Symbol :: [LispVal] -> ThrowsError LispValSource
Predicate
isChar :: [LispVal] -> ThrowsError LispValSource
isString :: [LispVal] -> ThrowsError LispValSource
isBoolean :: [LispVal] -> ThrowsError LispValSource
isDottedList :: [LispVal] -> ThrowsError LispValSource
isProcedure :: [LispVal] -> ThrowsError LispValSource
isNull :: [LispVal] -> ThrowsError LispValSource
isEOFObject :: [LispVal] -> ThrowsError LispValSource
isSymbol :: [LispVal] -> ThrowsError LispValSource
Utility functions
unpackEquals :: LispVal -> LispVal -> Unpacker -> ThrowsError BoolSource
boolBinop :: (LispVal -> ThrowsError a) -> (a -> a -> Bool) -> [LispVal] -> ThrowsError LispValSource
unaryOp :: (LispVal -> ThrowsError LispVal) -> [LispVal] -> ThrowsError LispValSource
strBoolBinop :: (String -> String -> Bool) -> [LispVal] -> ThrowsError LispValSource
boolBoolBinop :: (Bool -> Bool -> Bool) -> [LispVal] -> ThrowsError LispValSource
Impure functions
All of these functions must be executed within the IO monad.
Input / Output
closePort :: [LispVal] -> IOThrowsError LispValSource
isCharReady :: [LispVal] -> IOThrowsError LispValSource
readProc :: [LispVal] -> IOThrowsError LispValSource
readCharProc :: (Handle -> IO Char) -> [LispVal] -> IOThrowsError LispValSource
writeProc :: (MonadIO m, MonadError LispError m) => (Handle -> LispVal -> IO a) -> [LispVal] -> m LispValSource
load :: String -> IOThrowsError [LispVal]Source
readAll :: [LispVal] -> IOThrowsError LispValSource
Symbol generation
gensym :: [LispVal] -> IOThrowsError LispValSource
Generate a (reasonably) unique symbol, given an optional prefix. This function is provided even though it is not part of R5RS.
_gensym :: String -> IOThrowsError LispValSource
Version of gensym that can be conveniently called from Haskell.