Skip to content

Commit c280d68

Browse files
authored
Add documentation for DeprecatedFFIPrime warnings (#293)
1 parent 2dd41d7 commit c280d68

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ If you would prefer to use different terms, please use the section below instead
6767
| [@archaeron](https://github.com/archaeron) | archaeron | [CC BY-NC-SA 3.0](https://creativecommons.org/licenses/by-nc-sa/3.0/deed) |
6868
| [@milesfrain](https://github.com/milesfrain) | Miles Frain | [CC BY-NC-SA 3.0](https://creativecommons.org/licenses/by-nc-sa/3.0/deed) |
6969
| [@GCrispino](https://github.com/gcrispino) | Gabriel Crispino | [CC BY-NC-SA 3.0](https://creativecommons.org/licenses/by-nc-sa/3.0/deed) |
70+
| [@kl0tl](https://github.com/kl0tl) | Cyril Sobierajewicz | [CC BY-NC-SA 3.0](https://creativecommons.org/licenses/by-nc-sa/3.0/deed) |
7071

7172
### Contributors using Modified Terms
7273

errors/DeprecatedFFIPrime.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# `DeprecatedFFIPrime` Warning
2+
3+
## Example
4+
5+
```javascript
6+
exports["example'"] = 0;
7+
```
8+
9+
```purescript
10+
module ShortFailingExample where
11+
12+
foreign import example' :: Int
13+
```
14+
15+
## Cause
16+
17+
An identifier imported from a foreign module contains a prime (`'`) character.
18+
19+
## Fix
20+
21+
Remove the prime from the identifier:
22+
23+
```diff
24+
-exports["example'"] = 0;
25+
+exports.example = 0;
26+
```
27+
28+
```diff
29+
module ShortFailingExample where
30+
31+
-foreign import example' :: Int
32+
+foreign import example :: Int
33+
```

0 commit comments

Comments
 (0)