Re: Do notation for arbitrary monads

From: Michael Hanus <>
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,

curry mailing list
Received on Mi Sep 07 2011 - 09:52:56 CEST

This archive was generated by hypermail 2.3.0 : Do Dez 07 2023 - 07:15:14 CET