Proposal: Add concatMapM function (#2042)

Henning Thielemann lemming at henning-thielemann.de
Fri Feb 1 09:07:44 EST 2008


On Sat, 2 Feb 2008, Roman Leshchinskiy wrote:

> Bulat Ziganshin wrote:
> > Hello Roman,
> >
> > Friday, February 1, 2008, 11:03:36 AM, you wrote:
> >
> >>> the right way to deal with "modifiers" is to attach them to the Handle
> >>> itself like this:
> >>>
> >>> f <- openFile "name" >>= withLocking >>= withEncoding utf8
> >
> >> IMO, global state is never "the right way" if it can be avoided. It will
> >> always lead to problems. Especially in a functional language like Haskell.
> >
> > so you propose something like this:
> >
> > s <- readString "/path/filename" TextMode "utf8" line_num
>
> No. In my view, file handles and encodings exist on completely different
> levels of abstraction.


What about changing the subject in order to preserve the thread for
further contributions to the concatMapM issue?


More information about the Libraries mailing list