Copyright | (c) Anton Marchenko Mansur Ziatdinov 2016-2017 |
---|---|
License | BSD-3 |
Maintainer | gltronred@gmail.com |
Stability | provisional |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
This module provides typeclasses for final tagless encoding of multivariant assignment language.
- class Program prog where
- oneof :: Program prog => [prog a b] -> prog a b
- class Program prog => WithCornerCases prog where
- class Program prog => WithDescription prog where
- class Program prog => WithInvert prog where
- class Program prog => WithConditions prog where
- newtype ProgramArrow p a b = ProgramArrow {
- getProgram :: p a b
Program
class Program prog where Source #
Program provides the most common operations
Corner cases
class Program prog => WithCornerCases prog where Source #
Program that has corner cases
withCornerCases :: prog a b -> ([a], [b]) -> prog a b Source #
Supply corner cases for some step
Description
class Program prog => WithDescription prog where Source #
Program that has description
withDescription :: prog a b -> Text -> prog a b Source #
Supply description for some step
Inverse
class Program prog => WithInvert prog where Source #
Program that can be inverted
Properties
class Program prog => WithConditions prog where Source #
Program that has properties (*not implemented yet*)
withConditions :: prog a b -> (a -> Bool, b -> Bool) -> prog a b Source #
Supply precondition and postcondition
ProgramArrow
newtype ProgramArrow p a b Source #
Embed program into arrow
ProgramArrow | |
|
Program prog => Arrow (ProgramArrow prog) Source # | |
Program prog => Category * (ProgramArrow prog) Source # | |
Program prog => Semigroupoid * (ProgramArrow prog) Source # | |