hydra-0.1.0: Type-aware transformations for data and functional programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Compute

Description

Abstractions for evaluation and transformations

Synopsis

Documentation

data Adapter s1 s2 t1 t2 v1 v2 Source #

Constructors

Adapter 

Fields

data Coder s1 s2 v1 v2 Source #

An encoder and decoder; a bidirectional flow between two types

Constructors

Coder 

Fields

data Context m Source #

An environment containing a graph together with primitive functions and other necessary components for evaluation

newtype Flow s a Source #

A variant of the State monad with built-in logging and error handling

Constructors

Flow 

Fields

Instances

Instances details
MonadFail (Flow s) Source # 
Instance details

Defined in Hydra.Monads

Methods

fail :: String -> Flow s a #

Applicative (Flow s) Source # 
Instance details

Defined in Hydra.Monads

Methods

pure :: a -> Flow s a #

(<*>) :: Flow s (a -> b) -> Flow s a -> Flow s b #

liftA2 :: (a -> b -> c) -> Flow s a -> Flow s b -> Flow s c #

(*>) :: Flow s a -> Flow s b -> Flow s b #

(<*) :: Flow s a -> Flow s b -> Flow s a #

Functor (Flow s) Source # 
Instance details

Defined in Hydra.Monads

Methods

fmap :: (a -> b) -> Flow s a -> Flow s b #

(<$) :: a -> Flow s b -> Flow s a #

Monad (Flow s) Source # 
Instance details

Defined in Hydra.Monads

Methods

(>>=) :: Flow s a -> (a -> Flow s b) -> Flow s b #

(>>) :: Flow s a -> Flow s b -> Flow s b #

return :: a -> Flow s a #

data FlowState s a Source #

Constructors

FlowState 

Instances

Instances details
(Read a, Read s) => Read (FlowState s a) Source # 
Instance details

Defined in Hydra.Compute

(Show a, Show s) => Show (FlowState s a) Source # 
Instance details

Defined in Hydra.Compute

Methods

showsPrec :: Int -> FlowState s a -> ShowS #

show :: FlowState s a -> String #

showList :: [FlowState s a] -> ShowS #

(Eq a, Eq s) => Eq (FlowState s a) Source # 
Instance details

Defined in Hydra.Compute

Methods

(==) :: FlowState s a -> FlowState s a -> Bool #

(/=) :: FlowState s a -> FlowState s a -> Bool #

(Ord a, Ord s) => Ord (FlowState s a) Source # 
Instance details

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 #

max :: FlowState s a -> FlowState s a -> FlowState s a #

min :: FlowState s a -> FlowState s a -> FlowState s a #

data Meta Source #

A built-in metadata container for terms

Constructors

Meta 

Fields

Instances

Instances details
Read Meta Source # 
Instance details

Defined in Hydra.Compute

Show Meta Source # 
Instance details

Defined in Hydra.Compute

Methods

showsPrec :: Int -> Meta -> ShowS #

show :: Meta -> String #

showList :: [Meta] -> ShowS #

Eq Meta Source # 
Instance details

Defined in Hydra.Compute

Methods

(==) :: Meta -> Meta -> Bool #

(/=) :: Meta -> Meta -> Bool #

Ord Meta Source # 
Instance details

Defined in Hydra.Compute

Methods

compare :: Meta -> Meta -> Ordering #

(<) :: Meta -> Meta -> Bool #

(<=) :: Meta -> Meta -> Bool #

(>) :: Meta -> Meta -> Bool #

(>=) :: Meta -> Meta -> Bool #

max :: Meta -> Meta -> Meta #

min :: Meta -> Meta -> Meta #

data TermCoder m a Source #

A type together with a coder for mapping terms into arguments for primitive functions, and mapping computed results into terms

Constructors

TermCoder 

Fields

data Trace Source #

A container for logging and error information

Constructors

Trace 

Fields

Instances

Instances details
Read Trace Source # 
Instance details

Defined in Hydra.Compute

Show Trace Source # 
Instance details

Defined in Hydra.Compute

Methods

showsPrec :: Int -> Trace -> ShowS #

show :: Trace -> String #

showList :: [Trace] -> ShowS #

Eq Trace Source # 
Instance details

Defined in Hydra.Compute

Methods

(==) :: Trace -> Trace -> Bool #

(/=) :: Trace -> Trace -> Bool #

Ord Trace Source # 
Instance details

Defined in Hydra.Compute

Methods

compare :: Trace -> Trace -> Ordering #

(<) :: Trace -> Trace -> Bool #

(<=) :: Trace -> Trace -> Bool #

(>) :: Trace -> Trace -> Bool #

(>=) :: Trace -> Trace -> Bool #

max :: Trace -> Trace -> Trace #

min :: Trace -> Trace -> Trace #