[Git][ghc/ghc][wip/soulomoon/suggest-UnliftedNewtypes-unlifted-data-family-25593] add more examples to dataInstanceKindsDefaults
Patrick (@soulomoon)
gitlab at gitlab.haskell.org
Wed Jan 8 04:46:18 UTC 2025
Patrick pushed to branch wip/soulomoon/suggest-UnliftedNewtypes-unlifted-data-family-25593 at Glasgow Haskell Compiler / GHC
Commits:
99d1a41c by Patrick at 2025-01-08T12:46:09+08:00
add more examples to dataInstanceKindsDefaults
- - - - -
1 changed file:
- testsuite/tests/indexed-types/should_compile/dataInstanceKindsDefaults.hs
Changes:
=====================================
testsuite/tests/indexed-types/should_compile/dataInstanceKindsDefaults.hs
=====================================
@@ -1,16 +1,22 @@
{-# language DataKinds, PolyKinds, GADTs, TypeFamilies, RankNTypes,
TypeOperators, ConstraintKinds #-}
-module dataInstanceKindsDefaults where
+module DataInstanceKindsDefaults where
import Data.Kind
-- this test check if we defaults the kind of the data instance correctly
-- error would be caught by the validity checker `checkNewDataCon` from `GHC.Tc.TyCl`
-data family D :: k -> k
-newtype instance D a = MkD a
+data family A :: k -> k
+newtype instance A a = MkA a
data family B :: k -> k
data instance B a = MkB a
+data family C :: k -> k
+data instance C a where MkC :: a -> C a
+
+data family D :: k -> k
+newtype instance D a where MkD :: a -> D a
+
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/99d1a41cc24b90de35dd07eeee7eb75fcdfc401b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/99d1a41cc24b90de35dd07eeee7eb75fcdfc401b
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/20250107/601fce50/attachment-0001.html>
More information about the ghc-commits
mailing list