summaryrefslogtreecommitdiff
path: root/testsuite/tests/rep-poly/T13233.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rep-poly/T13233.hs')
-rw-r--r--testsuite/tests/rep-poly/T13233.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/tests/rep-poly/T13233.hs b/testsuite/tests/rep-poly/T13233.hs
new file mode 100644
index 0000000000..c4c0480a75
--- /dev/null
+++ b/testsuite/tests/rep-poly/T13233.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE UnboxedTuples #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE MagicHash #-}
+module Bug where
+
+import GHC.Exts ( TYPE, RuntimeRep )
+
+class Foo (a :: TYPE rep) where
+ bar :: forall rep2 (b :: TYPE rep2). (a -> a -> b) -> a -> a -> b
+
+baz :: forall rep (a :: TYPE rep). Foo a => a -> a -> (# a, a #)
+baz = bar (#,#)
+
+obscure :: (forall (rep1 :: RuntimeRep) (rep2 :: RuntimeRep)
+ (a :: TYPE rep1) (b :: TYPE rep2).
+ a -> b -> (# a, b #)) -> ()
+obscure _ = ()
+
+quux :: ()
+quux = obscure (#,#)