Remove dependency on ghc-prim.
[haskell/symantic.git] / symantic-lib / Language / Symantic / Lib / Functor / Test.hs
index 4a48fedf317ff0487100c92abeae0fc726095dc9..f2a38ec82a8871ba54e82b379cc14ecb58d1cbbf 100644 (file)
@@ -1,5 +1,4 @@
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-{-# OPTIONS_GHC -O0 -fmax-simplifier-iterations=0 #-}
 module Lib.Functor.Test where
 
 import Test.Tasty
@@ -7,34 +6,23 @@ import Test.Tasty
 import Data.Proxy (Proxy(..))
 import Prelude hiding ((&&), not, (||))
 
-import Language.Symantic.Typing
-import Compiling.Term.Test
+import Language.Symantic ()
+import Language.Symantic.Lib
+import Compiling.Test
 
-type Ifaces =
+type SS =
  [ Proxy (->)
  , Proxy Bool
  , Proxy Functor
  , Proxy Integer
  , Proxy Maybe
  ]
-(==>) = test_compile @Ifaces
+(==>) = test_readTerm @() @SS
 
 tests :: TestTree
 tests = testGroup "Functor"
- [ "fmap not (Just True)" ==> Right
-        ( ty @Maybe :$ ty @Bool
-        , Just False
-        , "fmap (\\x0 -> not x0) (Just True)")
- , "not `fmap` Just True" ==> Right
-        ( ty @Maybe :$ ty @Bool
-        , Just False
-        , "fmap (\\x0 -> not x0) (Just True)")
- , "not <$> Just True" ==> Right
-        ( ty @Maybe :$ ty @Bool
-        , Just False
-        , "fmap (\\x0 -> not x0) (Just True)")
- , "False <$ Just True" ==> Right
-        ( ty @Maybe :$ ty @Bool
-        , Just False
-        , "False <$ Just True" )
+ [ "fmap not (Just True)" ==> Right (tyMaybe tyBool, Just False, "fmap (\\x0 -> not x0) (Just True)")
+ , "not `fmap` Just True" ==> Right (tyMaybe tyBool, Just False, "fmap (\\x0 -> not x0) (Just True)")
+ , "not <$> Just True"    ==> Right (tyMaybe tyBool, Just False, "(\\x0 -> not x0) <$> Just True")
+ , "False <$ Just True"   ==> Right (tyMaybe tyBool, Just False, "False <$ Just True")
  ]