1 {-# LANGUAGE ScopedTypeVariables #-}
5 import Test.Tasty.HUnit
11 tests = testGroup "Type" $
12 let (==>) raw expected =
14 type_from raw (Right . Exists_Type) @?=
15 Right (Exists_Type expected) in
16 [ Raw "->" [Raw "Bool" [], Raw "Bool" []]
17 ==> (Type_Fun_Next Type_Bool `Type_Fun` Type_Fun_Next Type_Bool
18 :: Type_Fun_Bool_End repr (repr Bool -> repr Bool))
20 ==> (Type_Fun_Next Type_Bool
21 :: Type_Fun_Bool_End repr Bool)
23 ==> (Type_Fun_Next (Type_Bool_Next Type_Int)
24 :: Type_Fun_Bool_Int_End repr Int)
25 , Raw "->" [Raw "Bool" [], Raw "Int" []]
26 ==> (Type_Fun_Next Type_Bool `Type_Fun` Type_Fun_Next (Type_Bool_Next Type_Int)
27 :: Type_Fun_Bool_Int_End repr (repr Bool -> repr Int))