[GHC] #16311: Suggest -XExistentialQuantification for 'forall' in data declarations

GHC ghc-devs at haskell.org
Tue Feb 12 21:20:56 UTC 2019


#16311: Suggest -XExistentialQuantification for 'forall' in data declarations
-------------------------------------+-------------------------------------
           Reporter:  int-index      |             Owner:  (none)
               Type:  task           |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.6.3
  (Parser)                           |
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Phab:D5180 introduced a slight regression to the error messages. In this
 code

 {{{#!hs
 data T = forall a. MkT a
 }}}

 GHC used to complain

 {{{
 rnfail053.hs:5:10:
     Not a data constructor: ‘forall’
     Perhaps you intended to use ExistentialQuantification
 }}}

 but then the message has become

 {{{
 rnfail053.hs:5:18: error:
     Illegal symbol '.' in type
     Perhaps you intended to use RankNTypes or a similar language
     extension to enable explicit-forall syntax: forall <tvs>. <type>
 }}}

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


More information about the ghc-tickets mailing list