[GHC] #11452: Typed Template Haskell sneakily allows impredicativity

GHC ghc-devs at haskell.org
Mon Jan 18 13:37:24 UTC 2016


#11452: Typed Template Haskell sneakily allows impredicativity
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.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 goldfire):

 Actually, my original example is OK; that's not impredicative, because the
 `a` can be bound outside the splice. But the following is accepted and
 really is impredicative:

 {{{#!hs
 {-# LANGUAGE RankNTypes, TemplateHaskell #-}

 module Bug where

 impred :: (forall a. a -> a) -> ()
 impred = $$( [|| \_ -> () ||] )
 }}}

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


More information about the ghc-tickets mailing list