[Git][ghc/ghc][wip/soulomoon/suggest-UnliftedNewtypes-unlifted-data-family-25593] add test for T25593

Patrick (@soulomoon) gitlab at gitlab.haskell.org
Sat Jan 4 05:26:56 UTC 2025



Patrick pushed to branch wip/soulomoon/suggest-UnliftedNewtypes-unlifted-data-family-25593 at Glasgow Haskell Compiler / GHC


Commits:
6a87294c by Patrick at 2025-01-04T13:26:24+08:00
add test for T25593

- - - - -


2 changed files:

- + testsuite/tests/indexed-types/should_fail/T25593.hs
- + testsuite/tests/indexed-types/should_fail/T25593.stderr


Changes:

=====================================
testsuite/tests/indexed-types/should_fail/T25593.hs
=====================================
@@ -0,0 +1,6 @@
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE TypeFamilies #-}
+import GHC.Exts
+
+data family A s a :: UnliftedType
+newtype instance A s Int = A_Int (MutVar# s Int)


=====================================
testsuite/tests/indexed-types/should_fail/T25593.stderr
=====================================
@@ -0,0 +1,5 @@
+T25593.hs:6:1: [GHC-55233]
+     Newtype instance has non-* return kind ‘UnliftedType’
+     In the newtype instance declaration for ‘A’
+     Suggested fix:
+      Perhaps you intended to use the ‘UnliftedNewtypes’ extension
\ No newline at end of file



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6a87294c0de8c1649d41d3677764a9d0e81d0362
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/20250104/916ad495/attachment.html>


More information about the ghc-commits mailing list