Skip to content

Commit 96e5cd6

Browse files
authored
Warnings updates (documentationjs#413)
* Remove MultipleFFIModules documentation It is a template file and the error was removed in 0.12.0 * Add UnusedDeclaration warning docs
1 parent 7295b33 commit 96e5cd6

File tree

2 files changed

+26
-21
lines changed

2 files changed

+26
-21
lines changed

errors/MultipleFFIModules.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

errors/UnusedDeclaration.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# `UnusedDeclaration` Warning
2+
3+
## Example
4+
5+
```purescript
6+
module ShortFailingExample ( exportedThing ) where
7+
8+
-- This declaration is exported, so used
9+
exportedThing = 42 :: Int
10+
11+
-- This declaration is neither used in the module, nor exported
12+
problem = "problem" :: String
13+
14+
```
15+
16+
## Cause
17+
18+
This warning identifies a declaration that is not exported, and is not used in the containing module. Such a declaration is "dead code" and can safely be removed.
19+
20+
## Fix
21+
22+
- Remove the declaration if it is unused
23+
- Use it within the module
24+
- Export the declaration if required
25+
26+
## Notes

0 commit comments

Comments
 (0)