PAKCS Internal Functions

From: Andy Jost <>
Date: Thu, 14 May 2015 17:48:56 +0000


I'm trying to understand some internal functions that appear in the PAKCS p=
relude. I need to do this because I'm writing a compiler that accepts Flat=
Curry as input, and so these functions appear. I'm sorry if this is docume=
nted somewhere, but I couldn't find it.


--- Non-strict equational constraint. Used to implement functional patterns=
(=:<=) :: a -> a -> Success

And, for reference:

--- The equational constraint.
--- (e1 =:= e2) is satisfiable if both sides e1 and e2 can be
--- reduced to a unifiable data term (i.e., a term without defined
--- function symbols).
(=:=) :: a -> a -> Success

Presumably, =:= is strict. I can't find any difference in behavior bet=
ween these, however. In what sense is =:<= non-strict? I thought perh=
aps this expression would succeed:

                cond ([1 `div` 0] =:<= x) (length x) where x free

But it gives a zero_divisor error. Can anyone provide an example that illu=
strates the difference between these?


--- Non-strict equational constraint for linear functional patterns.
--- Thus, it must be ensured that the first argument is always (after evalu=
--- by narrowing) a linear pattern. Experimental.
(=:<<=) :: a -> a -> Success

I have not seen this appear in any FlatCurry file. Since it is marked as e=
xperimental, I wonder will it ever be generated without a special setting?

--- internal function to implement =:<=
ifVar :: _ -> a -> a -> a

I'd be interested to know how this is used to implement =:<=.

Thanks in advance for any help!


curry mailing list
Received on Sa Mai 16 2015 - 17:40:23 CEST

This archive was generated by hypermail 2.3.0 : Fr Okt 23 2020 - 07:15:04 CEST