[project @ 2000-05-23 11:51:13 by simonpj]
authorsimonpj <unknown>
Tue, 23 May 2000 11:51:13 +0000 (11:51 +0000)
committersimonpj <unknown>
Tue, 23 May 2000 11:51:13 +0000 (11:51 +0000)
Add tests for result type sigs

ghc/tests/typecheck/should_compile/tc105.hs [new file with mode: 0644]
ghc/tests/typecheck/should_compile/tc105.stderr [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_compile/tc105.hs b/ghc/tests/typecheck/should_compile/tc105.hs
new file mode 100644 (file)
index 0000000..f07fb0d
--- /dev/null
@@ -0,0 +1,13 @@
+-- !!! Scoped type variables in result signatures\r
+module ShouldCompile where\r
+\r
+import PrelST\r
+import PrelArr\r
+\r
+f:: ST s Int\r
+f:: ST s Int = do\r
+    v <- newSTRef 5\r
+    let g :: ST s Int\r
+             -- ^ should be in scope\r
+        g = readSTRef v\r
+    g\r
diff --git a/ghc/tests/typecheck/should_compile/tc105.stderr b/ghc/tests/typecheck/should_compile/tc105.stderr
new file mode 100644 (file)
index 0000000..e69de29