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

GHC ghc-devs at haskell.org
Wed Jan 27 14:33:12 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 Richard Eisenberg <eir@…>):

 In [changeset:"00cbbab3362578df44851442408a8b91a2a769fa/ghc"
 00cbbab3/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="00cbbab3362578df44851442408a8b91a2a769fa"
 Refactor the typechecker to use ExpTypes.

 The idea here is described in [wiki:Typechecker]. Briefly,
 this refactor keeps solid track of "synthesis" mode vs
 "checking" in GHC's bidirectional type-checking algorithm.
 When in synthesis mode, the expected type is just an IORef
 to write to.

 In addition, this patch does a significant reworking of
 RebindableSyntax, allowing much more freedom in the types
 of the rebindable operators. For example, we can now have
 `negate :: Int -> Bool` and
 `(>>=) :: m a -> (forall x. a x -> m b) -> m b`. The magic
 is in tcSyntaxOp.

 This addresses tickets #11397, #11452, and #11458.

 Tests:
   typecheck/should_compile/{RebindHR,RebindNegate,T11397,T11458}
   th/T11452
 }}}

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


More information about the ghc-tickets mailing list