[GHC] #9634: "data X = 1": "Illegal literal in type (use DataKinds to enable): 1"

GHC ghc-devs at haskell.org
Fri Sep 26 00:45:19 UTC 2014


#9634: "data X = 1": "Illegal literal in type (use DataKinds to enable): 1"
-------------------------------------+-------------------------------------
       Reporter:  rwbarton           |                   Owner:
           Type:  bug                |                  Status:  new
       Priority:  low                |               Milestone:
      Component:  Compiler (Type     |                 Version:  7.9
  checker)                           |        Operating System:
       Keywords:                     |  Unknown/Multiple
   Architecture:  Unknown/Multiple   |         Type of failure:
     Difficulty:  Unknown            |  None/Unknown
     Blocked By:                     |               Test Case:
Related Tickets:                     |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
 This error message is not good. "1" is not in a type position, and
 DataKinds will not help anything. Well, except the error message, which
 with DataKinds enabled is instead
 {{{
 parse error in constructor in data/newtype declaration: 1
 }}}

 If it's not hard, we should give that error message also when DataKinds is
 disabled.

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


More information about the ghc-tickets mailing list