[Git][ghc/ghc][wip/T25647] add wildcards testcase for T25647a
Patrick (@soulomoon)
gitlab at gitlab.haskell.org
Sat Feb 8 15:10:40 UTC 2025
Patrick pushed to branch wip/T25647 at Glasgow Haskell Compiler / GHC
Commits:
84f53fe2 by Patrick at 2025-02-08T23:10:30+08:00
add wildcards testcase for T25647a
- - - - -
1 changed file:
- testsuite/tests/typecheck/should_compile/T25647a.hs
Changes:
=====================================
testsuite/tests/typecheck/should_compile/T25647a.hs
=====================================
@@ -72,3 +72,21 @@ newtype instance Dix5 f = DIn5 (f (Dix5 f))
data family Dix7 :: (k -> TYPE 'IntRep) -> k
newtype instance Dix7 f = DIn7 (f (Dix7 f))
+
+
+-- anonymous wildcards
+type Dix8 :: RuntimeRep -> Type
+data family Dix8 r
+newtype instance Dix8 _ = Dix8 Int
+
+dix8 :: Dix8 FloatRep -> Int
+dix8 (Dix8 x) = x
+
+
+-- named wildcards
+type Dix9 :: RuntimeRep -> Type
+data family Dix9 r
+newtype instance Dix9 _r = Dix9 Int
+
+dix8 :: Dix9 FloatRep -> Int
+dix8 (Dix9 x) = x
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/84f53fe2a94f9d72b82b42c3928f394b1dd5e18b
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/84f53fe2a94f9d72b82b42c3928f394b1dd5e18b
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/20250208/026211ed/attachment-0001.html>
More information about the ghc-commits
mailing list