{-# LANGUAGE NoMonomorphismRestriction #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Compiling.Test where import Test.Tasty import qualified Compiling.Bool.Test as Bool import qualified Compiling.Functor.Test as Functor import qualified Compiling.Applicative.Test as Applicative import Prelude hiding ((&&), not, (||), (==), id) import Language.Symantic.Compiling -- * Terms te1 = lam $ \x -> lam $ \y -> (x || y) && not (x && y) te2 = lam $ \x -> lam $ \y -> (x && not y) || (not x && y) te3 = let_ (bool True) $ \x -> x && x te4 = let_ (lam $ \x -> x && x) $ \f -> f .$ bool True te5 = lam $ \x0 -> lam $ \x1 -> x0 && x1 te6 = let_ (bool True) id && bool False te7 = lam $ \f -> (f .$ bool True) && bool True te8 = lam $ \f -> f .$ (bool True && bool True) -- * Tests tests :: TestTree tests = testGroup "Compiling" $ [ Bool.tests , Functor.tests , Applicative.tests ]