]> Git — Sourcephile - haskell/symantic.git/blob - Language/Symantic/Expr/Lambda/Test.hs
Map
[haskell/symantic.git] / Language / Symantic / Expr / Lambda / Test.hs
1 {-# LANGUAGE NoMonomorphismRestriction #-}
2 {-# LANGUAGE FlexibleContexts #-}
3 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
4
5 module Expr.Lambda.Test where
6
7 import Test.Tasty
8
9 import Prelude hiding ((&&), not, (||), (==), id)
10
11 import Language.Symantic.Expr.Lambda
12 import Language.Symantic.Expr.Bool
13
14 -- * Expressions
15 e1 = lam $ \x -> lam $ \y -> (x || y) && not (x && y)
16 e2 = lam $ \x -> lam $ \y -> (x && not y) || (not x && y)
17 e3 = let_ (bool True) $ \x -> x && x
18 e4 = let_ (lam $ \x -> x && x) $ \f -> f $$ bool True
19 e5 = lam $ \x0 -> lam $ \x1 -> x0 && x1
20 e6 = let_ (bool True) id && bool False
21 e7 = lam $ \f -> (f $$ bool True) && bool True
22 e8 = lam $ \f -> f $$ (bool True && bool True)
23
24 tests :: TestTree
25 tests =
26 testGroup "Lambda"
27 [
28 ]