[Haskell-cafe] extending Do notation

Tillmann Rendel rendel at informatik.uni-marburg.de
Tue May 20 18:44:18 UTC 2014


silvio wrote:
>  [...] This should cover the lambda
> question and the nested question.

No, I don't understand how this covers the lambda case. For example, how 
is the following desugared:

   do print (map (\name -> {readFile name}) ["foo", "bar"])

It would be convenient if this would mean something like:

   do contents <- mapM (\name -> readFile name) ["foo", "bar"]
      print contents

But I don't understand how the implementation you propose can figure 
this out.


More information about the Haskell-Cafe mailing list