1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 {-# LANGUAGE FlexibleContexts #-}
3 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
5 module Expr.Lambda.Test where
9 import Prelude hiding ((&&), not, (||), (==))
11 import Language.Symantic.Expr.Lambda
12 import Language.Symantic.Expr.Bool
15 e1 = val $ \x -> val $ \y -> (x || y) && not (x && y)
16 e2 = val $ \x -> val $ \y -> (x && not y) || (not x && y)
17 e3 = let_val (bool True) $ \x -> x && x
18 e4 = let_val (val $ \x -> x && x) $ \f -> f `app` bool True
19 e5 = val $ \x0 -> val $ \x1 -> x0 && x1
20 e6 = let_val (bool True) id && bool False
21 e7 = val $ \f -> (f `app` bool True) && bool True
22 e8 = val $ \f -> f `app` (bool True && bool True)