Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hydra.Compute
Description
Abstractions for single- and bidirectional transformations
Synopsis
- data Adapter s1 s2 t1 t2 v1 v2 = Adapter {
- adapterIsLossy :: Bool
- adapterSource :: t1
- adapterTarget :: t2
- adapterCoder :: Coder s1 s2 v1 v2
- _Adapter :: Name
- _Adapter_isLossy :: Name
- _Adapter_source :: Name
- _Adapter_target :: Name
- _Adapter_coder :: Name
- data Bicoder s1 s2 t1 t2 v1 v2 = Bicoder {
- bicoderEncode :: t1 -> Adapter s1 s2 t1 t2 v1 v2
- bicoderDecode :: t2 -> Adapter s2 s1 t2 t1 v2 v1
- _Bicoder :: Name
- _Bicoder_encode :: Name
- _Bicoder_decode :: Name
- data Coder s1 s2 v1 v2 = Coder {
- coderEncode :: v1 -> Flow s1 v2
- coderDecode :: v2 -> Flow s2 v1
- _Coder :: Name
- _Coder_encode :: Name
- _Coder_decode :: Name
- newtype Flow s x = Flow {}
- _Flow :: Name
- data FlowState s x = FlowState {
- flowStateValue :: Maybe x
- flowStateState :: s
- flowStateTrace :: Trace
- _FlowState :: Name
- _FlowState_value :: Name
- _FlowState_state :: Name
- _FlowState_trace :: Name
- data Trace = Trace {
- traceStack :: [String]
- traceMessages :: [String]
- traceOther :: Map Name Term
- _Trace :: Name
- _Trace_stack :: Name
- _Trace_messages :: Name
- _Trace_other :: Name
Documentation
data Adapter s1 s2 t1 t2 v1 v2 Source #
A two-level bidirectional encoder which adapts types to types and terms to terms
Constructors
Adapter | |
Fields
|
data Bicoder s1 s2 t1 t2 v1 v2 Source #
A two-level encoder and decoder, operating both at a type level and an instance (data) level
Constructors
Bicoder | |
Fields
|
data Coder s1 s2 v1 v2 Source #
An encoder and decoder; a bidirectional flow between two types
Constructors
Coder | |
Fields
|
_Coder_encode :: Name Source #
_Coder_decode :: Name Source #
A variant of the State monad with built-in logging and error handling
The result of evaluating a Flow
Constructors
FlowState | |
Fields
|
Instances
(Read x, Read s) => Read (FlowState s x) Source # | |
(Show x, Show s) => Show (FlowState s x) Source # | |
(Eq x, Eq s) => Eq (FlowState s x) Source # | |
(Ord x, Ord s) => Ord (FlowState s x) Source # | |
Defined in Hydra.Compute Methods compare :: FlowState s x -> FlowState s x -> Ordering # (<) :: FlowState s x -> FlowState s x -> Bool # (<=) :: FlowState s x -> FlowState s x -> Bool # (>) :: FlowState s x -> FlowState s x -> Bool # (>=) :: FlowState s x -> FlowState s x -> Bool # |
_FlowState :: Name Source #
A container for logging and error information
Constructors
Trace | |
Fields
|
_Trace_stack :: Name Source #
_Trace_other :: Name Source #