| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Hydra.Compute
Description
Abstractions for evaluation and 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 :: FieldName
- _Adapter_source :: FieldName
- _Adapter_target :: FieldName
- _Adapter_coder :: FieldName
- data AdapterContext m = AdapterContext {}
- _AdapterContext :: Name
- _AdapterContext_evaluation :: FieldName
- _AdapterContext_source :: FieldName
- _AdapterContext_target :: FieldName
- data AnnotationClass m = AnnotationClass {
- annotationClassDefault :: m
- annotationClassEqual :: m -> m -> Bool
- annotationClassCompare :: m -> m -> Comparison
- annotationClassShow :: m -> String
- annotationClassRead :: String -> Maybe m
- annotationClassTermMeta :: Term m -> m
- annotationClassTypeMeta :: Type m -> m
- annotationClassTermDescription :: Term m -> Flow (Context m) (Maybe String)
- annotationClassTypeDescription :: Type m -> Flow (Context m) (Maybe String)
- annotationClassTermType :: Term m -> Flow (Context m) (Maybe (Type m))
- annotationClassSetTermDescription :: Context m -> Maybe String -> Term m -> Term m
- annotationClassSetTermType :: Context m -> Maybe (Type m) -> Term m -> Term m
- annotationClassTypeOf :: m -> Flow (Context m) (Maybe (Type m))
- annotationClassSetTypeOf :: Maybe (Type m) -> m -> m
- _AnnotationClass :: Name
- _AnnotationClass_default :: FieldName
- _AnnotationClass_equal :: FieldName
- _AnnotationClass_compare :: FieldName
- _AnnotationClass_show :: FieldName
- _AnnotationClass_read :: FieldName
- _AnnotationClass_termMeta :: FieldName
- _AnnotationClass_typeMeta :: FieldName
- _AnnotationClass_termDescription :: FieldName
- _AnnotationClass_typeDescription :: FieldName
- _AnnotationClass_termType :: FieldName
- _AnnotationClass_setTermDescription :: FieldName
- _AnnotationClass_setTermType :: FieldName
- _AnnotationClass_typeOf :: FieldName
- _AnnotationClass_setTypeOf :: FieldName
- data Coder s1 s2 v1 v2 = Coder {
- coderEncode :: v1 -> Flow s1 v2
- coderDecode :: v2 -> Flow s2 v1
- _Coder :: Name
- _Coder_encode :: FieldName
- _Coder_decode :: FieldName
- data CoderDirection
- _CoderDirection :: Name
- _CoderDirection_encode :: FieldName
- _CoderDirection_decode :: FieldName
- data Context m = Context {}
- _Context :: Name
- _Context_graph :: FieldName
- _Context_functions :: FieldName
- _Context_strategy :: FieldName
- _Context_annotations :: FieldName
- data EvaluationStrategy = EvaluationStrategy {}
- _EvaluationStrategy :: Name
- _EvaluationStrategy_opaqueTermVariants :: FieldName
- newtype Flow s a = Flow {}
- _Flow :: Name
- data FlowState s a = FlowState {
- flowStateValue :: Maybe a
- flowStateState :: s
- flowStateTrace :: Trace
- _FlowState :: Name
- _FlowState_value :: FieldName
- _FlowState_state :: FieldName
- _FlowState_trace :: FieldName
- data Language m = Language {}
- _Language :: Name
- _Language_name :: FieldName
- _Language_constraints :: FieldName
- data LanguageConstraints m = LanguageConstraints {
- languageConstraintsEliminationVariants :: Set EliminationVariant
- languageConstraintsLiteralVariants :: Set LiteralVariant
- languageConstraintsFloatTypes :: Set FloatType
- languageConstraintsFunctionVariants :: Set FunctionVariant
- languageConstraintsIntegerTypes :: Set IntegerType
- languageConstraintsTermVariants :: Set TermVariant
- languageConstraintsTypeVariants :: Set TypeVariant
- languageConstraintsTypes :: Type m -> Bool
- _LanguageConstraints :: Name
- _LanguageConstraints_eliminationVariants :: FieldName
- _LanguageConstraints_literalVariants :: FieldName
- _LanguageConstraints_floatTypes :: FieldName
- _LanguageConstraints_functionVariants :: FieldName
- _LanguageConstraints_integerTypes :: FieldName
- _LanguageConstraints_termVariants :: FieldName
- _LanguageConstraints_typeVariants :: FieldName
- _LanguageConstraints_types :: FieldName
- newtype LanguageName = LanguageName {}
- _LanguageName :: Name
- data Meta = Meta {
- metaAnnotations :: Map String (Term Meta)
- _Meta :: Name
- _Meta_annotations :: FieldName
- data PrimitiveFunction m = PrimitiveFunction {
- primitiveFunctionName :: Name
- primitiveFunctionType :: FunctionType m
- primitiveFunctionImplementation :: [Term m] -> Flow (Context m) (Term m)
- _PrimitiveFunction :: Name
- _PrimitiveFunction_name :: FieldName
- _PrimitiveFunction_type :: FieldName
- _PrimitiveFunction_implementation :: FieldName
- data TermCoder m a = TermCoder {
- termCoderType :: Type m
- termCoderCoder :: Coder (Context m) (Context m) (Term m) a
- _TermCoder :: Name
- _TermCoder_type :: FieldName
- _TermCoder_coder :: FieldName
- data Trace = Trace {
- traceStack :: [String]
- traceMessages :: [String]
- traceOther :: Map String (Term Meta)
- _Trace :: Name
- _Trace_stack :: FieldName
- _Trace_messages :: FieldName
- _Trace_other :: FieldName
- data TraversalOrder
- _TraversalOrder :: Name
- _TraversalOrder_pre :: FieldName
- _TraversalOrder_post :: FieldName
Documentation
data Adapter s1 s2 t1 t2 v1 v2 Source #
Constructors
| Adapter | |
Fields
| |
data AdapterContext m Source #
Constructors
| AdapterContext | |
Fields | |
data AnnotationClass m Source #
A typeclass-like construct providing common functions for working with annotations
Constructors
| AnnotationClass | |
Fields
| |
data Coder s1 s2 v1 v2 Source #
An encoder and decoder; a bidirectional flow between two types
Constructors
| Coder | |
Fields
| |
data CoderDirection Source #
Indicates either the out or the 'in' direction of a coder
Constructors
| CoderDirectionEncode | |
| CoderDirectionDecode |
Instances
| Read CoderDirection Source # | |
Defined in Hydra.Compute Methods readsPrec :: Int -> ReadS CoderDirection # readList :: ReadS [CoderDirection] # | |
| Show CoderDirection Source # | |
Defined in Hydra.Compute Methods showsPrec :: Int -> CoderDirection -> ShowS # show :: CoderDirection -> String # showList :: [CoderDirection] -> ShowS # | |
| Eq CoderDirection Source # | |
Defined in Hydra.Compute Methods (==) :: CoderDirection -> CoderDirection -> Bool # (/=) :: CoderDirection -> CoderDirection -> Bool # | |
| Ord CoderDirection Source # | |
Defined in Hydra.Compute Methods compare :: CoderDirection -> CoderDirection -> Ordering # (<) :: CoderDirection -> CoderDirection -> Bool # (<=) :: CoderDirection -> CoderDirection -> Bool # (>) :: CoderDirection -> CoderDirection -> Bool # (>=) :: CoderDirection -> CoderDirection -> Bool # max :: CoderDirection -> CoderDirection -> CoderDirection # min :: CoderDirection -> CoderDirection -> CoderDirection # | |
An environment containing a graph together with primitive functions and other necessary components for evaluation
Constructors
| Context | |
Fields | |
data EvaluationStrategy Source #
Settings which determine how terms are evaluated
Constructors
| EvaluationStrategy | |
Instances
A variant of the State monad with built-in logging and error handling
Constructors
| FlowState | |
Fields
| |
Instances
| (Read a, Read s) => Read (FlowState s a) Source # | |
| (Show a, Show s) => Show (FlowState s a) Source # | |
| (Eq a, Eq s) => Eq (FlowState s a) Source # | |
| (Ord a, Ord s) => Ord (FlowState s a) Source # | |
Defined in Hydra.Compute Methods compare :: FlowState s a -> FlowState s a -> Ordering # (<) :: FlowState s a -> FlowState s a -> Bool # (<=) :: FlowState s a -> FlowState s a -> Bool # (>) :: FlowState s a -> FlowState s a -> Bool # (>=) :: FlowState s a -> FlowState s a -> Bool # | |
_FlowState :: Name Source #
Constructors
| Language | |
Fields | |
data LanguageConstraints m Source #
Constructors
newtype LanguageName Source #
Constructors
| LanguageName | |
Fields | |
Instances
| Read LanguageName Source # | |
Defined in Hydra.Compute Methods readsPrec :: Int -> ReadS LanguageName # readList :: ReadS [LanguageName] # | |
| Show LanguageName Source # | |
Defined in Hydra.Compute Methods showsPrec :: Int -> LanguageName -> ShowS # show :: LanguageName -> String # showList :: [LanguageName] -> ShowS # | |
| Eq LanguageName Source # | |
Defined in Hydra.Compute | |
| Ord LanguageName Source # | |
Defined in Hydra.Compute Methods compare :: LanguageName -> LanguageName -> Ordering # (<) :: LanguageName -> LanguageName -> Bool # (<=) :: LanguageName -> LanguageName -> Bool # (>) :: LanguageName -> LanguageName -> Bool # (>=) :: LanguageName -> LanguageName -> Bool # max :: LanguageName -> LanguageName -> LanguageName # min :: LanguageName -> LanguageName -> LanguageName # | |
_LanguageName :: Name Source #
A built-in metadata container for terms
Constructors
| Meta | |
Fields
| |
data PrimitiveFunction m Source #
A built-in function
Constructors
| PrimitiveFunction | |
Fields
| |
A type together with a coder for mapping terms into arguments for primitive functions, and mapping computed results into terms
Constructors
| TermCoder | |
Fields
| |
_TermCoder :: Name Source #
A container for logging and error information
Constructors
| Trace | |
Fields
| |
data TraversalOrder Source #
Constructors
| TraversalOrderPre | Pre-order traversal |
| TraversalOrderPost | Post-order traversal |
Instances
| Read TraversalOrder Source # | |
Defined in Hydra.Compute Methods readsPrec :: Int -> ReadS TraversalOrder # readList :: ReadS [TraversalOrder] # | |
| Show TraversalOrder Source # | |
Defined in Hydra.Compute Methods showsPrec :: Int -> TraversalOrder -> ShowS # show :: TraversalOrder -> String # showList :: [TraversalOrder] -> ShowS # | |
| Eq TraversalOrder Source # | |
Defined in Hydra.Compute Methods (==) :: TraversalOrder -> TraversalOrder -> Bool # (/=) :: TraversalOrder -> TraversalOrder -> Bool # | |
| Ord TraversalOrder Source # | |
Defined in Hydra.Compute Methods compare :: TraversalOrder -> TraversalOrder -> Ordering # (<) :: TraversalOrder -> TraversalOrder -> Bool # (<=) :: TraversalOrder -> TraversalOrder -> Bool # (>) :: TraversalOrder -> TraversalOrder -> Bool # (>=) :: TraversalOrder -> TraversalOrder -> Bool # max :: TraversalOrder -> TraversalOrder -> TraversalOrder # min :: TraversalOrder -> TraversalOrder -> TraversalOrder # | |