[GHC] #11145: Template Haskell quotes of data instance GADTs is totally broken
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template | Version: 7.10.2 Haskell | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When I say {{{ data family Fuggle x y [d| data instance Fuggle Int (Maybe (a,b)) where MkFuggle :: Fuggle Int (Maybe Bool) |] }}} I get (with `-ddump-splices`) {{{ [d| data instance Fuggle Int (Maybe (a_ajz6, b_ajz7)) where MkFuggle_ajz5 :: Fuggle Int (Maybe Bool) |] ======> data instance Fuggle Int (Maybe (a_ajAf, b_ajAg)) = (b_ajAg ~ Maybe Bool, a_ajAf ~ Int) => MkFuggle_ajAe }}} But that's not at all what I said! Admittedly, what I said was garbage, but it should fail outright. Is this addressed by Phab:D1465? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: GADTs 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 bollmann): while this problem persists in `7.10.3`, it is not present in `HEAD` (aea1e5db...) anymore. In the latter, the raised error is: {{{ ghc-stage2 Fuggle.hs -XTemplateHaskell -ddump-splices [1 of 1] Compiling Fuggle ( Fuggle.hs, Fuggle.o ) Fuggle.hs:(9,1)-(10,44): Splicing declarations [d| data instance Fuggle Int (Maybe (a_ap6, b_ap7)) where MkFuggle_ap5 :: Fuggle Int (Maybe Bool) |] ======> data instance Fuggle Int (Maybe (a_a4RB, b_a4RC)) where MkFuggle_a4RA :: Fuggle Int (Maybe Bool) Fuggle.hs:9:1: error: • Data constructor ‘MkFuggle’ returns type ‘Fuggle Int (Maybe Bool)’ instead of an instance of its parent type ‘Fuggle Int (Maybe (a_a4RB, b_a4RC))’ • In the definition of data constructor ‘MkFuggle’ In the data instance declaration for ‘Fuggle’ }}} So it seems to have been fixed (I don't know whether it was Phab:D1465 or something else, though) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: GADTs 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): Thanks for checking! Now all we need is a regression test. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bollmann Type: bug | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: GADTs Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bollmann): * owner: => bollmann Comment: ok, I will add the regression test from above in due course. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bollmann Type: bug | Status: patch Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: GADTs Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1978 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bollmann): * status: new => patch * differential: => Phab:D1978 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bollmann Type: bug | Status: patch Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: GADTs Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1978 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"f3def7643d390db54d18b8c3d385c490fba58a41/ghc" f3def76/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="f3def7643d390db54d18b8c3d385c490fba58a41" add regression test for #11145. The original TH failure observed by the ticket, namely that Template Haskell quotes of data instance GADTs are broken, is not observable anymore in HEAD. I therefore just added the corresponding regression test. Test Plan: ./validate Reviewers: goldfire, austin, thomie, jstolarek, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1978 GHC Trac Issues: #11145 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bollmann Type: bug | Status: patch Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: | Keywords: GADTs Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1978 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"e57b9ffee858278bf1ef8ed0754346685334b9ba/ghc" e57b9ffe/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="e57b9ffee858278bf1ef8ed0754346685334b9ba" Fix regression test for #11145. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2032 GHC Trac Issues: #11145 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11145: Template Haskell quotes of data instance GADTs is totally broken -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bollmann Type: bug | Status: closed Priority: normal | Milestone: Component: Template Haskell | Version: 7.10.2 Resolution: fixed | Keywords: GADTs Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1978 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bollmann): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11145#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC