tc105.hs 261 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
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