Re: curry on windows (was: encapsulated search)

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Wed, 09 May 2007 17:30:55 +0200

Claus Reinke wrote:
> after a few more changes, the build goes through, and i can load
> my simple curry program into pakcs. there are still some bugs in
> the process, and some things don't work (that is one reason for
> some of the debug output still being enabled). but it is a start.

Congratulations!

> btw, i'd still be curious to know whether pakcs' behaviour in the
> last examples below is expected (see comments), and why?

> -- why is there a functional type expected here?
> Encap> let x=1 in x
> ERROR: Type error in application: 1 _G4792

Sorry for the bad error message, but PAKCS allows only
"let <var>=<exp>" bindings in the top level. Thus, your
input is interpreted as "let x = ((1 in) x)" which explains
the error message that "1" is not of functional type.

> -- why is the parameter of wrap evaluated here??
> -- wrap g f = f g
> Encap> let x free in (wrap (x=:=0?x=:=1),x)
> Free variables in goal: x
> Result: (wrap success,0)

Since partial applications are considered as constructor terms
so that the normal form of it requires the evaluation of the
arguments.

> -- there should be no demand for wrap's parameter here?
> Encap> let x free in wrap (x=:=0?x=:=1)

See above.
>
> -- this is more what i expected
> Encap> let x free in length [wrap (x=:=0?x=:=1)]
> Free variables in goal: x
> Result: 1

Here, the partial application is not part of the normal form.

Best regards,

Michael

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Mai 09 2007 - 18:08:02 CEST

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