summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T6069.hs
blob: 8513aab97c50f492c04d9f765ce1da9bd98fb400 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE Rank2Types #-}

module T6069 where

import Control.Monad.ST
import Data.STRef

fourty_two :: forall s. ST s Int
fourty_two = do
   x <- newSTRef (42::Int)
   readSTRef x

f1 = (print . runST) fourty_two -- (1)
f2 = (print . runST) $ fourty_two -- (2)
f3 = ((print . runST) $) fourty_two -- (3)