ADPfusion-0.5.2.2: Efficient, high-level dynamic programming.

Safe HaskellNone
LanguageHaskell2010

ADP.Fusion.SynVar.Array.Type

Contents

Synopsis

Documentation

data ITbl arr c i x where Source #

Immutable table.

Constructors

ITbl :: {..} -> ITbl arr c i x 

Fields

Instances

SplitIxCol uId (SameSid uId (Elm ls i)) (Elm ls i) => SplitIxCol uId True (Elm ((:!:) ls (Split sId splitType (TwITblBt arr c j x mF mB r))) i) Source # 

Associated Types

type SplitIxTy (uId :: Symbol) (True :: Bool) (Elm ((:!:) ls (Split sId splitType (TwITblBt arr c j x mF mB r))) i) :: * Source #

Methods

splitIxCol :: Proxy Symbol uId -> Proxy Bool True -> Elm (ls :!: Split sId splitType (TwITblBt arr c j x mF mB r)) i -> SplitIxTy uId True (Elm (ls :!: Split sId splitType (TwITblBt arr c j x mF mB r)) i) Source #

SplitIxCol uId (SameSid uId (Elm ls i)) (Elm ls i) => SplitIxCol uId True (Elm ((:!:) ls (Split sId splitType (TwITbl m arr c j x))) i) Source # 

Associated Types

type SplitIxTy (uId :: Symbol) (True :: Bool) (Elm ((:!:) ls (Split sId splitType (TwITbl m arr c j x))) i) :: * Source #

Methods

splitIxCol :: Proxy Symbol uId -> Proxy Bool True -> Elm (ls :!: Split sId splitType (TwITbl m arr c j x)) i -> SplitIxTy uId True (Elm (ls :!: Split sId splitType (TwITbl m arr c j x)) i) Source #

(MutateCell h ((:.) ts (TwITbl im arr c i x)) im i, PrimArrayOps arr i x, Show i, IndexStream i, TableOrder ((:.) ts (TwITbl im arr c i x))) => MutateTables h ((:.) ts (TwITbl im arr c i x)) im Source # 

Methods

mutateTables :: (Monad om, PrimMonad om) => Proxy * h -> (forall a. im a -> om a) -> (ts :. TwITbl im arr c i x) -> om (ts :. TwITbl im arr c i x) Source #

(PrimArrayOps arr ZS2 x, MPrimArrayOps arr ZS2 x, MutateCell MonotoneMCFG ts im ZS2) => MutateCell MonotoneMCFG ((:.) ts (TwITbl im arr c ZS2 x)) im ZS2 Source # 

Methods

mutateCell :: (Monad om, PrimMonad om) => Proxy * MonotoneMCFG -> Int -> Int -> (forall a. im a -> om a) -> (ts :. TwITbl im arr c ZS2 x) -> ZS2 -> ZS2 -> om () Source #

(PrimArrayOps arr i x, MPrimArrayOps arr i x, MutateCell CFG ts im i) => MutateCell CFG ((:.) ts (TwITbl im arr c i x)) im i Source # 

Methods

mutateCell :: (Monad om, PrimMonad om) => Proxy * CFG -> Int -> Int -> (forall a. im a -> om a) -> (ts :. TwITbl im arr c i x) -> i -> i -> om () Source #

(PrimArrayOps arr (Subword I) x, MPrimArrayOps arr (Subword I) x, MutateCell h ts im ((:.) ((:.) Z (Subword I)) (Subword I))) => MutateCell h ((:.) ts (TwITbl im arr c (Subword I) x)) im ((:.) ((:.) Z (Subword I)) (Subword I)) Source # 

Methods

mutateCell :: (Monad om, PrimMonad om) => Proxy * h -> Int -> Int -> (forall a. im a -> om a) -> (ts :. TwITbl im arr c (Subword I) x) -> ((Z :. Subword I) :. Subword I) -> ((Z :. Subword I) :. Subword I) -> om () Source #

(Monad mB, Element ls ((:.) is i), TableStaticVar ((:.) us u) ((:.) cs c) ((:.) is i), AddIndexDense (Elm ls ((:.) is i)) ((:.) us u) ((:.) cs c) ((:.) is i), MkStream mB ls ((:.) is i), PrimArrayOps arr ((:.) us u) x) => MkStream mB ((:!:) ls (TwITblBt arr ((:.) cs c) ((:.) us u) x mF mB r)) ((:.) is i) Source # 

Methods

mkStream :: (ls :!: TwITblBt arr (cs :. c) (us :. u) x mF mB r) -> Context (is :. i) -> (is :. i) -> (is :. i) -> Stream mB (Elm (ls :!: TwITblBt arr (cs :. c) (us :. u) x mF mB r) (is :. i)) Source #

(Monad m, Element ls ((:.) is i), TableStaticVar ((:.) us u) ((:.) cs c) ((:.) is i), AddIndexDense (Elm ls ((:.) is i)) ((:.) us u) ((:.) cs c) ((:.) is i), MkStream m ls ((:.) is i), PrimArrayOps arr ((:.) us u) x) => MkStream m ((:!:) ls (TwITbl m arr ((:.) cs c) ((:.) us u) x)) ((:.) is i) Source # 

Methods

mkStream :: (ls :!: TwITbl m arr (cs :. c) (us :. u) x) -> Context (is :. i) -> (is :. i) -> (is :. i) -> Stream m (Elm (ls :!: TwITbl m arr (cs :. c) (us :. u) x) (is :. i)) Source #

(Show x, Show i, Show (RunningIndex i), Show (Elm ls i)) => Show (Elm ((:!:) ls (TwITblBt arr c i x mF mB r)) i) Source # 

Methods

showsPrec :: Int -> Elm (ls :!: TwITblBt arr c i x mF mB r) i -> ShowS #

show :: Elm (ls :!: TwITblBt arr c i x mF mB r) i -> String #

showList :: [Elm (ls :!: TwITblBt arr c i x mF mB r) i] -> ShowS #

(Show i, Show (RunningIndex i), Show (Elm ls i), Show x) => Show (Elm ((:!:) ls (TwITbl m arr c j x)) i) Source # 

Methods

showsPrec :: Int -> Elm (ls :!: TwITbl m arr c j x) i -> ShowS #

show :: Elm (ls :!: TwITbl m arr c j x) i -> String #

showList :: [Elm (ls :!: TwITbl m arr c j x) i] -> ShowS #

(Monad mB, PrimArrayOps arr i x, IndexStream i, (~) * j i, (~) (* -> *) m mB) => Axiom (TW (Backtrack (TwITbl mF arr c i x) mF mB) (j -> j -> m [r])) Source #

We need this somewhat annoying instance construction (i ~ j and m ~ mB) in order to force selection of this instance.

Associated Types

type AxiomStream (TW (Backtrack (TwITbl mF arr c i x) mF mB) (j -> j -> m [r])) :: * Source #

Methods

axiom :: TW (Backtrack (TwITbl mF arr c i x) mF mB) (j -> j -> m [r]) -> AxiomStream (TW (Backtrack (TwITbl mF arr c i x) mF mB) (j -> j -> m [r])) Source #

(TSBO ts, Typeable (* -> * -> *) arr, Typeable * c, Typeable * i, Typeable * x, PrimArrayOps arr i x, MPrimArrayOps arr i x, IndexStream i) => TSBO ((:.) ts (TwITbl Id arr c i x)) Source # 

Methods

asDyn :: (ts :. TwITbl Id arr c i x) -> [Q] Source #

fillWithDyn :: (Monad m, PrimMonad m) => [Q] -> (ts :. TwITbl Id arr c i x) -> m [Q] Source #

TableOrder ts => TableOrder ((:.) ts (TwITbl im arr c i x)) Source # 

Methods

tableLittleOrder :: (ts :. TwITbl im arr c i x) -> [Int] Source #

tableBigOrder :: (ts :. TwITbl im arr c i x) -> [Int] Source #

Element ls i => Element ((:!:) ls (TwITblBt arr c j x mF mB r)) i Source # 

Associated Types

data Elm ((:!:) ls (TwITblBt arr c j x mF mB r)) i :: * Source #

type RecElm ((:!:) ls (TwITblBt arr c j x mF mB r)) i :: * Source #

type Arg ((:!:) ls (TwITblBt arr c j x mF mB r)) :: * Source #

Methods

getArg :: Elm (ls :!: TwITblBt arr c j x mF mB r) i -> Arg (ls :!: TwITblBt arr c j x mF mB r) Source #

getIdx :: Elm (ls :!: TwITblBt arr c j x mF mB r) i -> RunningIndex i Source #

getElm :: Elm (ls :!: TwITblBt arr c j x mF mB r) i -> RecElm (ls :!: TwITblBt arr c j x mF mB r) i Source #

Element ls i => Element ((:!:) ls (TwITbl m arr c j x)) i Source # 

Associated Types

data Elm ((:!:) ls (TwITbl m arr c j x)) i :: * Source #

type RecElm ((:!:) ls (TwITbl m arr c j x)) i :: * Source #

type Arg ((:!:) ls (TwITbl m arr c j x)) :: * Source #

Methods

getArg :: Elm (ls :!: TwITbl m arr c j x) i -> Arg (ls :!: TwITbl m arr c j x) Source #

getIdx :: Elm (ls :!: TwITbl m arr c j x) i -> RunningIndex i Source #

getElm :: Elm (ls :!: TwITbl m arr c j x) i -> RecElm (ls :!: TwITbl m arr c j x) i Source #

Element ls i => Element ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) i Source # 

Associated Types

data Elm ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) i :: * Source #

type RecElm ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) i :: * Source #

type Arg ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) :: * Source #

Methods

getArg :: Elm (ls :!: Split uId splitType (TwITblBt arr c j x mF mB r)) i -> Arg (ls :!: Split uId splitType (TwITblBt arr c j x mF mB r)) Source #

getIdx :: Elm (ls :!: Split uId splitType (TwITblBt arr c j x mF mB r)) i -> RunningIndex i Source #

getElm :: Elm (ls :!: Split uId splitType (TwITblBt arr c j x mF mB r)) i -> RecElm (ls :!: Split uId splitType (TwITblBt arr c j x mF mB r)) i Source #

Element ls i => Element ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) i Source # 

Associated Types

data Elm ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) i :: * Source #

type RecElm ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) i :: * Source #

type Arg ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) :: * Source #

Methods

getArg :: Elm (ls :!: Split uId splitType (TwITbl m arr c j x)) i -> Arg (ls :!: Split uId splitType (TwITbl m arr c j x)) Source #

getIdx :: Elm (ls :!: Split uId splitType (TwITbl m arr c j x)) i -> RunningIndex i Source #

getElm :: Elm (ls :!: Split uId splitType (TwITbl m arr c j x)) i -> RecElm (ls :!: Split uId splitType (TwITbl m arr c j x)) i Source #

(Monad m, PrimArrayOps arr i x, IndexStream i) => Axiom (TwITbl m arr c i x) Source # 

Associated Types

type AxiomStream (TwITbl m arr c i x) :: * Source #

Methods

axiom :: TwITbl m arr c i x -> AxiomStream (TwITbl m arr c i x) Source #

Build (TwITbl m arr c i x) Source # 

Associated Types

type Stack (TwITbl m arr c i x) :: * Source #

Methods

build :: TwITbl m arr c i x -> Stack (TwITbl m arr c i x) Source #

GenBacktrackTable (TwITbl mF arr c i x) mF mB Source # 

Associated Types

data Backtrack (TwITbl mF arr c i x) (mF :: * -> *) (mB :: * -> *) :: * Source #

type BacktrackIndex (TwITbl mF arr c i x) :: * Source #

Methods

toBacktrack :: TwITbl mF arr c i x -> (forall a. mF a -> mB a) -> Backtrack (TwITbl mF arr c i x) mF mB Source #

Build (TwITblBt arr c i x mF mB r) Source # 

Associated Types

type Stack (TwITblBt arr c i x mF mB r) :: * Source #

Methods

build :: TwITblBt arr c i x mF mB r -> Stack (TwITblBt arr c i x mF mB r) Source #

type SplitIxTy uId True (Elm ((:!:) ls (Split sId splitType (TwITblBt arr c j x mF mB r))) i) Source # 
type SplitIxTy uId True (Elm ((:!:) ls (Split sId splitType (TwITblBt arr c j x mF mB r))) i) = (:.) (SplitIxTy uId (SameSid uId (Elm ls i)) (Elm ls i)) i
type SplitIxTy uId True (Elm ((:!:) ls (Split sId splitType (TwITbl m arr c j x))) i) Source # 
type SplitIxTy uId True (Elm ((:!:) ls (Split sId splitType (TwITbl m arr c j x))) i) = (:.) (SplitIxTy uId (SameSid uId (Elm ls i)) (Elm ls i)) i
type AxiomStream (TW (Backtrack (TwITbl mF arr c i x) mF mB) (j -> j -> m [r])) Source # 
type AxiomStream (TW (Backtrack (TwITbl mF arr c i x) mF mB) (j -> j -> m [r])) = mB [r]
data Elm ((:!:) ls (TwITblBt arr c j x mF mB r)) Source # 
data Elm ((:!:) ls (TwITblBt arr c j x mF mB r)) = ElmBtITbl !x [r] !(RunningIndex i) !(Elm ls i)
data Elm ((:!:) ls (TwITbl m arr c j x)) Source # 
data Elm ((:!:) ls (TwITbl m arr c j x)) = ElmITbl !x !(RunningIndex i) !(Elm ls i)
data Elm ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) Source # 
data Elm ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) = ElmSplitBtITbl !(Proxy Symbol uId) !(CalcSplitType splitType (x, [r])) !(RunningIndex i) !(Elm ls i) !i
data Elm ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) Source # 
data Elm ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) = ElmSplitITbl !(Proxy Symbol uId) !(CalcSplitType splitType x) !(RunningIndex i) !(Elm ls i) !i
type Arg ((:!:) ls (TwITblBt arr c j x mF mB r)) Source # 
type Arg ((:!:) ls (TwITblBt arr c j x mF mB r)) = (:.) (Arg ls) (x, [r])
type Arg ((:!:) ls (TwITbl m arr c j x)) Source # 
type Arg ((:!:) ls (TwITbl m arr c j x)) = (:.) (Arg ls) x
type Arg ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) Source # 
type Arg ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) = (:.) (Arg ls) (CalcSplitType splitType (x, [r]))
type Arg ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) Source # 
type Arg ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) = (:.) (Arg ls) (CalcSplitType splitType x)
type RecElm ((:!:) ls (TwITblBt arr c j x mF mB r)) i Source # 
type RecElm ((:!:) ls (TwITblBt arr c j x mF mB r)) i = Elm ls i
type RecElm ((:!:) ls (TwITbl m arr c j x)) i Source # 
type RecElm ((:!:) ls (TwITbl m arr c j x)) i = Elm ls i
type RecElm ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) i Source # 
type RecElm ((:!:) ls (Split uId splitType (TwITblBt arr c j x mF mB r))) i = Elm ls i
type RecElm ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) i Source # 
type RecElm ((:!:) ls (Split uId splitType (TwITbl m arr c j x))) i = Elm ls i
type BacktrackIndex (TwITbl mF arr c i x) Source # 
type BacktrackIndex (TwITbl mF arr c i x) = i
type AxiomStream (TwITbl m arr c i x) Source # 
type AxiomStream (TwITbl m arr c i x) = m x
type TNE (TwITbl m arr EmptyOk i x) Source # 
type TNE (TwITbl m arr EmptyOk i x) = TwITbl m arr NonEmpty i x
type TE (TwITbl m arr EmptyOk i x) Source # 
type TE (TwITbl m arr EmptyOk i x) = TwITbl m arr EmptyOk i x
type Stack (TwITbl m arr c i x) Source # 
type Stack (TwITbl m arr c i x) = (:!:) S (TwITbl m arr c i x)
type TermArg (TwITbl m arr c i x) Source # 
type TermArg (TwITbl m arr c i x) = x
data Backtrack (TwITbl mF arr c i x) mF Source # 
data Backtrack (TwITbl mF arr c i x) mF = BtITbl !c !(arr i x)
type TNE (TwITblBt arr EmptyOk i x mF mB r) Source # 
type TNE (TwITblBt arr EmptyOk i x mF mB r) = TwITblBt arr NonEmpty i x mF mB r
type TE (TwITblBt arr EmptyOk i x mF mB r) Source # 
type TE (TwITblBt arr EmptyOk i x mF mB r) = TwITblBt arr EmptyOk i x mF mB r
type Stack (TwITblBt arr c i x mF mB r) Source # 
type Stack (TwITblBt arr c i x mF mB r) = (:!:) S (TwITblBt arr c i x mF mB r)
type TermArg (TwITblBt arr c i x mF mB r) Source # 
type TermArg (TwITblBt arr c i x mF mB r) = (x, [r])

type TwITbl m arr c i x = TW (ITbl arr c i x) (i -> i -> m x) Source #

type TwITblBt arr c i x mF mB r = TW (Backtrack (TwITbl mF arr c i x) mF mB) (i -> i -> mB [r]) Source #

axiom stuff

Element

Multi-dim extensions