File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ module ScopeConflict where
8
8
-- `Prelude` exports a function called `id`
9
9
import Prelude
10
10
11
- id :: Number
12
- id = 1
11
+ identity :: Number
12
+ identity = 1
13
13
```
14
14
15
15
## Cause
@@ -23,10 +23,10 @@ The `ScopeConflict` error occurs when an attempt is made to define a value or ot
23
23
``` purescript
24
24
module NoScopeConflict where
25
25
26
- import Prelude hiding (id )
26
+ import Prelude hiding (identity )
27
27
28
- id :: Number
29
- id = 1
28
+ identity :: Number
29
+ identity = 1
30
30
```
31
31
32
32
- 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
36
36
37
37
import Prelude as P
38
38
39
- id :: Number
40
- id = 1
39
+ identity :: Number
40
+ identity = 1
41
41
```
42
42
43
43
## Notes
You can’t perform that action at this time.
0 commit comments