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