tc105.hs 308 Bytes
Newer Older
1
2
3
4
{-# OPTIONS -fglasgow-exts #-}

module ShouldCompile where

5
6
import Control.Monad.ST
import Data.STRef
7

8
9
10
11
12
-- (Modified now that we don't have result type signatures)

f:: forall s. ST s Int
f = do v <- newSTRef 5
       let g :: ST s Int
13
             -- ^ should be in scope
14
15
           g = readSTRef v
       g