]> Git — Sourcephile - haskell/symantic.git/blob - symantic-lib/test/HUnit/Functor.hs
Add Trans defaults.
[haskell/symantic.git] / symantic-lib / test / HUnit / Functor.hs
1 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
2 module HUnit.Functor where
3
4 import Test.Tasty
5 import Data.Proxy (Proxy(..))
6
7 import Language.Symantic ()
8 import Language.Symantic.Lib
9 import Testing.Compiling
10
11 type SS =
12 [ Proxy (->)
13 , Proxy Bool
14 , Proxy Functor
15 , Proxy Integer
16 , Proxy Maybe
17 ]
18 (==>) = readTe @() @SS
19
20 hunits :: TestTree
21 hunits = testGroup "Functor"
22 [ "fmap not (Just True)" ==> Right (tyMaybe tyBool, Just False, "fmap (\\x0 -> not x0) (Just True)")
23 , "not `fmap` Just True" ==> Right (tyMaybe tyBool, Just False, "fmap (\\x0 -> not x0) (Just True)")
24 , "not <$> Just True" ==> Right (tyMaybe tyBool, Just False, "(\\x0 -> not x0) <$> Just True")
25 , "False <$ Just True" ==> Right (tyMaybe tyBool, Just False, "False <$ Just True")
26 ]