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