#2584: Pretty printing of types with HsDocTy goes wrong
---------------------------------+------------------------------------------
    Reporter:  NeilMitchell      |        Owner:  waern           
        Type:  bug               |       Status:  assigned        
    Priority:  high              |    Milestone:  6.10.2          
   Component:  Compiler          |      Version:  6.9             
    Severity:  major             |   Resolution:                  
    Keywords:                    |   Difficulty:  Unknown         
    Testcase:                    |           Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |  
---------------------------------+------------------------------------------
Comment (by NeilMitchell):

 I have now worked around this bug in Hoogle, in quite a clean way, so this
 no longer effects development builds of Hoogle. If I had been able to use
 SYB the workaround would have been 15x shorter and much more robust...

 I did track the bug down somewhat in GHC - see compiler\hsSyn\HsTypes.lhs,
 line 379:

 {{{
 ppr_mono_ty _         (HsDocTy ty doc)
   = ppr ty <+> ppr (unLoc doc)
 }}}

 All the other ppr_mono_ty functions have a maybeParen call first, which is
 missing here. You'll need to figure out the relative priorities etc. Or
 perhaps just remove HsDocTy's when pretty printing?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2584#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to