|
|
|
|
Synopsis |
|
|
|
Documentation |
|
|
Constructors | GConst [String] | atomic disjunction - constant x | y | z
| GVar String | variable
| GAnon | anonymous
|
| Instances | |
|
|
|
|
|
|
|
|
|
(assumes that it's a GConst!)
|
|
|
(assumes that it's a GVar!)
|
|
|
|
|
unify performs unification on two lists of GeniVal. If
unification succeeds, it returns Just (r,s) where verb!r! is
the result of unification and verb!s! is a list of substitutions that
this unification results in.
|
|
|
Note that the first Subst is assumed to come chronologically
before the second one; so merging { X -> Y } and { Y -> 3 }
should give us { X -> 3; Y -> 3 };
See prependToSubst for a warning!
|
|
|
Add to variable replacement to a Subst that logical comes before
the other stuff in it. So for example, if we have Y -> foo
and we want to insert X -> Y, we notice that, in fact, Y has
already been replaced by foo, so we add X -> foo instead
Note that it is undefined if you try to append something like
Y -> foo to Y -> bar, because that would mean that unification
is broken
|
|
|
|
|
|
See source code for details
|
|
|
|
|
|
|
Here it is safe to say (X -> Y; Y -> Z) because this would be crushed
down into a final value of (X -> Z; Y -> Z)
|
|
|
|
|
|
class DescendGeniVal a where | Source |
|
| Methods | | | Instances | |
|
|
|
Unifying something with itself should always succeed
|
|
|
Unifying something with only anonymous variables should succeed and return
the same result.
|
|
|
Unification should be symmetrical. We can't guarantee these if there
are cases where there are variables in the same place on both sides, so we
normalise the sides so that this doesn't happen.
|
|
|
Constructors | | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
|
|
|
|
|
Produced by Haddock version 2.6.0 |