ideas-1.2: Feedback services for intelligent tutoring systems

Portabilityportable (depends on ghc)
Stabilityprovisional
Maintainerbastiaan.heeren@ou.nl
Safe HaskellNone

Ideas.Common.Rewriting.Difference

Description

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

Synopsis

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

differenceEqualWith :: View Term a -> (a -> a -> Bool) -> a -> a -> Maybe (a, a)Source