transformers 0.4: change in accessor function exports?

Joachim Breitner mail at joachim-breitner.de
Wed May 7 08:49:36 UTC 2014


Hi,

Am Mittwoch, den 07.05.2014, 08:33 +0200 schrieb Henning Thielemann:
> Am 07.05.2014 01:03, schrieb John Lato:
> > I don't really care one way or the other how this is resolved, but does
> > it strike anyone else that current practices must be remarkably fragile
> > for such a minor change (which doesn't even change exported names!) to
> > supposedly cause so much breakage?
> 
> With qualified imports there would be no breakage ...
> 
> However, names in mtl and thus transformers were not designed for 
> qualified import. :-(

would it? 

/tmp $ echo 'module Foo where newtype Foo = Foo {unFoo :: ()}' > Foo.hs
/tmp $ echo 'module Bar where import qualified Foo (Foo(..)) ; bar = Foo.unFoo' > Bar.hs
/tmp $ ghc -c Foo.hs; ghc -c Bar.hs 
/tmp $ echo 'module Foo where newtype Foo = Foo (); unFoo (Foo x) = x ' > Foo.hs
/tmp $ ghc -c Foo.hs; ghc -c Bar.hs 

Bar.hs:1:57: Not in scope: `Foo.unFoo'

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at debian.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140507/94b44abe/attachment.sig>


More information about the Libraries mailing list