1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module Compiling.Functor.Test where
6 import Data.Proxy (Proxy(..))
7 import Prelude hiding ((&&), not, (||))
9 import Language.Symantic.Typing
10 import Compiling.Term.Test
11 import Compiling.Bool.Test ()
20 (==>) = test_compile (Proxy::Proxy Ifaces)
23 tests = testGroup "Functor"
24 [ "fmap not (Just True)" ==> Right
25 ( ty @Maybe :$ ty @Bool
27 , "fmap (\\x0 -> not x0) (Just True)")
28 , "not `fmap` Just True" ==> Right
29 ( ty @Maybe :$ ty @Bool
31 , "fmap (\\x0 -> not x0) (Just True)")
32 , "not <$> Just True" ==> Right
33 ( ty @Maybe :$ ty @Bool
35 , "fmap (\\x0 -> not x0) (Just True)")
36 , "False <$ Just True" ==> Right
37 ( ty @Maybe :$ ty @Bool
39 , "False <$ Just True" )