Re: [GHC] #7730: :info and polykinds

#7730: :info and polykinds --------------------------------------------+------------------------------ Reporter: monoidal | Owner: archblob Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler (Type checker) | Version: 7.6.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: | Difficulty: Unknown Blocking: | Blocked By: | Related Tickets: #8776 --------------------------------------------+------------------------------ Comment (by archblob): I started implementing this and printing through ``` IfaceDecl ``` directly as you suggested is the easier way and it turns out we don't really need to add any more information, all we need for printing properly is already there. Now before I go any further we need to discuss the approach I have taken and if it needs changing. Right now I'm exporting ``` pprIfaceDecl ``` from ``` IfaceSyn ``` and I've modified it to look like this ``` pprIfaceDecl :: Maybe ShowSub -> IfaceDecl -> SDoc ``` this allows us to decide how we print things, if the first argument is ``` Nothing ``` we print ``` IfaceDecl ``` the old way. This will polute the ``` IfaceDecl ``` printing function with stuff destined for GHCi printing but it has the advantage that there are a lot of places where the printing is the same and a lot of code from pprTyThing will no longer be necessary. Another aproach is to write a separate ``` IfaceDecl ``` printing function for use in GHCi, but while keeping things separate this will lead to a lot of duplication. If you think that I should take the second aproach, or another that I did not consider please tell me and I will implement it. Thank you, Andrei -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7730#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC