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

Wei Hu wei.hoo at gmail.com
Thu Jun 25 12:22:36 EDT 2009

OK, I found two papers by the author, Mauro Jaskelioff, that seem
relevant. One paper "Modular Monad Transformers" is all category
theoretical. Maybe I should read the other one "Monatron: An
Extensible Monad Transformer Library".

On Thu, Jun 25, 2009 at 12:17 PM, Wei Hu<wei.hoo at gmail.com> wrote:
> Could you or anyone else briefly explain how mmtl solves the
> combinatorical explosion problem? Reading the source code is not very
> productive for newbies like me. Thanks!
> On Tue, Jun 23, 2009 at 5:34 AM, Luke Palmer<lrpalmer at gmail.com> wrote:
>> 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.
>> Luke
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list