testsuite: Assert that testsuite ways are known
[ghc.git] / testsuite / tests / typecheck / should_compile / Vta2.hs
1 {-# LANGUAGE RankNTypes, TypeApplications #-}
2
3
4 module Vta2 where
5
6 checkIf :: Bool -> (forall a. a -> a) -> (Bool, Int)
7 checkIf _ = if True
8 then \f -> (f True, f 5)
9 else \f -> (f False, f @Int 3)
10
11 checkCase :: Bool -> (forall a. a -> a) -> (Bool, Int)
12 checkCase _ = case True of
13 True -> \f -> (f True, f 5)
14 False -> \f -> (f False, f @Int 3)