1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module Lib.Applicative.Test where
6 import Data.Proxy (Proxy(..))
7 import Prelude hiding ((&&), not, (||))
9 import Language.Symantic.Lib
11 import Lib.Bool.Test ()
21 (==>) = readTe @() @SS
24 tests = testGroup "Applicative"
25 [ "Just (xor True) <*> Just True" ==> Right (tyMaybe tyBool, Just False, "Just (\\x0 -> True `xor` x0) <*> Just True")
26 , "Just (xor True) <*> Nothing" ==> Right (tyMaybe tyBool, Nothing , "Just (\\x0 -> True `xor` x0) <*> Nothing")
27 , "xor <$> Just True <*> Just False" ==> Right (tyMaybe tyBool, Just True , "(\\x0 -> (\\x1 -> x0 `xor` x1)) <$> Just True <*> Just False")
28 , "Just False <* Just True" ==> Right (tyMaybe tyBool, Just False, "Just False <* Just True")
29 , "Just False *> Just True" ==> Right (tyMaybe tyBool, Just True , "Just False *> Just True")