[Haskell-cafe] Removing mtl from the Haskell Platform
Don Stewart
dons at galois.com
Tue May 12 22:52:28 EDT 2009
(Platform discussion on libraries@ please)
Right, so the Haskell Platform can be a mechanism by which we move the
community forward.
You could propose to remove mtl (which would involve deprecating for a major
(or two? or many more?) releases, before we actually rip it out.
Equivalent functionality for something so fundamental would also have to
be found.
We would need a new monad library, documented, in use, with a migration
story for developers ideally. Identifying the candidate that provides
equivalent functionality (and better) is strongly desirable.
File a ticket, so we don't forget you've proposed this.
http://trac.haskell.org/haskell-platform/wiki
-- Don
roconnor:
> I wanted to pass this idea around the cafe to get some thoughts before
> submitting a trac on this topic.
>
> I'd like to see the mtl removed from the Haskell Platform.
>
> The mtl was a tremendous step forward when it was developed. However, we
> have learned a few things about monad transformers since the development
> of the mtl, and it is time that we moved forward.
>
> There are at least 3 significant problem with the mtl.
>
> 1) `pass' should not be a member functions of the MonadWriter class. It
> is my understanding that there is no `MonadWriter w m => MonadWriter w
> (ContT s m)' instance because the `pass' function cannot be implemented.
> I'm also highly suspicious of some other methods too (I'm looking at you
> `local').
>
> 2) The `StateT s (Cont r a)' instance of callCC is wrong. The paper on
> modular monad transformers
> <http://www.cs.nott.ac.uk/~mjj/pubs/mmt/mmt.pdf> describes why this is
> wrong.
>
> 3) I am told by many people that the order of the state and value pair in
> `State' is backwards. Actually, I'm not entirely sure what the issue is
> here, but I trust the people who say this.
>
> I think that use of the mtl should be deprecated so that we move on to
> improved monad transformer libraries. Having the mtl in the Haskell
> Platform does the opposite by further entrenching its use, possibly to
> the point where we may not be able to get rid of it for years.
>
> If I had to recommend a replace library, I would pick monadLib. However,
> there are other libraries, such as the mmtl and transformers and it's
> related packages that I haven't looked at, and may also make fine
> replacements for the mtl.
>
> --
> Russell O'Connor <http://r6.ca/>
> ``All talk about `theft,''' the general counsel of the American Graphophone
> Company wrote, ``is the merest claptrap, for there exists no property in
> ideas musical, literary or artistic, except as defined by statute.''
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Libraries
mailing list