Skip to content

Commit

Permalink
misc: add example explanation to README
Browse files Browse the repository at this point in the history
  • Loading branch information
cptrodolfox committed Sep 17, 2024
1 parent 0069222 commit f1b30a1
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,27 @@ To pretty print a error message use the `parseErrorPretty` function from
This should be enough to start using the package, please consult Haddocks
for detailed per-function documentation.

## Example

To check an example using `cassava-megaparsec` check the code in the `example` directory.

Given the following type:
```haskell
data Test = Test {a :: Char, b :: Char, c :: Char} deriving (Eq, Show, Generic)
```
And, the following csv file:
```text
a,ba,c
```
We get the following error:
```
example.csv:1:7:
|
1 | a,ba,c
| ^
conversion error: expected Char, got "ba"
```

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
Expand Down

0 comments on commit f1b30a1

Please sign in to comment.