eo-phi-normalizer-2.2.2: Command line normalizer of 𝜑-calculus expressions.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.EO.Phi.Dataize

Synopsis

Documentation

dataizeStep :: Context -> Object -> (Context, Either Object Bytes) Source #

Perform one step of dataization to the object (if possible).

dataizeRecursively :: Context -> Object -> Either Object Bytes Source #

Recursively perform normalization and dataization until we get bytes in the end.

dataizeStepChain :: Object -> DataizeChain (Context, Either Object Bytes) Source #

Perform one step of dataization to the object (if possible), reporting back individiual steps.

dataizeRecursivelyChain :: Bool -> Object -> DataizeChain (Either Object Bytes) Source #

Recursively perform normalization and dataization until we get bytes in the end, reporting intermediate steps

evaluateDataizationFunChain Source #

Arguments

:: (res -> Bytes)

How to convert the result back to bytes

-> (Bytes -> a)

How to interpret the bytes in terms of the given data type

-> (Bytes -> Object)

How to wrap the bytes in an object

-> (a -> a -> res)

A binary function on the data

-> Object 
-> EvaluationState 
-> DataizeChain (Object, EvaluationState) 

Given converters between Bytes and some data type, a binary function on this data type, an object, and the current state of evaluation, returns the new object and a possibly modified state along with intermediate steps.

evaluateBinaryDataizationFunChain Source #

Arguments

:: (res -> Bytes)

How to convert the result back to bytes

-> (Bytes -> a)

How to interpret the bytes in terms of the given data type

-> (Bytes -> Object)

How to wrap the bytes in an object

-> (Object -> Object)

Extract the 1st argument to be dataized

-> (Object -> Object)

Extract the 2nd argument to be dataized

-> (a -> a -> res)

A binary function on the argument

-> String

Name of the atom.

-> Object 
-> EvaluationState 
-> DataizeChain (Object, EvaluationState) 

evaluateUnaryDataizationFunChain Source #

Arguments

:: (res -> Bytes)

How to convert the result back to bytes

-> (Bytes -> a)

How to interpret the bytes in terms of the given data type

-> (Bytes -> Object)

How to wrap the bytes in an object

-> (Object -> Object)

Extract the argument to be dataized

-> (a -> res)

A unary function on the argument

-> String 
-> Object 
-> EvaluationState 
-> DataizeChain (Object, EvaluationState) 

Unary functions operate on the given object without any additional parameters

evaluateBuiltinFunChain :: String -> Object -> EvaluationState -> DataizeChain (Object, EvaluationState) Source #

Like evaluateDataizationFunChain but specifically for the built-in functions. This function is not safe. It returns undefined for unknown functions

evaluateBuiltinFun :: Context -> String -> Object -> EvaluationState -> (Object, EvaluationState) Source #

Like evaluateDataizationFun but specifically for the built-in functions. This function is not safe. It returns undefined for unknown functions