summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc132.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc132.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc132.hs13
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc132.hs b/testsuite/tests/typecheck/should_compile/tc132.hs
new file mode 100644
index 0000000000..f32e6dc6bc
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc132.hs
@@ -0,0 +1,13 @@
+-- !!! Monomorphism restriction
+-- This one should work fine, despite the monomorphism restriction
+-- Fails with GHC 5.00.1
+
+module Test where
+import Control.Monad.ST
+import Data.STRef
+
+-- Should get
+-- apa :: forall s. ST s ()
+apa = newSTRef () >> return ()
+
+foo1 = runST apa