elm-review/phantom-type-tests/No_WithModuleVisitor_Without_WithModuleContext.txt

33 lines
1015 B
Plaintext

-- TYPE MISMATCH ---------- ./No_WithModuleVisitor_Without_WithModuleContext.elm
This function cannot handle the argument sent through the (|>) pipe:
11| Rule.newProjectRuleSchema "No_WithModuleVisitor_Without_WithModuleContext" ()
12| |> Rule.withModuleVisitor moduleVisitor
13| |> Rule.fromProjectRuleSchema
^^^^^^^^^^^^^^^^^^^^^^^^^^
The argument is:
Rule.ProjectRuleSchema
{ canAddModuleVisitor : (), withModuleContext : Rule.Forbidden }
()
()
But (|>) is piping it to a function that expects:
Rule.ProjectRuleSchema
{ a
| canAddModuleVisitor : ()
, hasAtLeastOneVisitor : ()
, withModuleContext : Rule.Forbidden
}
()
()
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!