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