symantic-lib-0.0.5.20190614: test/HUnit/MonoFunctor.hs
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
module HUnit.MonoFunctor where
import Test.Tasty
import Data.Bool
import Data.Char (Char)
import Data.Either (Either(..))
import Data.Maybe (Maybe(..))
import Data.Proxy (Proxy(..))
import Prelude (Integer)
import qualified Data.MonoTraversable as MT
import Language.Symantic.Lib
import Testing.Compiling
type SS =
[ Proxy (->)
, Proxy []
, Proxy Integer
, Proxy Bool
, Proxy Char
, Proxy MT.MonoFunctor
, Proxy Maybe
]
(==>) = readTe @() @SS
hunits :: TestTree
hunits = testGroup "MonoFunctor"
[ "omap not (Just True)" ==> Right (tyMaybe tyBool, Just False, "omap (\\x0 -> not x0) (Just True)")
, "omap Char.toUpper ['a', 'b', 'c']" ==> Right (tyList tyChar, "ABC", "omap (\\x0 -> Char.toUpper x0) ('a' : 'b' : 'c' : [])" )
]