[Haskell-cafe] GHCi infers a type but refuses it as type signature

Luke Palmer lrpalmer at gmail.com
Tue Jun 23 05:34:09 EDT 2009

On Tue, Jun 23, 2009 at 2:20 AM, <papa.eric at free.fr> wrote:

> > Simple: the definition of MonadState uses those extensions.
> Thanks, yes it helps and explains all. :^)
> I suppose then that if -XFlexibleContexts is indeed required by the
> standard libraries, it is a "safe" extension, meaning supported by all
> compilers? Are many such extensions de-facto standard that anyone can enable
> by default?

Now to answer your question, with 50% less idealistic ranting!

There is definitely a canon of "safe" extensions in the community.
 Hierarchical libraries (that's not even an -X flag, it's just on),
multiparam typeclasses, fundeps are among them.  I can't say whether
FlexibleContexts is.

However, your question is rather moot here, as you are using the *mtl.  *It
uses UndecidableInstances, whose blessing into the de facto standard would
require as a precondition the batshit-insanity of the de facto community.

I personally use *transformers* as my monad library, as it is (as far as I
know) the only Haskell 98 monad library on Hackage (you'll hardly notice the
more explicit lifts, I promise!).  However, looking a bit more
optimistically into the future, I'd say *mmtl *is the "most likely to
succeed", since it solves the combinatorical explosion problem which haunts
all the other monad libraries (and at least avoids the extensions which are
doomed to failure).

Anyway, it is never too early to free yourself of mtl.  Look at the monad
libraries on hackage and weigh their pros and cons; the only thing special
about mtl is its mediocrity.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090623/731aa0bc/attachment.html

More information about the Haskell-Cafe mailing list