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