Copyright | (c) 2017-2019 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <[email protected]> |
Safe Haskell | None |
Language | Haskell2010 |
Test.Extrapolate.Expr
Contents
Description
This module is part of Extrapolate, a library for generalization of counter-examples.
This module re-exports functionality from Data.Express and Test.Speculate.Expr along with some extra utilities.
Documentation
module Data.Express
canonicalizeUsingHoles :: Expr -> Expr Source #
Like canonicalize
but uses holes for unrepeated variables.
canonicalizeUsingHolesWith :: (Expr -> [String]) -> Expr -> Expr Source #
Like canonicalizeWith
but uses holes for unrepeated variables.
replaceFun :: Expr -> Expr -> Expr Source #
O(n).
Replaces the function in the given Expr
.
replaceFun timesE (plusE :$ one :$ two) = timesE :$ one :$ two replaceFun absE (idE :$ one) = absE :$ one replaceFun two (one) = two