Ban (or restrict) partial functions with hlint #1494
Labels
C-Moderate Effort
Should take a moderate amount of time to address.
Z-Developer Experience
This issue seeks to make life easier for developers writing Scenarios or other Swarm code.
Z-Feature
A new feature to be added to the game.
Ideally we don't want any instances of
error
in the codebase (#1484 (comment)). For similar reasons, we should restrict use of partial functions like(!!)
,fromJust
, andhead
to a vetted subset of modules.hlint
can whitelist where certain functions may be used.NonEmpty.fromList
(Replace/quarantine uses ofhead
andNE.fromList
functions #1503)Prelude.head
(Replace/quarantine uses ofhead
andNE.fromList
functions #1503)Prelude.tail
(!!)
(Data.Map.!)
error
fromJust
undefined
The text was updated successfully, but these errors were encountered: