module ADP.Fusion.Core.Boundary where
import Data.Vector.Fusion.Stream.Monadic (singleton)
import Data.PrimitiveArray hiding (map)
import ADP.Fusion.Core.Classes
import ADP.Fusion.Core.Multi
instance RuleContext (Boundary i I) where
type Context (Boundary i I) = InsideContext ()
initialContext _ = IStatic ()
newtype instance RunningIndex (Boundary i I) = RiBI (Boundary i I)
instance
( Monad m
) => MkStream m S (Boundary i I) where
mkStream S _ u k
= singleton . ElmS . RiBI $ k
instance TableStaticVar u c (Boundary i I) where
tableStaticVar _ c _ _ = IVariable ()
tableStreamIndex _ c _ z = z