[GHC] #11473: Levity polymorphism checks are inadequate

GHC ghc-devs at haskell.org
Thu Feb 11 20:04:58 UTC 2016


#11473: Levity polymorphism checks are inadequate
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.10.3
      Resolution:                    |             Keywords:
                                     |  LevityPolymorphism, TypeInType
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 What happens with let-bound variables of polymorphic representation?
 Surely we can't allow this:
 {{{
 {-# LANGUAGE TypeInType, ScopedTypeVariables #-}

 import GHC.Types

 app :: forall (l :: Levity) (a :: *) (b :: TYPE l). (a -> b) -> a -> b
 app f x = let y :: b
               y = undefined
           in f x
 }}}

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


More information about the ghc-tickets mailing list