| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
ADP.Fusion.Core.Multi
Synopsis
- data M = M
- data TermSymbol a b = a :| b
- type family TermArg x :: *
- class TermStaticVar pos sym ix where
- termStreamIndex :: Proxy pos -> sym -> ix -> ix
- termStaticCheck :: Proxy pos -> sym -> LimitType ix -> ix -> Int# -> Int#
- class TableStaticVar pos minSize tableIx ix where
- tableStreamIndex :: Proxy pos -> minSize -> LimitType tableIx -> ix -> ix
- data TermState s i e = TState {
- tS :: !s
- iIx :: !(RunningIndex i)
- eTS :: !e
- class TermStream m pos t s i where
- addTermStream1 :: forall m pos t s i. (Monad m, TermStream m (Z :. pos) (TermSymbol M t) (Elm (Term1 s) (Z :. i)) (Z :. i)) => Proxy pos -> t -> LimitType i -> i -> Stream m s -> Stream m (s, TermArg t, RunningIndex i)
- newtype Term1 s = Term1 s
- elmTerm1 :: s -> i -> Elm (Term1 s) (Z :. i)
- type TermStreamContext m (pos :: k) ts s x0 sixty is i = (Monad m, TermStream m pos ts s is, GetIndex (RunningIndex sixty) (RunningIndex (is :. i)), GetIx (RunningIndex sixty) (RunningIndex (is :. i)) ~ RunningIndex i, Element x0 sixty, s ~ Elm x0 sixty)
- type PRI is i = Proxy (RunningIndex (is :. i))
Multi-dimensional extension
Terminates a multi-dimensional terminal symbol stack.
Constructors
| M |
data TermSymbol a b Source #
Terminal symbols are stacked together with a tails and b head.
Constructors
| a :| b infixl 2 |
Instances
type family TermArg x :: * Source #
Extracts the type of a multi-dimensional terminal argument.
Instances
class TermStaticVar pos sym ix where Source #
For multi-dimensional terminals we need to be able to calculate how the static/variable signal changes and if the index for the inner part needs to be modified.
Methods
termStreamIndex :: Proxy pos -> sym -> ix -> ix Source #
termStaticCheck :: Proxy pos -> sym -> LimitType ix -> ix -> Int# -> Int# Source #
Instances
class TableStaticVar pos minSize tableIx ix where Source #
Methods
Arguments
| :: Proxy pos | provide type-level information on if we are currently staticvariable etc |
| -> minSize | Information on the minimal size of the corresponding table. |
| -> LimitType tableIx | provide type-level information on the index structure of the table we
are looking at. This index structure might well be different than the
|
| -> ix | current right-most index |
| -> ix | right-most index for symbol to the left of us |
Instances
| TableStaticVar (pos :: k) Z tableIx Z Source # | Index "0" for multi-dimensional syntactic variables. |
Defined in ADP.Fusion.Core.Multi | |
| MinSize minSize => TableStaticVar (pos :: k) minSize u (PointL C) Source # | |
Defined in ADP.Fusion.PointL.Core | |
| MinSize minSize => TableStaticVar (pos :: k) minSize u (PointL O) Source # | |
Defined in ADP.Fusion.PointL.Core | |
| MinSize minSize => TableStaticVar (pos :: k) minSize u (PointL I) Source # | |
Defined in ADP.Fusion.PointL.Core | |
| MinSize minSize => TableStaticVar (pos :: k) minSize u (PointR I) Source # | |
Defined in ADP.Fusion.PointR.Core | |
| (TableStaticVar ps cs us is, TableStaticVar p c u i) => TableStaticVar (ps :. p :: Type) (cs :. c) (us :. u) (is :. i) Source # | |
Constructors
| TState | |
Fields
| |
class TermStream m pos t s i where Source #
Methods
termStream :: Proxy pos -> t -> LimitType i -> i -> Stream m (TermState s Z Z) -> Stream m (TermState s i (TermArg t)) Source #
Instances
addTermStream1 :: forall m pos t s i. (Monad m, TermStream m (Z :. pos) (TermSymbol M t) (Elm (Term1 s) (Z :. i)) (Z :. i)) => Proxy pos -> t -> LimitType i -> i -> Stream m s -> Stream m (s, TermArg t, RunningIndex i) Source #
TODO need t -> ElmType t type function
TODO need to actually return an ElmType t can do that instead of
returning u !!!
Constructors
| Term1 s |
type TermStreamContext m (pos :: k) ts s x0 sixty is i = (Monad m, TermStream m pos ts s is, GetIndex (RunningIndex sixty) (RunningIndex (is :. i)), GetIx (RunningIndex sixty) (RunningIndex (is :. i)) ~ RunningIndex i, Element x0 sixty, s ~ Elm x0 sixty) Source #
Term MkStream context
TODO prepare for deletion
Term TermStream context