[GHC] #8577: Polymorphism and typed TH
#8577: Polymorphism and typed TH ------------------------------------+------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Consider {{{ data A a = A x = [||A||] y = x :: Q (TExp (A Int)) }}} `$$x` is given type `A a`, as expected. However, `$$y` is also given type `A a`. I would expect it to be `A Int`. In other words, given `p :: Q (TExp T1), $$p :: T2` I think GHC should verify the equation `T1 ~ T2`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8577> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8577: Polymorphism and typed TH -------------------------------------+------------------------------------ Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"8b642debfabe00377f47d461d31d70636bf0fce3/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="8b642debfabe00377f47d461d31d70636bf0fce3" Typecheck typed TH splices properly (fix Trac #8577) This was an egregious error. If e :: T (Q ty1) then when we have the splice $e :: ty2 we must ensure that ty1~ty2 before we even think about running the splice! I took the opportunity to remove the dead-code tcSpliceDecls altogether. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8577#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8577: Polymorphism and typed TH -------------------------------------+------------------------------------ Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Simon Peyton Jones <simonpj@…>): In [changeset:"3e66489ebcef0f4cd86968c6781a1d4ad1981f94/testsuite"]: {{{ #!CommitTicketReference repository="testsuite" revision="3e66489ebcef0f4cd86968c6781a1d4ad1981f94" Test Trac #8577 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8577#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8577: Polymorphism and typed TH -------------------------------------+------------------------------------ Reporter: monoidal | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Good catch! A terrible bug. Thanks. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8577#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC