[GHC] #15674: GADT's displayed type is misleading

GHC ghc-devs at haskell.org
Tue Sep 25 14:53:23 UTC 2018


#15674: GADT's displayed type is misleading
-------------------------------------+-------------------------------------
        Reporter:  AntC              |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.6.1-beta1
      Resolution:                    |             Keywords:
Operating System:  Windows           |         Architecture:  x86_64
 Type of failure:  Poor/confusing    |  (amd64)
  error message                      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by monoidal):

 One way to see the difference is to define

 {{{
 pattern PDG a = MkDG a
 pattern PDG2 a = MkDG2 a
 pattern PDF a = MkDF a
 }}}

 then `:i PDG PDG2 PDF` will show

 {{{
 pattern PDG :: () => (a ~ Int) => Int -> DG a
         -- Defined at GA.hs:8:1
 pattern PDG2 :: () => (a ~ Int) => a -> DG a
         -- Defined at GA.hs:9:1
 pattern PDF :: Int -> DF Int    -- Defined at GA.hs:10:1
 }}}

 Should we show this and how? I don't know.

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


More information about the ghc-tickets mailing list