Commit f3def764 authored by bollmann's avatar bollmann Committed by Ben Gamari

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
parent 30ee9102
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TemplateHaskell #-}
module T11145 where
data family Fuggle x y
[d| data instance Fuggle Int (Maybe (a,b)) where
MkFuggle :: Fuggle Int (Maybe Bool) |]
T11145.hs:8:1: error:
• Data constructor ‘MkFuggle’ returns type ‘Fuggle
Int (Maybe Bool)’
instead of an instance of its parent type ‘Fuggle
Int (Maybe (a_a4MU, b_a4MV))’
• In the definition of data constructor ‘MkFuggle’
In the data instance declaration for ‘Fuggle’
......@@ -396,3 +396,4 @@ test('TH_finalizer', normal, compile, ['-v0'])
test('T10603', normal, compile, ['-ddump-splices -dsuppress-uniques'])
test('T11452', normal, compile_fail, ['-v0'])
test('T9022', normal, compile_and_run, ['-v0'])
test('T11145', normal, compile_fail, ['-v0'])
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment