symantic-lib-0.0.2.20170703: Language/Symantic/Lib/Tuple2/Test.hs
{-# 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.Lib
import Compiling.Test
type SS =
[ Proxy (->)
, Proxy Integer
, Proxy ()
, Proxy (,)
]
(==>) = readTe @() @SS
tests :: TestTree
tests = 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))" )
]