Copyright | (c) 2016-2019 Rudy Matela |
---|---|
License | 3-Clause BSD (see the file LICENSE) |
Maintainer | Rudy Matela <[email protected]> |
Safe Haskell | None |
Language | Haskell2010 |
Test.Speculate.Expr.Core
Contents
Description
This module is part of Speculate.
This module reexports Express
along with some extra utilities.
Synopsis
- module Data.Express
- lexicompare :: Expr -> Expr -> Ordering
- lexicompareBy :: (Expr -> Expr -> Ordering) -> Expr -> Expr -> Ordering
- isConstantNamed :: Expr -> String -> Bool
- unrepeatedVars :: Expr -> Bool
- isAssignment :: Expr -> Bool
- type Binds = [(Expr, Expr)]
- fill :: Expr -> [Expr] -> Expr
- sub :: Expr -> Expr -> Expr -> Expr
- unify :: Expr -> Expr -> Maybe Expr
- unification :: Expr -> Expr -> Maybe [(Expr, Expr)]
- isCanonInstanceOf :: Expr -> Expr -> Bool
- hasCanonInstanceOf :: Expr -> Expr -> Bool
Documentation
module Data.Express
Order
Properties
unrepeatedVars :: Expr -> Bool Source #
isAssignment :: Expr -> Bool Source #
Assigning
fill :: Expr -> [Expr] -> Expr Source #
Fill holes in an expression. Silently skips holes that are not of the right type. Silently discard remaining expressions.
sub :: Expr -> Expr -> Expr -> Expr Source #
Substitute matching subexpressios.
sub (x + y) 0 ((x + y) + z) == (0 + z) sub (x + y) 0 (x + (y + z)) == (x + (y + z))
TODO: remove