]> Git — Sourcephile - haskell/symantic.git/blob - Language/LOL/Symantic/Expr/Lambda/Test.hs
init
[haskell/symantic.git] / Language / LOL / 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 (and, not, or)
10
11 import Language.LOL.Symantic.Expr.Lambda
12 import Language.LOL.Symantic.Expr.Bool
13
14 -- * Expressions
15 e1 = val $ \x -> val $ \y -> (x `or` y) `and` not (x `and` y)
16 e2 = val $ \x -> val $ \y -> (x `and` not y) `or` (not x `and` y)
17 e3 = let_val (bool True) $ \x -> x `and` x
18 e4 = let_val (val $ \x -> x `and` x) $ \f -> f `app` bool True
19 e5 = val $ \x0 -> val $ \x1 -> x0 `and` x1
20 e6 = let_val (bool True) id `and` bool False
21 e7 = val $ \f -> (f `app` bool True) `and` bool True
22 e8 = val $ \f -> f `app` (bool True `and` bool True)
23
24 tests :: TestTree
25 tests =
26 testGroup "Lambda"
27 [
28 ]