{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module Lib.Tuple2.Test where

import Test.Tasty

import Data.Proxy (Proxy(..))
import Prelude hiding ((&&), not, (||))

import Language.Symantic.Typing
import Compiling.Term.Test

type Ifaces =
 [ Proxy (->)
 , Proxy Integer
 , Proxy ()
 , Proxy (,)
 ]
(==>) = test_compile @Ifaces

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)")
 , "((1,2), (3,4))" ==> Right
	 ( let t = ty @(,) :$ ty @Integer :$ ty @Integer in ty @(,) :$ t :$ t
	 , ((1,2),(3,4))
	 , "((1, 2), (3, 4))" )
 ]