Skip to content

Commit 2091d79

Browse files
authored
Merge pull request #184 from purescript-contrib/trh/text-prefix-readme
Drop Text and Parser from module names in README
2 parents cade0cd + 4650082 commit 2091d79

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ A monadic parser combinator library based on Haskell’s
1313

1414
Install `parsing` with [Spago](https://github.com/purescript/spago):
1515

16-
```sh
17-
spago install parsing
16+
```console
17+
$ spago install parsing
1818
```
1919

2020
## Quick start
@@ -23,7 +23,7 @@ Here is a basic tutorial introduction to monadic parsing with this package.
2323

2424
### Parsers
2525

26-
A parser turns a string into a data structure. Parsers in this library have the type `Parser s a`, where `s` is the type of the input string, and `a` is the type of the data which the parser will produce on success. `Parser s` is a monad. It’s defined in the module `Text.Parsing.Parser`.
26+
A parser turns a string into a data structure. Parsers in this library have the type `Parser s a`, where `s` is the type of the input string, and `a` is the type of the data which the parser will produce on success. `Parser s` is a monad. It’s defined in the module `Parsing`.
2727

2828
Monads can be used to provide context for a computation, and that’s how we use them in monadic parsing.
2929
The context provided by the `Parser s` monad is __the parser’s current location in the input string__.
@@ -42,14 +42,14 @@ function, which calls the `throwError` function of the `MonadThrow` typeclass in
4242
the `Parser s` monad.
4343

4444
To run a parser, call the function `runParser :: s -> Parser s a -> Either ParseError a` in
45-
the `Text.Parsing.Parser` module, and supply it with an input string and a parser.
45+
the `Parsing` module, and supply it with an input string and a parser.
4646
If the parse succeeds then the result is `Right a` and if the parse fails then the
4747
result is `Left ParseError`.
4848

4949
### Primitive parsers
5050

5151
Each type of input string needs primitive parsers.
52-
Primitive parsers for input string type `String` are in the `Text.Parsing.Parser.String` module.
52+
Primitive parsers for input string type `String` are in the `Parsing.String` module.
5353
For example, the primitive `char :: Char -> Parser String Char` parser will exactly match
5454
one literal character and then advance by one position in the input string.
5555

@@ -83,11 +83,11 @@ and then the parser will succeed and return `Right true`.
8383

8484
### More parsers
8585

86-
There are other `String` parsers in the module `Text.Parsing.Parser.String.Basic`, for example the parser `letter :: Parser String Char` which will accept any single alphabetic letter.
86+
There are other `String` parsers in the module `Parsing.String.Basic`, for example the parser `letter :: Parser String Char` which will accept any single alphabetic letter.
8787

8888
### Parser combinators
8989

90-
Parser combinators are in this package in the module `Text.Parsing.Parser.Combinators`.
90+
Parser combinators are in this package in the module `Parsing.Combinators`.
9191

9292
A parser combinator is a function which takes a parser as an argument and returns a new parser. The `many` combinator, for example, will repeat a parser as many times as it can. So the parser `many letter` will have type `Parser String (Array Char)`.
9393

0 commit comments

Comments
 (0)