8000 Error information for RedefinedIdent (#146) · purescript/documentation@02e0720 · GitHub
[go: up one dir, main page]

Skip to content

Commit 02e0720

Browse files
csicarhdgarrood
authored andcommitted
Error information for RedefinedIdent (#146)
* basic error info for RedefinedIdent * simpler example
1 parent 37e28fb commit 02e0720

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

errors/RedefinedIdent.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,32 @@
33
## Example
44

55
```purescript
6-
module ShortFailingExample where
6+
module Example where
7+
8+
a = 3
9+
10+
a = 5
711
8-
...
912
```
1013

1114
## Cause
1215

13-
Explain why a user might see this error.
16+
You have defined a value with the same name multiple times.
1417

1518
## Fix
1619

17-
- Suggest possible solutions.
20+
- Rename one of the variables. In this example:
21+
```purescript
22+
a = 3
23+
24+
a' = 5
25+
```
1826
1927
## Notes
2028
21-
- Additional notes.
29+
- This error also occurs if you have multiple clauses for a function, where you misspelled the function name once. For Example:
30+
```purescript
31+
bar [] = 10
32+
barr [2] = 2
33+
bar x = length x
34+
```

0 commit comments

Comments
 (0)
0