Fix a terrible bug in MonadState's state #1

Merged
merged 3 commits into from Apr 23, 2012

Projects

None yet

4 participants

meteficha added some commits Apr 22, 2012
@meteficha meteficha Add -Wall but without warnings about unused imports.
I'm not sure if those unused imports are used by
some older version of GHC, so I won't remove them.
05b0bf2
@meteficha meteficha Fix horrible mistake in MonadState.state's default definition.
This is a trivial mistake in the sense that -Wall gives two
warnings about it:

  Control/Monad/State/Class.hs:62:7:
      Warning: Defined but not used: `s'

  Control/Monad/State/Class.hs:63:16:
      Warning: This binding for `s' shadows the existing binding
                 bound at Control/Monad/State/Class.hs:62:7

However, it caused a very hard-to-track bug in a completely
unrelated library (fb, which depends on http-conduit, which
depends on tls, which depends on mtl).
a60fc26
@meteficha meteficha Fix warning about MonadRWS no having class methods. e7a1eac
@ekmett ekmett merged commit fba7ecb into ekmett:master Apr 23, 2012
@andreasabel

This bug cost me 2 days of shrinking Agda to a program of a few lines. Edward, you owe me a beer!

This brings up the question what can be done about malicious packages such as mtl-2.1 hanging on on hackage and being accepted by cabal install. Cannot you remove this package from hackage? That is probably not enough, there must be a blacklist in the cabal tool for broken packages...

@ekmett
Owner

@andreasabel If you ever in the Boston area I'll treat you to a few rounds. ;)

I admit the inability to mark a package as 'broken, and a really stupid idea to install' is a failing of the current cabal system.

@andreasabel

Great, another reason to come to Boston! Daniel Peebles has also promised me a beer... :)

@ekmett
Owner

Well, if you want to cash in on both offers, you'll probably need to get out here this week. ;)

@copumpkin is moving to Connecticut soon. =(

@copumpkin

Yes! come soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment