[GHC] #10607: Auto derive from top to bottom

GHC ghc-devs at haskell.org
Thu Feb 23 15:19:41 UTC 2017


#10607: Auto derive from top to bottom
-------------------------------------+-------------------------------------
        Reporter:  songzh            |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:  deriving,
                                     |  typeclass, auto
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Sounds reasonable.

 > (Syntax bikeshedding is welcome.)

 Well, since you asked... how about `deriving instance _ => C (T a b c)`,
 which is currently accepted by the parser (and probably won't be too
 taxing for other tools) but rejected later with the error
 {{{
 C.hs:8:19: error:
     Wildcard ā€˜_ā€™ not allowed
       in In a deriving declaration for ā€˜Cā€™
   |
 8 | deriving instance _ => C (T a b c)
   |                   ^
 }}}

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


More information about the ghc-tickets mailing list