import Data.Proxy (Proxy(..))
import Prelude hiding ((&&), not, (||))
-import Language.Symantic.Typing
-import Compiling.Term.Test
+import Language.Symantic.Lib
+import Compiling.Test
-type Ifaces =
+type SS =
[ Proxy (->)
, Proxy Integer
, Proxy ()
, Proxy (,)
]
-(==>) = test_compile @Ifaces
+(==>) = readTe @() @SS
tests :: TestTree
tests = testGroup "Tuple2"
- [ "()" ==> Right (ty @(), (), "()")
- , "(,) 1 2" ==> Right (ty @(,) :$ ty @Integer :$ ty @Integer, (1,2), "(1, 2)")
- , "(1,2)" ==> Right (ty @(,) :$ ty @Integer :$ ty @Integer, (1,2), "(1, 2)")
+ [ "()" ==> Right (tyUnit, (), "()")
+ , "(,) 1 2" ==> Right (tyTuple2 tyInteger tyInteger, (1,2), "(1, 2)")
+ , "(1,2)" ==> Right (tyTuple2 tyInteger tyInteger, (1,2), "(1, 2)")
, "((1,2), (3,4))" ==> Right
- ( let t = ty @(,) :$ ty @Integer :$ ty @Integer in ty @(,) :$ t :$ t
+ ( let t = tyTuple2 tyInteger tyInteger in tyTuple2 t t
, ((1,2),(3,4))
, "((1, 2), (3, 4))" )
]