summaryrefslogtreecommitdiff
path: root/testsuite/tests/eyeball/record1.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/eyeball/record1.hs')
-rw-r--r--testsuite/tests/eyeball/record1.hs17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/eyeball/record1.hs b/testsuite/tests/eyeball/record1.hs
new file mode 100644
index 0000000000..1f9084b7a6
--- /dev/null
+++ b/testsuite/tests/eyeball/record1.hs
@@ -0,0 +1,17 @@
+-- Check that the record selector for maskMB unfolds in the body of f
+-- At one stage it didn't because the implicit unfolding looked too big
+
+-- Trac #2581
+
+module ShouldCompile where
+import Data.Array.Base
+
+data MBloom s a = MB {
+ shiftMB :: {-# UNPACK #-} !Int
+ , maskMB :: {-# UNPACK #-} !Int
+ , bitArrayMB :: {-# UNPACK #-} !(STUArray s Int Int)
+ }
+
+f a b c = case maskMB (MB a b c) of
+ 3 -> True
+ _ -> False