ADPfusionSet-0.0.0.2: Dynamic programming for Set data structures.

Safe HaskellNone
LanguageHaskell2010

ADP.Fusion.Term.Edge.Set1

Contents

Description

Insert an edge into a set. X -> Y e with e == Edge extends Y with the edge partially overlapping Y.

The semantic meaning of the overlap depends on what the k type in BS1 k i is. For First, the edge will go from First in X to First in the smaller Y.

TODO X -> e X vs X -> X e.

Sidenote: can we actually have X -> Y Z with Set1 structures? I don't think so, at least not easily, since the boundary between Y Z is unclear.

Synopsis

Documentation

class EdgeFromTo k where Source #

TODO move to definition of Edge

Minimal complete definition

edgeFromTo

Instances

EdgeFromTo First Source #

In case our sets have a First boundary, then we always point from the boundary "into" the set. Hence SetNode == To and NewNode == From.

EdgeFromTo Last Source #

And if the set has a Last boundary, then we point from somewhere in the set To the NewNode, which is Last.

newtype SetNode Source #

Constructors

SetNode Int 

newtype NewNode Source #

Constructors

NewNode Int 

Orphan instances

TermStaticVar Edge (BS1 k I) Source # 

Methods

termStaticVar :: Edge -> Context (BS1 k I) -> BS1 k I -> Context (BS1 k I) #

termStreamIndex :: Edge -> Context (BS1 k I) -> BS1 k I -> BS1 k I #

(TstCtx m ts s x0 i0 is (BS1 k I), EdgeFromTo k) => TermStream m (TermSymbol ts Edge) s ((:.) is (BS1 k I)) Source #

We need to separate out the two cases of having BS1 First and BS1 Last as this changes how we fill the Edge.

TODO separate out these cases into an Edge-Choice class ...

Methods

termStream :: TermSymbol ts Edge -> Context (is :. BS1 k I) -> (is :. BS1 k I) -> (is :. BS1 k I) -> Stream m (TermState s Z Z) -> Stream m (TermState s (is :. BS1 k I) (TermArg (TermSymbol ts Edge))) #

TmkCtx1 m ls Edge (BS1 k t) => MkStream m ((:!:) ls Edge) (BS1 k t) Source # 

Methods

mkStream :: (ls :!: Edge) -> Context (BS1 k t) -> BS1 k t -> BS1 k t -> Stream m (Elm (ls :!: Edge) (BS1 k t)) #