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