1 {-# OPTIONS -fglasgow-exts #-}
4 -- At one time the rule got too specialised a type:
6 -- _R "ffoo" forall {@ a1 v :: (a1, ((), ()))}
7 -- fst @ a1 @ () (sndSnd @ a1 @ () @ () v) = fst @ a1 @ ((), ()) v
13 import PrelIOBase( unsafePerformIO )
15 sndSnd (a,(b,c)) = (a,c)
17 trace x y = unsafePerformIO (hPutStr stderr x >> hPutStr stderr "\n" >> return y)
19 {-# RULES "foo" forall v . fst (sndSnd v) = trace "Yes" (fst v) #-}
22 main = print (fst (sndSnd (True, (False,True))))