mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
32 lines
971 B
Plaintext
32 lines
971 B
Plaintext
-- TYPE MISMATCH ------------------------ ./No_Project_Rule_Without_Visitors.elm
|
|
|
|
This function cannot handle the argument sent through the (|>) pipe:
|
|
|
|
11| Rule.newProjectRuleSchema "No_Project_Rule_Without_Visitors" ()
|
|
12| |> Rule.fromProjectRuleSchema
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
The argument is:
|
|
|
|
Rule.ProjectRuleSchema
|
|
{ canAddModuleVisitor : (), withModuleContext : Rule.Forbidden }
|
|
()
|
|
moduleContext
|
|
|
|
But (|>) is piping it to a function that expects:
|
|
|
|
Rule.ProjectRuleSchema
|
|
{ a
|
|
| canAddModuleVisitor : ()
|
|
, hasAtLeastOneVisitor : ()
|
|
, withModuleContext : Rule.Forbidden
|
|
}
|
|
()
|
|
moduleContext
|
|
|
|
Hint: Seems like a record field typo. Maybe hasAtLeastOneVisitor should be
|
|
canAddModuleVisitor?
|
|
|
|
Hint: Can more type annotations be added? Type annotations always help me give
|
|
more specific messages, and I think they could help a lot in this case!
|
|
|