[GHC] #11715: Constraint vs *

GHC ghc-devs at haskell.org
Thu Mar 7 10:15:01 UTC 2019


#11715: Constraint vs *
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1-rc1
  checker)                           |             Keywords:  Typeable,
      Resolution:                    |  LevityPolymorphism, Roles
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #11621, #13742,   |  Differential Rev(s):  Phab:D3316
  #16139, #16148                     |
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by simonpj:

Old description:

> I first noticed something was a bit odd with `Constraint` when chasing
> #11334. Consider this testcase (`-O0` is sufficient),
> {{{#!hs
> import Data.Typeable
>
> main = do
>     print $ typeRep (Proxy :: Proxy Eq)
>     print $ typeOf (Proxy :: Proxy Eq)
> }}}
> With `ghc-8.0` this will produce,
> {{{
> Eq
> Proxy (* -> *) Eq
> }}}
> Notice the second line; GHC seems to be claiming that `Eq :: * -> *`,
> which is clearly nonsense.
>
> I believe this issue may be the cause of some of the testsuite failures
> that I'm seeing on #11011. Unfortunately I haven't the foggiest where
> this issue might originate.
>
> See also
>  * #11621
>  * #12933
>  * #9547
>  * #13931

New description:

 I first noticed something was a bit odd with `Constraint` when chasing
 #11334. Consider this testcase (`-O0` is sufficient),
 {{{#!hs
 import Data.Typeable

 main = do
     print $ typeRep (Proxy :: Proxy Eq)
     print $ typeOf (Proxy :: Proxy Eq)
 }}}
 With `ghc-8.0` this will produce,
 {{{
 Eq
 Proxy (* -> *) Eq
 }}}
 Notice the second line; GHC seems to be claiming that `Eq :: * -> *`,
 which is clearly nonsense.

 I believe this issue may be the cause of some of the testsuite failures
 that I'm seeing on #11011. Unfortunately I haven't the foggiest where this
 issue might originate.

 See also
  * #11621
  * #12933
  * #9547
  * #13931
  * #15918 (about `mkCastTy`)

--

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


More information about the ghc-tickets mailing list