multivariant-0.1.0.1: Multivariant assignments generation language

Copyright(c) Anton Marchenko Mansur Ziatdinov 2016-2017
LicenseBSD-3
Maintainergltronred@gmail.com
Stabilityprovisional
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Test.Multivariant.Types.Cases

Description

This module provides interpreter for corner cases.

Synopsis

Documentation

data Case a b Source #

Constructors

Case 

Fields

newtype Cases a b Source #

Type of interpreter

Constructors

Cases 

Fields

Instances

WithDescription Cases Source # 

Methods

withDescription :: Cases a b -> Text -> Cases a b Source #

WithCornerCases Cases Source # 

Methods

withCornerCases :: Cases a b -> ([a], [b]) -> Cases a b Source #

WithInvert Cases Source # 

Methods

invert :: Cases a b -> Cases b a Source #

Program Cases Source # 

Methods

step :: (a <-> b) -> Cases a b Source #

(~>) :: Cases a b -> Cases b c -> Cases a c Source #

(<***>) :: Cases a1 b1 -> Cases a2 b2 -> Cases (a1, a2) (b1, b2) Source #

(<+++>) :: Cases a b -> Cases a b -> Cases a b Source #

getCases Source #

Arguments

:: (Eq a, Eq b) 
=> Cases a b

Interpreter

-> [[(a, b)]]

List (for each variant) of lists of pairs of input and output.

Get a list of corner cases for each variant

after :: Case a b -> Case b c -> Case a c Source #

prod :: Case a1 b1 -> Case a2 b2 -> Case (a1, a2) (b1, b2) Source #

appendCases :: [a] -> [b] -> Case a b -> Case a b Source #