Compare commits

..

13 commits

2 changed files with 0 additions and 29 deletions

View file

@ -238,7 +238,6 @@ parseTheseChars cs = do
Attempt to parse an exact string Attempt to parse an exact string
```idris ```idris
export
exactString : String -> Parser String exactString : String -> Parser String
exactString str with (asList str) exactString str with (asList str)
exactString "" | [] = pure "" exactString "" | [] = pure ""

View file

@ -209,31 +209,3 @@ string = do
_ <- parseExactChar '"' _ <- parseExactChar '"'
pure $ VString contents pure $ VString contents
``` ```
```idris
number = do
d <- double
pure $ VNumber d
```
```idris
bool = do
oneOfE
(throwParseError "Expected Bool")
(the (List _) [true, false])
where
true : Parser (JSONValue TBool)
true = do
_ <- exactString "true"
pure $ VBool True
false : Parser (JSONValue TBool)
false = do
_ <- exactString "false"
pure $ VBool False
```
```idris
null = do
_ <- exactString "null"
pure VNull
```