1 {-# LANGUAGE DataKinds #-}
2 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
3 module Compiling.Applicative.Test where
7 import Data.Proxy (Proxy(..))
9 import Language.Symantic.Typing
10 import Language.Symantic.Compiling
11 import Compiling.Term.Test
20 (==>) = test_term_from (Proxy::Proxy Ifaces)
23 tests = testGroup "Applicative"
25 [ syJust [Syntax "xor" [syTrue]]
27 ] ==> Right (tyMaybe :$ tyBool, Just False, "(\\x0 -> Just ((\\x1 -> (\\x2 -> x1 `xor` x2)) True) <*> x0) (Just True)")
31 ] ==> Right (tyMaybe :$ tyBool, Just True, "Just False *> Just True")
35 ] ==> Right (tyMaybe :$ tyBool, Just False, "Just False <* Just True")