Re: Proposal: Simplifying Curry

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Sun, 11 Oct 2015 17:43:54 +0200

On 10/09/2015 02:43 PM, Wolfgang Lux wrote:
>> Prelude> solve $ 1<x && x<=3 where x free
>> {x = 2} True
>> {x = 3} True
>
> Interesting. I guess that behavior doesn't extend to floating point numbers, though. :-)

Yes, you are right. KiCS2 yields an error message if float values
should be guessed. A better behavior would be suspension, but
KiCS2 does not yet support residuation.

> Sounds reasonable to me.
> Now what about a slightly different plan: To preserve compatibility with existing code, we could get rid of the type Success by adding a type synonym
> type Success = Bool
> to the Prelude. We could continue using (=:=) as the name of the unification operation, but it would now have type a -> a -> Bool.

This is a really good idea. I like it since we can keep
the already known names (like "=:=") and smoothly embed
constraint libraries (like CLPFD, CLPR,..) into the new
proposal without any change of the source code.
Only some run-time systems are affected (e.g., in PAKCS
the type Success is hard-wired), but the necessary changes
should be small.

Best regards,

Michael

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry




Received on Do Okt 15 2015 - 17:15:50 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:13 CEST