tc105.hs 295 Bytes
Newer Older
1
2
{-# OPTIONS -fglasgow-exts #-}

3
4
5
6
7
8
9
10
11
12
13
14
15
-- !!! 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