Skip to content

Commit ae29196

Browse files
authored
Update ScopeConflict.md (#442)
Changed id -> identity.
1 parent 4470b50 commit ae29196

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

errors/ScopeConflict.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module ScopeConflict where
88
-- `Prelude` exports a function called `id`
99
import Prelude
1010
11-
id :: Number
12-
id = 1
11+
identity :: Number
12+
identity = 1
1313
```
1414

1515
## Cause
@@ -23,10 +23,10 @@ The `ScopeConflict` error occurs when an attempt is made to define a value or ot
2323
```purescript
2424
module NoScopeConflict where
2525
26-
import Prelude hiding (id)
26+
import Prelude hiding (identity)
2727
28-
id :: Number
29-
id = 1
28+
identity :: Number
29+
identity = 1
3030
```
3131
3232
- Alternatively, import the conflicting module using the `as` keyword:
@@ -36,8 +36,8 @@ The `ScopeConflict` error occurs when an attempt is made to define a value or ot
3636
3737
import Prelude as P
3838
39-
id :: Number
40-
id = 1
39+
identity :: Number
40+
identity = 1
4141
```
4242
4343
## Notes

0 commit comments

Comments
 (0)