Simplification of instances

Hi, was there a change in how GHC simplifies instances sometime between 7.4.1 and 7.6.1? Haddock used to produce this: http://hackage.haskell.org/packages/archive/kan-extensions/2.7/doc/html/Data... but is now producing this: http://hackage.haskell.org/packages/archive/kan-extensions/3.1/doc/html/Data... Haddock uses tcRnGetInfo to get the instances. Thanks, David

Ahem. DFuns (what you get from is_dfun of a ClsInst) now have some "silent" arguments, that are added by GHC and are not part of the original instance declaration. See Note [Silent superclass arguments] in TcInstDcls. But you don't want to print them. Just do what InstEnv.pprInstanceHdr does (in InstEnv) to drop the silent arguments. I've added some more comments (commit to come). Simon | -----Original Message----- | From: glasgow-haskell-users-bounces@haskell.org [mailto:glasgow-haskell- | users-bounces@haskell.org] On Behalf Of David Waern | Sent: 28 September 2012 10:03 | To: glasgow-haskell-users@haskell.org | Subject: Simplification of instances | | Hi, | | was there a change in how GHC simplifies instances sometime between | 7.4.1 and 7.6.1? Haddock used to produce this: | | http://hackage.haskell.org/packages/archive/kan- | extensions/2.7/doc/html/Data-Functor-Yoneda.html | | but is now producing this: | | http://hackage.haskell.org/packages/archive/kan- | extensions/3.1/doc/html/Data-Functor-Yoneda.html | | Haddock uses tcRnGetInfo to get the instances. | | Thanks, | David | | _______________________________________________ | Glasgow-haskell-users mailing list | Glasgow-haskell-users@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

2012/9/28 Simon Peyton-Jones
Ahem. DFuns (what you get from is_dfun of a ClsInst) now have some "silent" arguments, that are added by GHC and are not part of the original instance declaration. See Note [Silent superclass arguments] in TcInstDcls.
But you don't want to print them. Just do what InstEnv.pprInstanceHdr does (in InstEnv) to drop the silent arguments.
I've added some more comments (commit to come).
Thanks! I've written a Haddock patch that drops the arguments. David
participants (2)
-
David Waern
-
Simon Peyton-Jones