[Git][ghc/ghc][wip/T23146] testsuite: Add test for #23146

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Mar 23 02:30:25 UTC 2023



Ben Gamari pushed to branch wip/T23146 at Glasgow Haskell Compiler / GHC


Commits:
3d53be90 by Ben Gamari at 2023-03-22T22:30:05-04:00
testsuite: Add test for #23146

- - - - -


4 changed files:

- + testsuite/tests/codeGen/should_run/T23146.hs
- + testsuite/tests/codeGen/should_run/T23146.stdout
- + testsuite/tests/codeGen/should_run/T23146A.hs
- testsuite/tests/codeGen/should_run/all.T


Changes:

=====================================
testsuite/tests/codeGen/should_run/T23146.hs
=====================================
@@ -0,0 +1,11 @@
+{-# LANGUAGE GADTs #-}
+
+import T23146A
+
+fieldsSam :: NP xs -> NP xs -> Bool
+fieldsSam (x' ::* xs) (y' ::* ys) = fieldsSam xs ys
+fieldsSam UNil UNil = True
+
+main :: IO ()
+main = print (fieldsSam UNil UNil)
+


=====================================
testsuite/tests/codeGen/should_run/T23146.stdout
=====================================
@@ -0,0 +1,2 @@
+True
+


=====================================
testsuite/tests/codeGen/should_run/T23146A.hs
=====================================
@@ -0,0 +1,10 @@
+{-# LANGUAGE UnliftedDatatypes #-}
+module B where
+  
+import GHC.Exts
+
+type NP :: [UnliftedType] -> UnliftedType
+data NP xs where
+  UNil :: NP '[]
+  (::*) :: x -> NP xs -> NP (x ': xs)
+


=====================================
testsuite/tests/codeGen/should_run/all.T
=====================================
@@ -229,3 +229,4 @@ test('T20640b', normal, compile_and_run, [''])
 test('T22296',[only_ways(llvm_ways)
               ,unless(arch('x86_64'), skip)],compile_and_run,[''])
 test('T22798', normal, compile_and_run, ['-fregs-graph'])
+test('T23146', normal, compile_and_run, [''])



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/3d53be9081b7c5e248c003e0baf5e006ec559165
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/20230322/bb421d23/attachment-0001.html>


More information about the ghc-commits mailing list