Re: New PAKCS release (Version 1.8.0)

From: Wolfgang Lux <wlux_at_uni-muenster.de>
Date: Fri, 30 Mar 2007 14:39:56 +0200

Bernd Brassel wrote:

> Francisco Javier López Fraguas wrote:
>> Consider the program
> I think the following example is at least curious (Sorry that it is
> not
> Toy Syntax):
>
> module M1 where
> data A = A
>
> f A = A
>
> isF x =
> case x of
> f -> True
> _ -> False
>
> test = let x free in isF x=:=False
>
> module M2
> import M1
>
> g A = A
>
> Now, importing just M1, the expression M1.test fails. Importing M2
> also
> makes it succeed with [x/g]. I think it is curious that you should be
> able to manipulate the behaviour of modules from the outside like
> this.

Sorry, but that is wrong. Since you are using a case expression (which
should remain rigid after introducing partial patterns), the expression
isF x will simply suspend. So, it does not make a difference whether g
is in scope or even part of the program or not.

Regards
Wolfgang



_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Apr 11 2007 - 11:56:07 CEST

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