[GHC] #15825: Core Lint error from Explicit Foralls Proposal

GHC ghc-devs at haskell.org
Mon Oct 29 10:50:27 UTC 2018


#15825: Core Lint error from Explicit Foralls Proposal
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.6.1
      Resolution:                    |             Keywords:
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 RyanGlScott):

 This is fixed on GHC HEAD as of commit
 5e45ad10ffca1ad175b10f6ef3327e1ed8ba25f3 (Finish fix for #14880.). It now
 gives a proper error message:

 {{{
 $ ghc2/inplace/bin/ghc-stage2 --interactive Bug.hs -fprint-explicit-kinds
 GHCi, version 8.7.20181029: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling Main             ( Bug.hs, interpreted )

 Bug.hs:12:29: error:
     • Illegal type synonym family application ‘GHC.Types.Any
                                                  k’ in instance:
         X (a (GHC.Types.Any k))
     • In the instance declaration for ‘X (a :: *)’
    |
 12 | instance forall (a :: C k). X (a :: *)
    |                             ^^^^^^^^^^
 }}}

 TODO: Check this program in as a test case.

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


More information about the ghc-tickets mailing list