PAKCS Internal Functions

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

Hi,

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.

First:

--- 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?

Next:

--- Non-strict equational constraint for linear functional patterns.
--- Thus, it must be ensured that the first argument is always (after evalu=
tation
--- 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?

Finally:
--- 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!

-Andy




_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Sa Mai 16 2015 - 17:40:23 CEST

This archive was generated by hypermail 2.3.0 : Do Feb 01 2024 - 07:15:12 CET