Add 'hadrian/' from commit '45f3bff7016a2a0cd9a5455a882ced984655e90b'
[ghc.git] / testsuite / tests / typecheck / should_run / T10284.hs
1 {-# OPTIONS_GHC -fdefer-type-errors -fno-warn-deferred-type-errors #-}
2
3 import Control.Exception
4 import Data.Functor
5
6 a :: Int
7 a = 'a'
8
9 main :: IO ()
10 main = do
11 catch (void $ evaluate a)
12 (\e -> do let err = show (e :: TypeError)
13 putStrLn ("As expected, TypeError: " ++ err))
14 catch (void $ evaluate a)
15 (\e -> do let err = show (e :: ErrorCall)
16 putStrLn ("Something went horribly wrong: " ++ err))