-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
Description
I know this is a bit of pain point, but our generated bindings lead to hlint warnings using default settings (HLS with hlint enabled, no ohter customizations).
Warnings:
✲ Name: Partial: ghc-internal/toEnum
✲ Description: Usage of partial function 'toEnum' for enumerable types
✲ Severity: Warning
✲ Category: #Partial
Possible solutions:
- {Extra dependency} Use 'safeToEnum' from 'Relude.Extra.Enum' in 'relude'
✲ Name: Partial: ghc-internal/pred
✲ Description: Usage of partial function 'pred' for enumerable types
✲ Severity: Warning
✲ Category: #Partial
Possible solutions:
- Use '(- 1)' for integral types (but be aware of arithmetic overflow)
- {Extra dependency} Use 'prev' from 'Relude.Extra.Enum' in 'relude'
✲ Name: Partial: ghc-internal/succ
✲ Description: Usage of partial function 'succ' for enumerable types
✲ Severity: Warning
✲ Category: #Partial
Possible solutions:
- Use '(+ 1)' for integral types (but be aware of arithmetic overflow)
- {Extra dependency} Use 'next' from 'Relude.Extra.Enum' in 'relude'
This is particularly annoying in TH mode, when the complete splice is underlined:
Should we just accept this, or add an hlint exception to the file? (Or not derive Enum)?