[Git][ghc/ghc][wip/soulomoon/25647-allow-newtype-instance-in-gadt-syntax] update T25647b

Patrick (@soulomoon) gitlab at gitlab.haskell.org
Wed Feb 5 13:21:23 UTC 2025



Patrick pushed to branch wip/soulomoon/25647-allow-newtype-instance-in-gadt-syntax at Glasgow Haskell Compiler / GHC


Commits:
0aa0f50c by Patrick at 2025-02-05T21:21:14+08:00
update T25647b

- - - - -


1 changed file:

- testsuite/tests/indexed-types/should_compile/T25647b.hs


Changes:

=====================================
testsuite/tests/indexed-types/should_compile/T25647b.hs
=====================================
@@ -1,10 +1,14 @@
 {-# LANGUAGE DataKinds, TypeFamilies, PolyKinds, MagicHash #-}
 
-module T25647a where
+module T25647b where
 
 import GHC.Exts
 import Data.Kind
 
+---------------------------
+-- without UnliftedNewtypes
+---------------------------
+
 -------------------- Plain newtypes -----------------
 
 -- A plain newtype, H98
@@ -16,23 +20,6 @@ newtype Fix1a f = In1a (f (Fix1a f))
 newtype Fix1b f where
     In1b :: forall ff. ff (Fix1b ff) -> Fix1b ff
 
--- A plain newtype, GADT syntax, with a return kind signature,
--- and runtime-rep quantification in the data constructor
--- Should infer Fix2 :: forall r k. (k -> TYPE r) -> TYPE r
--- newtype Fix2 f :: TYPE r where
---    In2 :: forall r (ff :: TYPE r -> TYPE r). ff (Fix2 ff) -> Fix2 ff
-
--- Plain newtype, H98 syntax, standalone kind signature
--- Should get In3 :: forall r (f :: TYPE r -> TYPE r). Fix3 @r f -> Fix3 @r f
--- type Fix3 :: forall r. (TYPE r -> TYPE r) -> TYPE r
--- newtype Fix3 f = In3 (f (Fix3 f))
-
--- Plain newtype, H98 syntax, standalone kind signature
--- Should get In4 :: forall r k (f :: k -> TYPE r). Fix4 @r @k f -> Fix4 @r @k f
--- type Fix4 :: forall r. (TYPE r -> TYPE r) -> TYPE r
--- newtype Fix4 f where
---   In4 :: forall rr (ff :: TYPE rr -> TYPE rr).
---          ff (Fix4 ff) -> Fix4 @rr ff
 
 -------------------- Data families with newtype instance -----------------
 
@@ -54,11 +41,6 @@ newtype instance Dix2a f :: Type where
 data family Dix3 :: (k -> Type) -> k
 newtype instance Dix3 f = DIn3 (f (Dix3 f))
 
-
--- data family Dix4 :: (k -> TYPE r) -> k
--- newtype instance Dix4 f where
---   DIn4 :: forall ff. ff (Dix4 ff) -> Dix4 ff
-
 -- newtype instance in H98 syntax
 data family Dix5 :: (k -> TYPE r) -> k
 newtype instance Dix5 f = DIn5 (f (Dix5 f))



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0aa0f50ca0a5fba6191281b3cb186a4ac68b1e63
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/20250205/11747e9f/attachment-0001.html>


More information about the ghc-commits mailing list