summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/LevPolyLet.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/LevPolyLet.hs')
-rw-r--r--testsuite/tests/typecheck/should_fail/LevPolyLet.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/LevPolyLet.hs b/testsuite/tests/typecheck/should_fail/LevPolyLet.hs
new file mode 100644
index 0000000000..6fb47133ae
--- /dev/null
+++ b/testsuite/tests/typecheck/should_fail/LevPolyLet.hs
@@ -0,0 +1,19 @@
+{-# language DataKinds #-}
+{-# language KindSignatures #-}
+{-# language PolyKinds #-}
+{-# language RankNTypes #-}
+
+module LevPolyLet
+ ( example
+ ) where
+
+import GHC.Exts
+
+-- This should be rejected because of the let binding.
+example :: forall (v :: Levity) (a :: TYPE ('BoxedRep v)).
+ (Int -> a)
+ -> (a -> Bool)
+ -> Bool
+example f g =
+ let x = f 42
+ in g x