summaryrefslogtreecommitdiff
path: root/testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs')
-rw-r--r--testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs36
1 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs b/testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs
new file mode 100644
index 0000000000..03147242d8
--- /dev/null
+++ b/testsuite/tests/rename/should_fail/RnNoImplicitForAll.hs
@@ -0,0 +1,36 @@
+{-# LANGUAGE NoImplicitForAll, GADTs, DeriveAnyClass #-}
+
+module RnNoImplicitForAll where
+
+import GHC.Types
+
+f :: a -> a
+f = undefined
+
+type T :: k -> Type
+data T k
+
+data G a where
+ MkG :: a -> Maybe b -> G (Either Int b)
+
+rightTrue = Right True :: Either a Bool
+
+munit :: forall m a . Monad m => m a
+munit = pure undefined
+{-# SPECIALISE munit :: IO a #-}
+
+class C a b
+
+data TD deriving (C a)
+
+instance Show a => Show (Maybe a)
+
+type family F a
+
+type instance F (Maybe a) = Int
+
+{-# RULES "name" forall (x :: Maybe a). foo x = 5 #-}
+
+foo x = 5
+
+id (a :: t) = t