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

import Test.Tasty
import Data.Proxy (Proxy(..))

import Language.Symantic.Lib
import Testing.Compiling

type SS =
 [ Proxy (->)
 , Proxy Integer
 , Proxy ()
 , Proxy (,)
 ]
(==>) = readTe @() @SS

hunits :: TestTree
hunits = testGroup "Tuple2"
 [ "()"             ==> 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 = tyTuple2 tyInteger tyInteger in tyTuple2 t t
	 , ((1,2),(3,4))
	 , "((1, 2), (3, 4))" )
 ]