[Git][ghc/ghc][wip/T25647] add Dix6 to T25647_fail

Patrick (@soulomoon) gitlab at gitlab.haskell.org
Thu Feb 6 13:56:05 UTC 2025



Patrick pushed to branch wip/T25647 at Glasgow Haskell Compiler / GHC


Commits:
dec5bfda by Patrick at 2025-02-06T21:55:55+08:00
add Dix6 to T25647_fail

- - - - -


2 changed files:

- testsuite/tests/typecheck/should_compile/T25647_fail.hs
- testsuite/tests/typecheck/should_compile/T25647_fail.stderr


Changes:

=====================================
testsuite/tests/typecheck/should_compile/T25647_fail.hs
=====================================
@@ -15,3 +15,7 @@ newtype Fix2 f :: TYPE r where
 type Fix4a :: forall r. (TYPE r -> TYPE r) -> TYPE r
 newtype Fix4a f where
   In4a :: ff (Fix4a ff) -> Fix4a ff
+
+data family Dix6 :: (k -> TYPE 'IntRep) -> k
+newtype instance Dix6 f where
+  DIn6 :: forall ff. ff (Dix6 ff) -> Dix6 ff


=====================================
testsuite/tests/typecheck/should_compile/T25647_fail.stderr
=====================================
@@ -10,4 +10,14 @@ T25647_fail.hs:17:3: [GHC-89498]
       In4a :: forall (ff :: * -> *).
               ff (Fix4a @LiftedRep ff) -> Fix4a @LiftedRep ff
      In the definition of data constructor ‘In4a’
-      In the newtype declaration for ‘Fix4a’
\ No newline at end of file
+      In the newtype declaration for ‘Fix4a’
+
+T25647_fail.hs:21:3: [GHC-18872]
+     Couldn't match a lifted type with an unlifted type
+      When matching types
+        ff :: TYPE IntRep -> TYPE IntRep
+        f0 :: * -> TYPE IntRep
+      Expected: Dix6 f0
+        Actual: Dix6 ff
+     In the result type of data constructor ‘DIn6’
+      In the newtype family instance declaration for ‘Dix6’
\ No newline at end of file



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/dec5bfda539e865a8f9efe01c222564570c1adb5
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/20250206/02ce04a4/attachment-0001.html>


More information about the ghc-commits mailing list