1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module HUnit.Applicative where
5 import Control.Applicative (Applicative)
7 import Data.Either (Either(..))
8 import Data.Functor (Functor)
9 import Data.Maybe (Maybe(..))
10 import Data.Proxy (Proxy(..))
11 import Prelude (Integer)
13 import Language.Symantic.Lib
14 import Testing.Compiling
25 (==>) = readTe @() @SS
28 hunits = testGroup "Applicative"
29 [ "Just (xor True) <*> Just True" ==> Right (tyMaybe tyBool, Just False, "Just (\\x0 -> True `xor` x0) <*> Just True")
30 , "Just (xor True) <*> Nothing" ==> Right (tyMaybe tyBool, Nothing , "Just (\\x0 -> True `xor` x0) <*> Nothing")
31 , "xor <$> Just True <*> Just False" ==> Right (tyMaybe tyBool, Just True , "(\\x0 -> (\\x1 -> x0 `xor` x1)) <$> Just True <*> Just False")
32 , "Just False <* Just True" ==> Right (tyMaybe tyBool, Just False, "Just False <* Just True")
33 , "Just False *> Just True" ==> Right (tyMaybe tyBool, Just True , "Just False *> Just True")