Portability | portable (depends on ghc) |
---|---|

Stability | provisional |

Maintainer | bastiaan.heeren@ou.nl |

Safe Haskell | None |

Compute the difference of two terms generically, taking associativity into account.

- difference :: IsTerm a => a -> a -> Maybe (a, a)
- differenceEqual :: IsTerm a => (a -> a -> Bool) -> a -> a -> Maybe (a, a)
- differenceWith :: View Term a -> a -> a -> Maybe (a, a)
- differenceEqualWith :: View Term a -> (a -> a -> Bool) -> a -> a -> Maybe (a, a)

# Documentation

difference :: IsTerm a => a -> a -> Maybe (a, a)Source

differenceEqual :: IsTerm a => (a -> a -> Bool) -> a -> a -> Maybe (a, a)Source

This function returns the difference, except that the returned terms should be logically equivalent. Nothing can signal that there is no difference, or that the terms to start with are not equivalent.

differenceWith :: View Term a -> a -> a -> Maybe (a, a)Source