blob: 0337feab16bc98d8b49c5975f6fb5b9651ce1764 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
module ShouldCompile where
import GHC.ST
import GHC.STRef
import GHC.Arr
-- Another 'escape' example
f:: ST t Int
f = do
v <- newSTRef 5
let g :: ST s Int
-- Implicitly forall s. ST s Int
g = readSTRef v
g
|