Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data FormulaF (q :: k -> k -> Type) (f :: k -> Type) (r :: k) (a :: Type)
- type VarRef = Int
- variable :: VarRef -> FormulaF q f r ()
- eitherOf :: [FormulaF q' f' r' a] -> AnItem q f r -> FormulaF q f r a
- anError :: AnItem q f r -> FormulaF q f r a
- errors :: PathsPrefixTree q f r -> FormulaF q f r ()
- calculate :: FormulaF q f r a -> Either (PathsPrefixTree q f r) a
- maxFixpoint :: VarRef -> FormulaF q f r () -> FormulaF q f r ()
- mapErrors :: (PathsPrefixTree q f r -> PathsPrefixTree q' f' r') -> FormulaF q f r a -> FormulaF q' f' r' a
Documentation
data FormulaF (q :: k -> k -> Type) (f :: k -> Type) (r :: k) (a :: Type) Source #
The type FormulaF f r ()
describes (modulo contents of errors) boolean
formulas involving variables, conjunctions, and disjunctions. These
operations (and the generated algebra) are monotonous. This ensures that
fixpoints always exist, i.e. that x = f x
has at least one solution.
Instances
Functor (FormulaF q f r) Source # | |
Applicative (FormulaF q f r) Source # | |
Defined in Data.OpenApi.Compare.Formula pure :: a -> FormulaF q f r a # (<*>) :: FormulaF q f r (a -> b) -> FormulaF q f r a -> FormulaF q f r b # liftA2 :: (a -> b -> c) -> FormulaF q f r a -> FormulaF q f r b -> FormulaF q f r c # (*>) :: FormulaF q f r a -> FormulaF q f r b -> FormulaF q f r b # (<*) :: FormulaF q f r a -> FormulaF q f r b -> FormulaF q f r a # |
errors :: PathsPrefixTree q f r -> FormulaF q f r () Source #
mapErrors :: (PathsPrefixTree q f r -> PathsPrefixTree q' f' r') -> FormulaF q f r a -> FormulaF q' f' r' a Source #