egison-2.1.9: An Interpreter for the Programming Language Egison

Safe HaskellSafe-Infered

Language.Egison.Numerical

Synopsis

Documentation

foldlM :: Monad m => (a -> b -> m a) -> a -> [b] -> m aSource

foldl1M :: Monad m => (a -> a -> m a) -> [a] -> m aSource

unpackBool :: EgisonVal -> ThrowsError BoolSource

Convert a float to a string; radix is optional, defaults to base 10 floatToString :: [EgisonVal] -> IOThrowsError EgisonVal floatToString [(Float n)] = liftIO $ stringToCharCollection $ show n floatToString [x] = throwError $ TypeMismatch number x floatToString badArgList = throwError $ NumArgs 1 badArgList

Extract an bool from the given value, throwing a type error if the wrong type is passed.

unpackChar :: EgisonVal -> ThrowsError CharSource

Extract an char from the given value, throwing a type error if the wrong type is passed.

unpackString :: EgisonVal -> ThrowsError StringSource

Extract an char from the given value, throwing a type error if the wrong type is passed.

unpackNum :: EgisonVal -> ThrowsError IntegerSource

Extract an integer from the given value, throwing a type error if the wrong type is passed.

unpackFloat :: EgisonVal -> ThrowsError DoubleSource

Extract an double from the given value, throwing a type error if the wrong type is passed.