[GHC] #8776: Displaying pattern synonym for a GADT

GHC ghc-devs at haskell.org
Fri Mar 14 09:21:16 UTC 2014


#8776: Displaying pattern synonym for a GADT
-------------------------------------+------------------------------------
        Reporter:  monoidal          |            Owner:  cactus
            Type:  bug               |           Status:  merge
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by simonpj):

 Gergo, it's all fine, but just needs a bit more refactoring:

  * `PprTyThing.pprTypeForUser` consults a flag `-fprint-explicit-foralls`
 to see whether to print the foralls.

  * So we should call `pprTypeForUser` when printing types in `IfaceDecls`
 (since we are now converting `TyThings` to `IfaceDecls` before printing.

  * That means moving `pprTypeForUser` to `IfaceSyn`; or perhaps even all
 the way into `TypeRep` with the other type-printing machinery.

  * Currently `pprTypeForUser` also tidies the type.  That is not necessary
 (and therefore confusing) when printing `IfaceDecls` since they are
 already tidy.  It is only necessary for the calls in `ghc/InteractiveUI`
 where we print un-tidy types and kinds.  So we could do with a variant
 (even locally in `InteractiveUI` that tides the type and then calls
 `pprTypeForUser`, where the latter no longer does tidying).

 Does that make sense?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8776#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list