Warn on type search with impossible types
We can warn the user when they search for a type like
Int -> Maybe or
Task a -> Int, because we can see in the database that
Task always get an argument. This helps people coming from Haskell who forget parentheses (second example) as well as people just forgetting the number of type variables (first and possibly second example).
This almost requires #217 (closed), but because we don't need full kind information (only the number of type variables) it does not require ~"import-traversal".
Proposed is to add a
warnings :: Maybe [String] field to
The warning can be something like
Type `Maybe` used with 0 arguments where 1 was expected. It can happen that there are multiple
Maybe types in the database with a different number of arguments; the warning can then be something like
Type `Maybe` used with 0 arguments where 1, 2, or 3 were expected. Be careful with singular/plural
This is a warning, not an error, because the user may have defined their own
Task which does not require an argument.