1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 {-# OPTIONS_GHC -O0 -fmax-simplifier-iterations=0 #-}
3 module Lib.Functor.Test where
7 import Data.Proxy (Proxy(..))
8 import Prelude hiding ((&&), not, (||))
10 import Language.Symantic.Typing
11 import Compiling.Term.Test
20 (==>) = test_compile @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" )