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
11 import Prelude hiding ((&&), not, (||), (==), id)
13 import Language.Symantic.Compiling
16 te1 = lam $ \x -> lam $ \y -> (x || y) && not (x && y)
17 te2 = lam $ \x -> lam $ \y -> (x && not y) || (not x && y)
18 te3 = let_ (bool True) $ \x -> x && x
19 te4 = let_ (lam $ \x -> x && x) $ \f -> f .$ bool True
20 te5 = lam $ \x0 -> lam $ \x1 -> x0 && x1
21 te6 = let_ (bool True) id && bool False
22 te7 = lam $ \f -> (f .$ bool True) && bool True
23 te8 = lam $ \f -> f .$ (bool True && bool True)
27 tests = testGroup "Compiling" $