tc105.hs 280 Bytes
Newer Older
rrt's avatar
rrt committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
{-# OPTIONS -fglasgow-exts #-}

-- !!! 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