[GHC] #11246: Regression typechecking type synonym which includes `Any`.

GHC ghc-devs at haskell.org
Thu Dec 17 20:25:14 UTC 2015


#11246: Regression typechecking type synonym which includes `Any`.
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      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:                    |
-------------------------------------+-------------------------------------

Old description:

> {{{
> module Foo where
>
> import GHC.Exts
>
> type Key a = Any
> }}}
>
> produces the error message on HEAD but compiles on 7.8.3 and 7.10.1
> (thanks to Reid for testing).
>
> {{{unsafeany.hs:5:1: error:
>     • The type family ‘Any’ should have no arguments, but has been given
> none
>     • In the type synonym declaration for ‘Key’
> Failed, modules loaded: none.
> }}}

New description:

 {{{
 module Foo where

 import GHC.Exts

 type Key a = Any
 }}}

 produces the error message on HEAD but compiles on 7.8.3 and 7.10.1
 (thanks to Reid for testing).

 {{{
 unsafeany.hs:5:1: error:
     • The type family ‘Any’ should have no arguments, but has been given
 none
     • In the type synonym declaration for ‘Key’
 Failed, modules loaded: none.
 }}}

--

Comment (by mpickering):

 Omer comments that the bug could be caused by levity polymorphism.

 > mpickering: I don't quite understand what changes need to be made, but
 if you look at anyTyCon in TysPrim.hs you'll see that it's not updated
 after Richard's patch. I'm just guessing that this may be the reason
 because tuple tycons are changed to update the kind arguments, for
 example.

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


More information about the ghc-tickets mailing list