1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
3 module Compiling.Test where
7 import qualified Compiling.Bool.Test as Bool
8 import qualified Compiling.Functor.Test as Functor
9 import qualified Compiling.Applicative.Test as Applicative
10 import qualified Compiling.Foldable.Test as Foldable
11 import qualified Compiling.Map.Test as Map
12 import qualified Compiling.MonoFunctor.Test as MonoFunctor
14 import Prelude hiding ((&&), not, (||), (==), id)
16 import Language.Symantic.Compiling
19 te1 = lam $ \x -> lam $ \y -> (x || y) && not (x && y)
20 te2 = lam $ \x -> lam $ \y -> (x && not y) || (not x && y)
21 te3 = let_ (bool True) $ \x -> x && x
22 te4 = let_ (lam $ \x -> x && x) $ \f -> f .$ bool True
23 te5 = lam $ \x0 -> lam $ \x1 -> x0 && x1
24 te6 = let_ (bool True) id && bool False
25 te7 = lam $ \f -> (f .$ bool True) && bool True
26 te8 = lam $ \f -> f .$ (bool True && bool True)
30 tests = testGroup "Compiling" $