Commit cb41ea30 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Test Trac #5453

parent b3364629
{-# LANGUAGE MagicHash #-}
module Main where
import GHC.Exts
data Var = TyVar !Int Bool Bool
| TcTyVar Bool !Int Bool
| Var Bool Bool !Int
deriving (Show)
scrut :: Var -> (Bool, String)
scrut v = (True, case v of
TcTyVar {} -> "OK"
_ -> show v ++ show (case (case v of
TyVar b _ _ -> b
Var _ _ b -> b) of
I# x# -> if x# ==# 7#
then show (I# (x# +# 1#))
else show (I# (x# +# 2#))))
main = putStrLn $ snd (scrut (TcTyVar True 1 False))
......@@ -45,3 +45,4 @@ test('T3972', extra_clean(['T3972A.hi', 'T3972A.o']),
compile_and_run,
[''])
test('T5315', normal, compile_and_run, [''])
test('T5453', normal, compile_and_run, [''])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment