speculate-0.4.20: discovery of properties about Haskell functions
Copyright(c) 2016-2024 Rudy Matela
License3-Clause BSD (see the file LICENSE)
MaintainerRudy Matela <rudy@matela.com.br>
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Speculate.SemiReason

Description

This module is part o Speculate.

Inequational (or semi-equational) reasoning.

Synopsis

Documentation

data Shy Source #

Constructors

Shy 

Fields

lesser :: Shy -> Expr -> [Expr] Source #

simplerThan :: Equation -> Shy -> Shy Source #

given a semi-equation (inequality), simplerThan restricts the Shy (SemiTheory) into only equations simpler than the given semi-equation or that are instances of simpler equations.

half-baked example:

x + 1 is simpler than x + y and it is returned. (1 + 1) + 1 is more complex than x + y but it is returned as well as it is an instance of x + 1.