Use symantic-document to write docType.
[haskell/symantic.git] / symantic-lib / Language / Symantic / Lib / Foldable / Test.hs
index 1a05dd71c1ec941f36f32e74f0d41f6fece47e3a..1afd1bdb6088b729a713bf7a2818558dc2160434 100644 (file)
@@ -1,5 +1,4 @@
 {-# OPTIONS_GHC -fno-warn-missing-signatures #-}
-{-# OPTIONS_GHC -O0 -fmax-simplifier-iterations=0 #-}
 module Lib.Foldable.Test where
 
 import Test.Tasty
@@ -7,10 +6,10 @@ import Test.Tasty
 import Data.Proxy (Proxy(..))
 import Prelude hiding ((&&), not, (||))
 
-import Language.Symantic.Typing
-import Compiling.Term.Test
+import Language.Symantic.Lib
+import Compiling.Test
 
-type Ifaces =
+type SS =
  [ Proxy (->)
  , Proxy Int
  , Proxy Integer
@@ -19,20 +18,15 @@ type Ifaces =
  , Proxy (,)
  , Proxy Foldable
  ]
-(==>) = test_compile @Ifaces
+(==>) = test_readTerm @() @SS
 
 tests :: TestTree
 tests = testGroup "Foldable"
- [ "[] @Integer" ==> Right
-        ( ty @[] :$ ty @Integer
-        , []
-        , "[]" )
- , "[1, 2, 3]" ==> Right
-        ( ty @[] :$ ty @Integer
-        , [1, 2, 3]
-        , "1 : 2 : 3 : []" )
+ [ {-"[]" ==> Right (tyList (tyVar "a" varZ), [], "[]")
+ ,-} "[1, 2, 3]" ==> Right (tyList tyInteger, [1, 2, 3], "1 : 2 : 3 : []")
+ , "1 : 2 : 3 : []" ==> Right (tyList tyInteger, [1, 2, 3], "1 : 2 : 3 : []")
  , "foldMap (\\(x0:Integer) -> [x0, x0]) [1, 2, 3]" ==> Right
-        ( ty @[] :$ ty @Integer
+        ( tyList tyInteger
         , [1, 1, 2, 2, 3, 3]
         , "foldMap (\\x0 -> x0 : x0 : []) (1 : 2 : 3 : [])" )
  ]