blob: 74df05e5eed1f1b010808e28af724b7097d08604 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
{-# LANGUAGE DuplicateRecordFields #-}
module T11167_ambig where
data SomeException
newtype ContT r m a = ContT {runContT :: (a -> m r) -> m r}
newtype ContT' r m a = ContT' {runContT :: (a -> m r) -> m r}
runContT' :: ContT r m a -> (a -> m r) -> m r
runContT' = runContT
catch_ :: IO a -> (SomeException -> IO a) -> IO a
catch_ = undefined
foo :: IO ()
foo = (undefined :: ContT () IO a)
`runContT` (undefined :: a -> IO ())
`catch_` (undefined :: SomeException -> IO ())
foo' :: IO ()
foo' = (undefined :: ContT () IO a)
`runContT'` (undefined :: a -> IO ())
`catch_` (undefined :: SomeException -> IO ())
|