Please don't deprecate Haskell 98 modules.
Malcolm Wallace
malcolm.wallace at cs.york.ac.uk
Fri Mar 12 16:23:46 EST 2010
> Okay. Who likes importing "Data.List" and "Monad" in the same
> module? Anyone? (I'll believe it if you say yes, because I've an
> inkling of a reason in my head... but you'd better be a real person
> wanting that, not just a hypothetical.)
I have a distinct preference to use the Haskell'98 module names when I
can. Just occasionally, I need a function that was not available in
the Haskell'98 libraries. On such occasions, I might tend to copy the
definition locally into the application itself, rather than import
from base. Even more occasionally, that is not possible, because the
function cannot be defined in pure H'98. Examples include
unsafeInterleaveIO, unsafeCoerce, etc. That is when I find myself
importing e.g. List, Monad, and System.IO.Unsafe next to each other.
> if you depend on haskell98, then you depend on:
> array, base, directory, old-locale, old-time, process, random
> (which indirectly depend on filepath and time, also.)
As I frequently point out, those dependencies only apply to the ghc
compiler. With other compilers, e.g. nhc98, the haskell'98 libraries
underlie all the others. Base depends on haskell98, not the other way
round. I still believe that ghc made a mistake in turning the
dependencies the wrong way. In my opinion, it is one of the main
causes of frequent breakage of libraries/apps that depend on base, and
of the inability to upgrade base in any given version of ghc.
Regards,
Malcolm
More information about the Libraries
mailing list