algebra-dag-0.1.1.1: Infrastructure for DAG-shaped relational algebra plans

Safe HaskellNone
LanguageHaskell98

Database.Algebra.Dag.Build

Synopsis

Documentation

type Build alg = State (BuildState alg) Source

The DAG builder monad, abstracted over the algebra stored in the DAG. Internally, the monad detects sharing of subgraphs via hash consing.

runBuild :: Build alg r -> (AlgebraDag alg, r, NodeMap [Tag]) Source

Evaluate the monadic graph into an algebraic plan, given a loop relation.

tagM :: String -> Build alg AlgNode -> Build alg AlgNode Source

Tag a subtree with a comment (monadic version)

insert :: Operator alg => alg -> Build alg AlgNode Source

Insert a node into the graph construction environment, first check if the node already exists | if so return its id, otherwise insert it and return its id.