Skip to content

Commit

Permalink
Error information for RedefinedIdent (documentationjs#146)
Browse files Browse the repository at this point in the history
* basic error info for RedefinedIdent

* simpler example
  • Loading branch information
csicar authored and hdgarrood committed Dec 14, 2017
1 parent 37e28fb commit 02e0720
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions errors/RedefinedIdent.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,32 @@
## Example

```purescript
module ShortFailingExample where
module Example where
a = 3
a = 5
...
```

## Cause

Explain why a user might see this error.
You have defined a value with the same name multiple times.

## Fix

- Suggest possible solutions.
- Rename one of the variables. In this example:
```purescript
a = 3
a' = 5
```

## Notes

- Additional notes.
- This error also occurs if you have multiple clauses for a function, where you misspelled the function name once. For Example:
```purescript
bar [] = 10
barr [2] = 2
bar x = length x
```

0 comments on commit 02e0720

Please sign in to comment.