summaryrefslogtreecommitdiff
path: root/testsuite/tests/backpack/should_run
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/backpack/should_run')
-rw-r--r--testsuite/tests/backpack/should_run/T20133.bkp34
-rw-r--r--testsuite/tests/backpack/should_run/all.T1
2 files changed, 35 insertions, 0 deletions
diff --git a/testsuite/tests/backpack/should_run/T20133.bkp b/testsuite/tests/backpack/should_run/T20133.bkp
new file mode 100644
index 0000000000..304f857ae9
--- /dev/null
+++ b/testsuite/tests/backpack/should_run/T20133.bkp
@@ -0,0 +1,34 @@
+{-# LANGUAGE MagicHash #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE DataKinds #-}
+
+unit number-unknown where
+ signature NumberUnknown where
+ import GHC.Types
+ data Rep a :: RuntimeRep
+ instance Concrete (Rep a)
+ data Number a :: TYPE (Rep a)
+ plus :: Number a -> Number a -> Number a
+ multiply :: Number a -> Number a -> Number a
+ module NumberStuff where
+ import NumberUnknown
+ funcA :: Number a -> Number a -> Number a
+ funcA x y = plus x (multiply x y)
+
+unit number-unboxed-int where
+ module NumberUnknown where
+ import GHC.Types
+ import GHC.Prim
+ type Rep a = IntRep
+ type Number a = Int#
+ plus :: Int# -> Int# -> Int#
+ plus = (+#)
+ multiply :: Int# -> Int# -> Int#
+ multiply = (*#)
+
+unit main1 where
+ dependency number-unknown[NumberUnknown=number-unboxed-int:NumberUnknown]
+ module Main where
+ import NumberStuff
+ import GHC.Types
+ main = print (I# (funcA 2# 3#))
diff --git a/testsuite/tests/backpack/should_run/all.T b/testsuite/tests/backpack/should_run/all.T
index c0cde0fdc1..d4deb4f4a8 100644
--- a/testsuite/tests/backpack/should_run/all.T
+++ b/testsuite/tests/backpack/should_run/all.T
@@ -10,3 +10,4 @@ test('bkprun09', normal, backpack_run, ['-O'])
test('T13955', normal, backpack_run, [''])
test('T15138', normal, backpack_run, [''])
test('T15379', normal, backpack_run,[''])
+test('T20133', expect_broken(20133), backpack_run, [''])