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