Commit ee3fdd0c authored by Finn Teegen's avatar Finn Teegen

Fix unification operators in combination with Data contexts

parent 6f8a79e6
......@@ -1983,8 +1983,6 @@ doSolve b | b = return ()
#ifdef __PAKCS__
(=:=) = constrEq
-- For this operator we cannot remove the Data dictionary in the prolog code
-- Thus, we generalize the type of the external definition.
constrEq :: a -> a -> Bool
constrEq external
#else
......@@ -1993,14 +1991,24 @@ constrEq external
--- Non-strict equational constraint. Used to implement functional patterns.
(=:<=) :: Data a => a -> a -> Bool
#ifdef __PAKCS__
(=:<=) = unifEq
unifEq :: a -> a -> Bool
unifEq external
#else
(=:<=) external
#endif
#ifdef __PAKCS__
--- Non-strict equational constraint for linear functional patterns.
--- Thus, it must be ensured that the first argument is always (after evalutation
--- by narrowing) a linear pattern. Experimental.
(=:<<=) :: Data a => a -> a -> Bool
(=:<<=) external
(=:<<=) = unifEqLinear
unifEqLinear :: a -> a -> Bool
unifEqLinear external
--- internal function to implement =:<=
ifVar :: _ -> a -> a -> a
......
......@@ -97,11 +97,11 @@
<library>prim_standard</library>
<entry>constrEq[raw]</entry>
</primitive>
<primitive name="=:&lt;=" arity="3">
<primitive name="unifEq" arity="2">
<library>prim_standard</library>
<entry>unifEq[raw]</entry>
</primitive>
<primitive name="=:&lt;&lt;=" arity="3">
<primitive name="unifEqLinear" arity="2">
<library>prim_standard</library>
<entry>unifEqLinear[raw]</entry>
</primitive>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment