| :browse uses printTyThingInContext, which avoids | dealing with the nested foralls in the type representation, | but still can give erroneous information when dropping | foralls
Claus I've committed a patch that fixes printing for classes etc (the bug you found). Instead of using dropForAlls, you can now use PprTyThing.pprTypeForUser. I hope that helps. Simon | -----Original Message----- | From: Claus Reinke [mailto:[EMAIL PROTECTED] | Sent: 11 September 2007 16:51 | To: Simon Peyton-Jones; [email protected] | Cc: Simon Marlow | Subject: patches/diffs for full :browse! (fixes most of #1617) | | please find attached the diffs and files for implementing :browse!, | a slightly more detailed variant of :browse. from the user guide: | | If the ! symbol is appended to the command, data | constructors and class methods will be listed individually, | otherwise, they will only be listed in the context of their | data type or class declaration. The !-form also annotates | the listing with comments giving possible imports for each | group of entries. | | [note: giving the import information would also be useful for :info] | | i've just done a rebuild and test (fast stage=2) and there seem | to be no adverse effects (although i wonder whether the new | getGRE in GHC.hs shouldn't be exported all the time, to avoid | a warning?). | | this fixes the first two issues mentioned in #1617, namely | listing children with their full types, and providing import | information for unqualified identifiers. the third issue, that | reload doesn't seem to update :browse information, remains. | | there are still some issues with :browse in general, which are | mostly shared by :browse!, but are not specific to the new | functionality, including: | | - printing TyThings for class methods seems troublesome; | | :browse uses printTyThingInContext, which avoids | dealing with the nested foralls in the type representation, | but still can give erroneous information when dropping | foralls | | :browse! uses printTyThing for classes, which results | in the same issue, but uses exprType to list individual | class methods (this workaround should be temporary, | until the printTyThingies are fixed, at least it gives valid | types, but with possibly simplified contexts, rather than | the precise form given by the user) | | - :browse[!] should only list children if their parent is | imported as Parent(..), not otherwise | | - the order of entries is strangely incoherent | | please adopt for head and stable. | | thanks, | claus _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
