symantic-lib-0.0.5.20190614: test/HUnit/Tuple2.hs
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module HUnit.Tuple2 where
import Test.Tasty
import Data.Either (Either(..))
import Data.Proxy (Proxy(..))
import Prelude (Integer)
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))" )
]