@@ -121,7 +121,7 @@ apiSpec = do
121121 KDL. decodeWith decoder config
122122 `shouldSatisfy` decodeErrorMsg
123123 [ " At: foo #0 > arg #0"
124- , " Expected text , got: 1.0"
124+ , " Expected string , got: 1.0"
125125 ]
126126
127127 -- Most behaviors tested with `nodeWith`
@@ -297,7 +297,7 @@ apiSpec = do
297297 KDL. decodeWith decoder config
298298 `shouldSatisfy` decodeErrorMsg
299299 [ " At: foo #0 > arg #0"
300- , " Expected text , got: 1"
300+ , " Expected string , got: 1"
301301 ]
302302
303303 -- Most behaviors tested with `argAt`
@@ -319,7 +319,7 @@ apiSpec = do
319319 forM_ testCases $ \ anns -> do
320320 let config = " foo (test)a"
321321 decoder = KDL. document $ proc () -> do
322- KDL. argAtWith' " foo" anns KDL. text -< ()
322+ KDL. argAtWith' " foo" anns KDL. string -< ()
323323 KDL. decodeWith decoder config `shouldBe` Right " a"
324324
325325 it " decodes argument without an annotation" $ do
@@ -331,13 +331,13 @@ apiSpec = do
331331 forM_ testCases $ \ anns -> do
332332 let config = " foo a"
333333 decoder = KDL. document $ proc () -> do
334- KDL. argAtWith' " foo" anns KDL. text -< ()
334+ KDL. argAtWith' " foo" anns KDL. string -< ()
335335 KDL. decodeWith decoder config `shouldBe` Right " a"
336336
337337 it " fails when argument has unexpected annotation" $ do
338338 let config = " foo (test)a"
339339 decoder = KDL. document $ proc () -> do
340- KDL. argAtWith' " foo" [" VAL" ] KDL. text -< ()
340+ KDL. argAtWith' " foo" [" VAL" ] KDL. string -< ()
341341 KDL. decodeWith decoder config
342342 `shouldSatisfy` decodeErrorMsg
343343 [ " At: foo #0 > arg #0"
@@ -392,7 +392,7 @@ apiSpec = do
392392 forM_ testCases $ \ anns -> do
393393 let config = " foo (test)a (test)b"
394394 decoder = KDL. document $ proc () -> do
395- KDL. argsAtWith' " foo" anns KDL. text -< ()
395+ KDL. argsAtWith' " foo" anns KDL. string -< ()
396396 KDL. decodeWith decoder config `shouldBe` Right [" a" , " b" ]
397397
398398 it " decodes arguments without an annotation" $ do
@@ -404,13 +404,13 @@ apiSpec = do
404404 forM_ testCases $ \ anns -> do
405405 let config = " foo a b"
406406 decoder = KDL. document $ proc () -> do
407- KDL. argsAtWith' " foo" anns KDL. text -< ()
407+ KDL. argsAtWith' " foo" anns KDL. string -< ()
408408 KDL. decodeWith decoder config `shouldBe` Right [" a" , " b" ]
409409
410410 it " fails when argument has unexpected annotation" $ do
411411 let config = " foo (VAL)a (test)b"
412412 decoder = KDL. document $ proc () -> do
413- KDL. argsAtWith' " foo" [" VAL" ] KDL. text -< ()
413+ KDL. argsAtWith' " foo" [" VAL" ] KDL. string -< ()
414414 KDL. decodeWith decoder config
415415 `shouldSatisfy` decodeErrorMsg
416416 [ " At: foo #0 > arg #1"
@@ -485,7 +485,7 @@ apiSpec = do
485485 forM_ testCases $ \ anns -> do
486486 let config = " foo { - (test)a; - (test)b; }"
487487 decoder = KDL. document $ proc () -> do
488- KDL. dashChildrenAtWith' " foo" anns KDL. text -< ()
488+ KDL. dashChildrenAtWith' " foo" anns KDL. string -< ()
489489 KDL. decodeWith decoder config `shouldBe` Right [" a" , " b" ]
490490
491491 it " decodes dash children without an annotation" $ do
@@ -497,13 +497,13 @@ apiSpec = do
497497 forM_ testCases $ \ anns -> do
498498 let config = " foo { - a; - b; }"
499499 decoder = KDL. document $ proc () -> do
500- KDL. dashChildrenAtWith' " foo" anns KDL. text -< ()
500+ KDL. dashChildrenAtWith' " foo" anns KDL. string -< ()
501501 KDL. decodeWith decoder config `shouldBe` Right [" a" , " b" ]
502502
503503 it " fails when child has unexpected annotation" $ do
504504 let config = " foo { - (test)a; }"
505505 decoder = KDL. document $ proc () -> do
506- KDL. dashChildrenAtWith' " foo" [" VAL" ] KDL. text -< ()
506+ KDL. dashChildrenAtWith' " foo" [" VAL" ] KDL. string -< ()
507507 KDL. decodeWith decoder config
508508 `shouldSatisfy` decodeErrorMsg
509509 [ " At: foo #0 > - #0 > arg #0"
@@ -631,7 +631,7 @@ apiSpec = do
631631 it " decodes an argument" $ do
632632 let config = " foo bar"
633633 decoder = proc () -> do
634- KDL. argWith KDL. text -< ()
634+ KDL. argWith KDL. string -< ()
635635 decodeNode " foo" decoder config `shouldBe` Right " bar"
636636
637637 -- Most behaviors tested with `argWith`
@@ -645,7 +645,7 @@ apiSpec = do
645645 forM_ testCases $ \ anns -> do
646646 let config = " foo (test)a"
647647 decoder = proc () -> do
648- KDL. argWith' anns KDL. text -< ()
648+ KDL. argWith' anns KDL. string -< ()
649649 decodeNode " foo" decoder config `shouldBe` Right " a"
650650
651651 it " decodes argument without an annotation" $ do
@@ -657,13 +657,13 @@ apiSpec = do
657657 forM_ testCases $ \ anns -> do
658658 let config = " foo a"
659659 decoder = proc () -> do
660- KDL. argWith' anns KDL. text -< ()
660+ KDL. argWith' anns KDL. string -< ()
661661 decodeNode " foo" decoder config `shouldBe` Right " a"
662662
663663 it " fails when argument has unexpected annotation" $ do
664664 let config = " foo (test)a"
665665 decoder = proc () -> do
666- KDL. argWith' [" VAL" ] KDL. text -< ()
666+ KDL. argWith' [" VAL" ] KDL. string -< ()
667667 decodeNode " foo" decoder config
668668 `shouldSatisfy` decodeErrorMsg
669669 [ " At: foo #0 > arg #0"
@@ -896,21 +896,21 @@ apiSpec = do
896896 KDL. decodeWith decoder config
897897 `shouldBe` Right [val $ Number 1 , val $ String " asdf" , val $ Bool True ]
898898
899- describe " text " $ do
900- it " decodes text value" $ do
899+ describe " string " $ do
900+ it " decodes string value" $ do
901901 let config = " foo asdf"
902902 decoder = KDL. document $ proc () -> do
903- KDL. argAtWith " foo" KDL. text -< ()
903+ KDL. argAtWith " foo" KDL. string -< ()
904904 KDL. decodeWith decoder config `shouldBe` Right " asdf"
905905
906- it " fails when value is not text " $ do
906+ it " fails when value is not string " $ do
907907 let config = " foo 1"
908908 decoder = KDL. document $ proc () -> do
909- KDL. argAtWith " foo" KDL. text -< ()
909+ KDL. argAtWith " foo" KDL. string -< ()
910910 KDL. decodeWith decoder config
911911 `shouldSatisfy` decodeErrorMsg
912912 [ " At: foo #0 > arg #0"
913- , " Expected text , got: 1"
913+ , " Expected string , got: 1"
914914 ]
915915
916916 describe " number" $ do
@@ -970,7 +970,7 @@ apiSpec = do
970970 let config = " foo 123 hello"
971971 decoder = KDL. document $ proc () -> do
972972 KDL. nodeWith " foo" . KDL. many . KDL. argWith $
973- KDL. oneOf [Left <$> KDL. number, Right <$> KDL. text ]
973+ KDL. oneOf [Left <$> KDL. number, Right <$> KDL. string ]
974974 -<
975975 ()
976976 KDL. decodeWith decoder config `shouldBe` Right [Left 123 , Right " hello" ]
@@ -1059,7 +1059,7 @@ schemaSpec = do
10591059 KDL. SchemaOne . KDL. NodeArg $
10601060 KDL. TypedValueSchema
10611061 { typeHint = typeRep $ Proxy @ Text
1062- , validTypeAnns = [" text " ]
1062+ , validTypeAnns = [" string " ]
10631063 , dataSchema = KDL. SchemaOne KDL. TextSchema
10641064 }
10651065 }
0 commit comments