datafix-0.0.1.0: Fixing data-flow problems

Copyright(c) Sebastian Graf 2017-2020
LicenseISC
Maintainersgraf1337@gmail.com
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Datafix.FrameworkBuilder

Description

Builds a DataFlowFramework for a Denotational formulation in terms of MonadDatafix. Effectively reduces descriptions from Datafix.Denotational to ones from Datafix.Explicit, so that solvers such as Datafix.Worklist only have to provide an interpreter for MonadDependency.

Synopsis

Documentation

data FrameworkBuilder m a Source #

Constructs a build plan for a DataFlowFramework by tracking allocation of Nodes mapping to ChangeDetectors and transfer functions.

Instances
Monad (FrameworkBuilder m) Source # 
Instance details

Defined in Datafix.FrameworkBuilder

Functor (FrameworkBuilder m) Source # 
Instance details

Defined in Datafix.FrameworkBuilder

Methods

fmap :: (a -> b) -> FrameworkBuilder m a -> FrameworkBuilder m b #

(<$) :: a -> FrameworkBuilder m b -> FrameworkBuilder m a #

Applicative (FrameworkBuilder m) Source # 
Instance details

Defined in Datafix.FrameworkBuilder

MonadDependency m => MonadDatafix (FrameworkBuilder m) Source # 
Instance details

Defined in Datafix.FrameworkBuilder

Associated Types

type DepM (FrameworkBuilder m) :: Type -> Type Source #

type DepM (FrameworkBuilder m) Source # 
Instance details

Defined in Datafix.FrameworkBuilder

type DepM (FrameworkBuilder m) = m

buildFramework :: forall m a. MonadDependency m => (forall md. (MonadDatafix md, DepM md ~ m) => md a) -> (a, Node, DataFlowFramework m) Source #

(root, max, dff) = buildFramework builder executes the build plan specified by builder and returns the resulting DataFlowFramework dff, as well as the root Node denoting the transfer function returned by the FrameworkBuilder action and the maximum node of the problem as a proof for its denseness.