]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Compiling/Tuple2/Test.hs
Add Gram_Term.
[haskell/symantic.git] / Language / Symantic / Compiling / Tuple2 / Test.hs
1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module Compiling.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 import Compiling.Bool.Test ()
12
13 type Ifaces =
14 [ Proxy (->)
15 , Proxy Integer
16 , Proxy ()
17 , Proxy (,)
18 ]
19 (==>) = test_compile (Proxy::Proxy Ifaces)
20
21 tests :: TestTree
22 tests = testGroup "Tuple2"
23 [ "()" ==> Right (ty @(), (), "()")
24 , "(,) 1 2" ==> Right (ty @(,) :$ ty @Integer :$ ty @Integer, (1,2), "(1, 2)")
25 , "(1,2)" ==> Right (ty @(,) :$ ty @Integer :$ ty @Integer, (1,2), "(1, 2)")
26 , "((1,2), (3,4))" ==> Right
27 ( let t = ty @(,) :$ ty @Integer :$ ty @Integer in ty @(,) :$ t :$ t
28 , ((1,2),(3,4))
29 , "((1, 2), (3, 4))" )
30 ]