[Git][ghc/ghc][master] Add a regression test for #13981

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu May 25 07:30:49 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
5a07d94a by Krzysztof Gogolewski at 2023-05-25T03:30:20-04:00
Add a regression test for #13981

The panic was fixed by 6998772043a7f0b. Fixes #13981.

- - - - -


7 changed files:

- + testsuite/tests/typecheck/should_fail/T13981A.hs
- + testsuite/tests/typecheck/should_fail/T13981A.hs-boot
- + testsuite/tests/typecheck/should_fail/T13981A.stderr
- + testsuite/tests/typecheck/should_fail/T13981B.hs
- + testsuite/tests/typecheck/should_fail/T13981C.hs
- + testsuite/tests/typecheck/should_fail/T13981F.hs
- testsuite/tests/typecheck/should_fail/all.T


Changes:

=====================================
testsuite/tests/typecheck/should_fail/T13981A.hs
=====================================
@@ -0,0 +1,5 @@
+module T13981A where
+import T13981B
+import T13981C
+
+data T = T


=====================================
testsuite/tests/typecheck/should_fail/T13981A.hs-boot
=====================================
@@ -0,0 +1,2 @@
+module T13981A where
+data T


=====================================
testsuite/tests/typecheck/should_fail/T13981A.stderr
=====================================
@@ -0,0 +1,5 @@
+
+T13981A.hs:1:1: error: [GHC-34447]
+    Conflicting family instance declarations:
+      T13981F.F T13981A.T = Int -- Defined in module T13981B
+      T13981F.F T13981A.T = Bool -- Defined in module T13981C


=====================================
testsuite/tests/typecheck/should_fail/T13981B.hs
=====================================
@@ -0,0 +1,5 @@
+{-# LANGUAGE TypeFamilies #-}
+module T13981B where
+import {-# SOURCE #-} T13981A
+import T13981F
+type instance F T = Int


=====================================
testsuite/tests/typecheck/should_fail/T13981C.hs
=====================================
@@ -0,0 +1,5 @@
+{-# LANGUAGE TypeFamilies #-}
+module T13981C where
+import {-# SOURCE #-} T13981A
+import T13981F
+type instance F T = Bool


=====================================
testsuite/tests/typecheck/should_fail/T13981F.hs
=====================================
@@ -0,0 +1,4 @@
+{-# LANGUAGE TypeFamilies #-}
+module T13981F where
+import Data.Kind
+type family F a :: Type


=====================================
testsuite/tests/typecheck/should_fail/all.T
=====================================
@@ -684,3 +684,4 @@ test('CommonFieldResultTypeMismatch', normal, compile_fail, [''])
 test('CommonFieldTypeMismatch', normal, compile_fail, [''])
 test('T17284', normal, compile_fail, [''])
 test('T23427', normal, compile_fail, [''])
+test('T13981A', [extra_files(['T13981A.hs-boot', 'T13981B.hs', 'T13981C.hs', 'T13981F.hs'])], multimod_compile_fail, ['T13981A', '-v0'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5a07d94a037876f61eb17dbf4401074a50509f3b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5a07d94a037876f61eb17dbf4401074a50509f3b
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230525/bc66de87/attachment-0001.html>


More information about the ghc-commits mailing list