From 3a68f09199fb656512347c57f4a7a4f1215a36bd Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 23 May 2000 11:51:13 +0000 Subject: [PATCH] [project @ 2000-05-23 11:51:13 by simonpj] Add tests for result type sigs --- ghc/tests/typecheck/should_compile/tc105.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ghc/tests/typecheck/should_compile/tc105.hs create mode 100644 ghc/tests/typecheck/should_compile/tc105.stderr diff --git a/ghc/tests/typecheck/should_compile/tc105.hs b/ghc/tests/typecheck/should_compile/tc105.hs new file mode 100644 index 0000000..f07fb0d --- /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 0000000..e69de29 -- 1.7.10.4