summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonpj <unknown>2000-05-23 11:51:13 +0000
committersimonpj <unknown>2000-05-23 11:51:13 +0000
commit3a68f09199fb656512347c57f4a7a4f1215a36bd (patch)
tree3afcc5f968541eacbc482e0bb9cee34a84764591
parentef675dbd34a1ccd27ecaa1549a845ec40a6157fd (diff)
downloadhaskell-3a68f09199fb656512347c57f4a7a4f1215a36bd.tar.gz
[project @ 2000-05-23 11:51:13 by simonpj]
Add tests for result type sigs
-rw-r--r--ghc/tests/typecheck/should_compile/tc105.hs13
-rw-r--r--ghc/tests/typecheck/should_compile/tc105.stderr0
2 files changed, 13 insertions, 0 deletions
diff --git a/ghc/tests/typecheck/should_compile/tc105.hs b/ghc/tests/typecheck/should_compile/tc105.hs
new file mode 100644
index 0000000000..f07fb0df19
--- /dev/null
+++ b/ghc/tests/typecheck/should_compile/tc105.hs
@@ -0,0 +1,13 @@
+-- !!! Scoped type variables in result signatures
+module ShouldCompile where
+
+import PrelST
+import PrelArr
+
+f:: ST s Int
+f:: ST s Int = do
+ v <- newSTRef 5
+ let g :: ST s Int
+ -- ^ should be in scope
+ g = readSTRef v
+ g
diff --git a/ghc/tests/typecheck/should_compile/tc105.stderr b/ghc/tests/typecheck/should_compile/tc105.stderr
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/ghc/tests/typecheck/should_compile/tc105.stderr