NOTE: the latest version is 2.0.1
Enforces listing all specific cases if possible
config = [ NoCatchAllForSpecificRemainingPatterns.rule ]
type Resource = Loaded String | FailedToLoad String | Loading displayResource : Resource -> Ui displayResource resource = case resource of Loaded text -> Ui.text text _ -> Ui.spinner resourceIsLoaded : Resource -> Bool resourceIsLoaded resource = case resource of Loaded _ -> True _ -> False
displayResource : Resource -> Ui displayResource resource = case resource of Loaded text -> Ui.text text FailedToLoad reason -> Ui.text ("failed to load due to " ++ reason) Loading -> Ui.spinner resourceIsLoaded : Resource -> Bool resourceIsLoaded resource = case resource of Loaded _ -> True FailedToLoad _ -> False Loading -> False
This works for variant, list and cons patterns.
Enforces listing all specific cases if possible
reported
allowed
This works for variant, list and cons patterns.