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

Contents

Description

This module exports all interpreters.

Synopsis

Interpreter for corner cases

data Cases a b Source #

Type of interpreter

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

Interpreter for description

data Description a b Source #

Type for interpreter

getDescription :: Description a b -> [Text] Source #

Get a list of texts of variants

Interpreter for solution

data Solution a b Source #

Type for interpreter

Instances

WithDescription Solution Source # 

Methods

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

WithCornerCases Solution Source # 

Methods

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

WithInvert Solution Source # 

Methods

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

Program Solution Source # 

Methods

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

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

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

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

getSolutions :: Solution b c -> [b -> c] Source #

Extract a list of solutions (functions that map input to output)