Safe Haskell | None |
---|---|
Language | Haskell98 |
Pure combinators along the lines of original ADP. We simply re-export the monadic interface without the monadic function application combinator.
- module ADP.Fusion.Monadic
- class Monad m => StreamGen m t r | t -> r where
- class Monad m => PreStreamGen m s q | s -> q where
- preStreamGen :: s -> DIM2 -> Stream m q
- singlePreStreamGen :: (Ord head, Num head, Monad m) => (:.) ((:.) Z head) head -> Stream m ((:.) ((:.) Z head) head, Z, Z)
- class Monad m => ExtractValue m cnt where
- type Asor cnt :: *
- type Elem cnt :: *
- extractValue :: cnt -> DIM2 -> Asor cnt -> m (Elem cnt)
- extractStream :: cnt -> Stream m (Idx3 z, astack, vstack) -> Stream m (Idx3 z, astack :. Asor cnt, vstack :. Elem cnt)
- extractStreamLast :: cnt -> Stream m (Idx2 z, astack, vstack) -> Stream m (Idx2 z, astack :. Asor cnt, vstack :. Elem cnt)
- class Apply x where
- data Box mk step xs ys = Box mk step xs ys
- type Idx3 z = ((z :. Int) :. Int) :. Int
- type Idx2 z = (z :. Int) :. Int
- newtype Scalar a = Scalar {
- unScalar :: a
- newtype ScalarM a = ScalarM {
- unScalarM :: a
- newtype Vect a = Vect {
- unVect :: a
- newtype VectM a = VectM {
- unVectM :: a
Documentation
module ADP.Fusion.Monadic
StreamGen
class Monad m => StreamGen m t r | t -> r where Source
Generate stream from either one (DIM2 -> m cnt) or some combination of terminals derived from uses of nextTo.
PreStreamGen
class Monad m => PreStreamGen m s q | s -> q where Source
Required by most StreamGen
instances just before extractStreamLast
is
called.
singlePreStreamGen :: (Ord head, Num head, Monad m) => (:.) ((:.) Z head) head -> Stream m ((:.) ((:.) Z head) head, Z, Z) Source
Creates the single step on the left which does nothing more then set the outermost indices to (i,j). This does not use the alpha/omega's
ExtractValue: extract values from data structures.
class Monad m => ExtractValue m cnt where Source
extractValue :: cnt -> DIM2 -> Asor cnt -> m (Elem cnt) Source
extractStream :: cnt -> Stream m (Idx3 z, astack, vstack) -> Stream m (Idx3 z, astack :. Asor cnt, vstack :. Elem cnt) Source
extractStreamLast :: cnt -> Stream m (Idx2 z, astack, vstack) -> Stream m (Idx2 z, astack :. Asor cnt, vstack :. Elem cnt) Source