Safe Haskell | None |
---|---|
Language | Haskell2010 |
Jikka.RestrictedPython.Language.Value
Synopsis
- data Value
- newtype Local = Local {}
- toInt :: MonadError Error m => Value -> m Integer
- toBool :: MonadError Error m => Value -> m Bool
- toList :: MonadError Error m => Value -> m (Vector Value)
- toTuple :: MonadError Error m => Value -> m [Value]
- toIntList :: MonadError Error m => Value -> m (Vector Integer)
- toBoolList :: MonadError Error m => Value -> m (Vector Bool)
- toMatrix :: MonadError Error m => Value -> m (Matrix Integer)
- fromMatrix :: Matrix Integer -> Value
- compareValues :: Value -> Value -> Maybe Ordering
- compareValues' :: Value -> Value -> Ordering
- formatValue :: Value -> String
- readValueIO :: (MonadIO m, MonadError Error m) => IOFormat -> m ([Value], Map String Value)
- writeValueIO :: (MonadError Error m, MonadIO m) => IOFormat -> Map String Value -> Value -> m ()
Documentation
Value
is the values of our restricted Python-like language.
v::=…,−2,−1,0,1,2,…|false,true|nil|cons(v,v)|(v,v,…,v)|λμxx…x.e|builtin
Constructors
IntVal Integer | |
BoolVal Bool | |
ListVal (Vector Value) | |
TupleVal [Value] | |
ClosureVal Local [(VarName, Type)] [Statement] | |
BuiltinVal Builtin | |
AttributeVal Value Attribute |
toBoolList :: MonadError Error m => Value -> m (Vector Bool) Source #
formatValue :: Value -> String Source #