]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Lib/Tuple2/Test.hs
Fix Lib.Text.
[haskell/symantic.git] / Language / Symantic / Lib / Tuple2 / Test.hs
1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module Lib.Tuple2.Test where
3
4 import Test.Tasty
5
6 import Data.Proxy (Proxy(..))
7 import Prelude hiding ((&&), not, (||))
8
9 import Language.Symantic.Typing
10 import Compiling.Term.Test
11
12 type Ifaces =
13 [ Proxy (->)
14 , Proxy Integer
15 , Proxy ()
16 , Proxy (,)
17 ]
18 (==>) = test_compile (Proxy::Proxy Ifaces)
19
20 tests :: TestTree
21 tests = testGroup "Tuple2"
22 [ "()" ==> Right (ty @(), (), "()")
23 , "(,) 1 2" ==> Right (ty @(,) :$ ty @Integer :$ ty @Integer, (1,2), "(1, 2)")
24 , "(1,2)" ==> Right (ty @(,) :$ ty @Integer :$ ty @Integer, (1,2), "(1, 2)")
25 , "((1,2), (3,4))" ==> Right
26 ( let t = ty @(,) :$ ty @Integer :$ ty @Integer in ty @(,) :$ t :$ t
27 , ((1,2),(3,4))
28 , "((1, 2), (3, 4))" )
29 ]