diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/tcfail103.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail103.hs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_fail/tcfail103.hs b/testsuite/tests/typecheck/should_fail/tcfail103.hs new file mode 100644 index 0000000000..2ed6df2485 --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/tcfail103.hs @@ -0,0 +1,16 @@ + + +module ShouldCompile where +import GHC.ST +import GHC.STRef +import GHC.Arr + +-- Another 'escape' example + +f:: ST t Int +f = do + v <- newSTRef 5 + let g :: ST s Int + -- Implicitly forall s. ST s Int + g = readSTRef v + g |