| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.Souffle.Analysis
Description
This module provides an Analysis type for combining multiple Datalog
analyses together. Composition of analyses is done via the various
type-classes that are implemented for this type. For a longer explanation
of how the Analysis type works, see this
blogpost.
If you are just starting out using this library, you are probably better of taking a look at the Language.Souffle.Interpreted module instead to start interacting with a single Datalog program.
Synopsis
- data Analysis m a b
- mkAnalysis :: (a -> m ()) -> m () -> m b -> Analysis m a b
- execAnalysis :: Applicative m => Analysis m a b -> a -> m b
Documentation
Data type used to compose multiple Datalog programs. Composition is mainly
done via the various type-classes implemented for this type.
Values of this type can be created using mkAnalysis.
The m type-variable represents the monad the analysis will run in. In
most cases, this will be the SouffleM monad from either
Language.Souffle.Compiled or Language.Souffle.Interpreted.
The a and b type-variables represent respectively the input and output
types of the analysis.
Instances
Arguments
| :: (a -> m ()) | Function for finding facts used by the |
| -> m () | Function for actually running the |
| -> m b | Function for retrieving the |
| -> Analysis m a b |
Creates an Analysis value.
execAnalysis :: Applicative m => Analysis m a b -> a -> m b Source #
Converts an Analysis into an effectful function, so it can be executed.