Re: Another parser combinator problem

From: Wolfgang Lux <wlux_at_uni-muenster.de>
Date: Mon, 25 Feb 2008 09:11:49 +0100

Nikolay Orlyuk wrote:

> Sorry now I'm pretty sure thats the reason is:
> > errs `le` S(S Z) & errs =:= errs1 `plus` errs2 where errs,errs1
> ,errs2 free
> {errs = Z, errs1 = Z, errs2 = Z}
> More solutions? [Y(es)/n(o)/a(ll)] a
> {errs = S Z, errs1 = Z, errs2 = S Z} | {errs = S Z, errs1 = S Z,
> errs2 = Z} | {errs = S (S Z), errs1 = Z, errs2 = S (S Z)} | {errs =
> S (S Z), errs1 = S Z, errs2 = S Z} | {errs = S (S Z), errs1 = S (S
> Z), errs2 = Z}
>
> errs2 is not unknown. Thats causes "p2 xs'=:=(xs'',errs2)" to lose
> lazyness earlier than xs'' (when placed after restriction on
> errors) and refer to p2 too early to say that we didn't maked by
> errs1.
>
> Try another implementation of curry, because I think that first
> solution should look like {errs = Z, errs1 = Z, errs2 = _any }

Of course MCC is correct here :-), otherwise the constraint errs =:=
errs1 `plus` errs2 would be violated.

Regards
Wolfgang

_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mo Feb 25 2008 - 16:45:54 CET

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