summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/T14561.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/polykinds/T14561.hs')
-rw-r--r--testsuite/tests/polykinds/T14561.hs18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/polykinds/T14561.hs b/testsuite/tests/polykinds/T14561.hs
new file mode 100644
index 0000000000..7b1f17e08e
--- /dev/null
+++ b/testsuite/tests/polykinds/T14561.hs
@@ -0,0 +1,18 @@
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE MagicHash #-}
+
+module T14561 where
+
+import GHC.Types
+import GHC.Prim
+
+badId :: forall (a :: TYPE r). a -> a
+badId = unsafeCoerce#
+-- Un-saturated application of a levity-polymorphic
+-- function that must be eta-expanded
+
+goodId :: forall (a :: Type). a -> a
+goodId = unsafeCoerce#
+-- But this one is OK