diff --git a/src/Parser/JSON.md b/src/Parser/JSON.md index 1f1ccde..50c24a2 100644 --- a/src/Parser/JSON.md +++ b/src/Parser/JSON.md @@ -122,16 +122,15 @@ export value : Parser (t : JSONType ** JSONValue t) value = do surround whitespace $ oneOfE - (throwParseError "Expected JSON Value") - (the (List _) - [ - dpairize object - , dpairize array - , dpairize string - , dpairize number - , dpairize bool - , dpairize null - ]) + "Expected JSON Value" + [ + dpairize object + , dpairize array + , dpairize string + , dpairize number + , dpairize bool + , dpairize null + ] ``` Now go through our json value types @@ -139,8 +138,8 @@ Now go through our json value types ```idris object = do oneOfE - (throwParseError "Expected Object") - (the (List _) [emptyObject, occupiedObject]) + "Expected Object" + [emptyObject, occupiedObject] where emptyObject : Parser (JSONValue TObject) emptyObject = do @@ -171,8 +170,8 @@ object = do ```idris array = do oneOfE - (throwParseError "Expected Array") - (the (List _) [emptyArray, occupiedArray]) + "Expected Array" + [emptyArray, occupiedArray] where emptyArray : Parser (JSONValue TArray) emptyArray = do @@ -214,8 +213,8 @@ number = do ```idris bool = do oneOfE - (throwParseError "Expected Bool") - (the (List _) [true, false]) + "Expected Bool" + [true, false] where true : Parser (JSONValue TBool) true = do