[GHC] #4009: can newtype be extended to permit GADT-like declarations

GHC ghc-devs at haskell.org
Fri Mar 9 10:22:49 UTC 2018


#4009: can newtype be extended to permit GADT-like declarations
-------------------------------------+-------------------------------------
        Reporter:  nr                |                Owner:  simonpj
            Type:  feature request   |               Status:  closed
        Priority:  normal            |            Milestone:  7.0.1
       Component:  Compiler (Type    |              Version:  6.12.1
  checker)                           |
      Resolution:  invalid           |             Keywords:  newtype GADT
Operating System:  Linux             |         Architecture:  x86
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by sighingnow):

 In ghc-8.2.1 and ghc-head, `newtype` definition in comment:2 is
 disallowed. But The following definition is accepted by GHC:

 {{{#!hs
 newtype T a where
    MkT :: a -> T a
 }}}

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


More information about the ghc-tickets mailing list