Re: Do notation for arbitrary monads

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Wed, 07 Sep 2011 09:51:37 +0200

Sebastian Fischer wrote at September 7 (10:23):
> how difficult would it be to desugar do-notation into *unqualified* calls of
> >>= and return to use whatever definitions are in scope? If type checking
> and name resolution is done after desugaring do-notation it seems not too
> difficult..

In the current implementation, desugaring comes after type checking
and name resolution, so this is not so easy to do.
On the other hand, I think this would not help so much
since I often use custom monads in places where also
the IO monad is present (e.g., in order to print the results).
Thus, for custom monads I also use my versions of ">>=" etc
without the do-notation.

Best regards,

Michael
_______________________________________________
curry mailing list
curry_at_lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/curry
Received on Mi Sep 07 2011 - 09:52:56 CEST

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