]> Git — Sourcephile - haskell/symantic.git/blob - symantic-lib/Language/Symantic/Lib/Test.hs
Add lower version bounds to all dependencies.
[haskell/symantic.git] / symantic-lib / Language / Symantic / Lib / Test.hs
1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
3 module Lib.Test where
4
5 import Test.Tasty
6
7 import Prelude hiding ((&&), not, (||), id)
8
9 import Language.Symantic
10 import Language.Symantic.Lib
11
12 import qualified Lib.Applicative.Test as Applicative
13 import qualified Lib.Bool.Test as Bool
14 import qualified Lib.Foldable.Test as Foldable
15 import qualified Lib.Functor.Test as Functor
16 import qualified Lib.Map.Test as Map
17 import qualified Lib.MonoFunctor.Test as MonoFunctor
18 import qualified Lib.Num.Test as Num
19 import qualified Lib.Tuple2.Test as Tuple2
20
21 -- * Tests
22 tests :: TestTree
23 tests = testGroup "Lib" $
24 [ Applicative.tests
25 , Bool.tests
26 , Foldable.tests
27 , Functor.tests
28 , Map.tests
29 , MonoFunctor.tests
30 , Num.tests
31 , Tuple2.tests
32 ]
33
34 -- * EDSL tests
35 te1 = lam $ \x -> lam $ \y -> (x || y) && not (x && y)
36 te2 = lam $ \x -> lam $ \y -> (x && not y) || (not x && y)
37 te3 = let_ (bool True) $ \x -> x && x
38 te4 = let_ (lam $ \x -> x && x) $ \f -> f `app` bool True
39 te5 = lam $ \x0 -> lam $ \x1 -> x0 && x1
40 te6 = let_ (bool True) id && bool False
41 te7 = lam $ \f -> (f `app` bool True) && bool True
42 te8 = lam $ \f -> f `app` (bool True && bool True)