1{-# LANGUAGE RankNTypes, TypeApplications #-}
2
3
4module Vta2 where
5
6checkIf :: Bool -> (forall a. a -> a) -> (Bool, Int)
7checkIf _ = if True
8            then \f -> (f True, f 5)
9            else \f -> (f False, f @Int 3)
10
11checkCase :: Bool -> (forall a. a -> a) -> (Bool, Int)
12checkCase _ = case True of
13                True -> \f -> (f True, f 5)
14                False -> \f -> (f False, f @Int 3)
15