Proposal: Add concatMapM function (#2042)
Ketil Malde
ketil+haskell at ii.uib.no
Fri Feb 1 08:29:02 EST 2008
Bulat Ziganshin <bulat.ziganshin at gmail.com> writes:
> may be it's too draconian restriction but i proposed just to use new
> library in the new code.
For backwards compatibility, I agree it would be preferable to retain
the current default implementation, but opinions appear to differ.
Whatever.
> f <- openFile "name"
> content <- readLine f -- read first line using Latin-1
> f' <- withEncoding (lookup content) f
> str <- readLine f' -- read second line using encoding given on first line
This is clear enough, but for the BOM-dependent decoding, you may have
to do the equivalent of having the next call to 'readLine' re-read the
first line instead.
-k
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Libraries
mailing list