mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-23 09:42:49 +03:00
42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
-- TYPE MISMATCH ---------------------------- ./WithModuleContext_AtMostOnce.elm
|
|
|
|
This function cannot handle the argument sent through the (|>) pipe:
|
|
|
|
11| Rule.newProjectRuleSchema "WithModuleContext_AtMostOnce" ()
|
|
12| |> Rule.withModuleVisitor moduleVisitor
|
|
13| |> Rule.withModuleContext
|
|
14| { fromProjectToModule = \_ _ () -> ()
|
|
15| , fromModuleToProject = \_ _ () -> ()
|
|
16| , foldProjectContexts = \_ () -> ()
|
|
17| }
|
|
18|> |> Rule.withModuleContext
|
|
19|> { fromProjectToModule = \_ _ () -> ()
|
|
20|> , fromModuleToProject = \_ _ () -> ()
|
|
21|> , foldProjectContexts = \_ () -> ()
|
|
22|> }
|
|
|
|
The argument is:
|
|
|
|
Rule.ProjectRuleSchema
|
|
{ hasAtLeastOneVisitor : (), withModuleContext : Rule.Forbidden }
|
|
()
|
|
()
|
|
|
|
But (|>) is piping it to a function that expects:
|
|
|
|
Rule.ProjectRuleSchema
|
|
{ a
|
|
| canAddModuleVisitor : ()
|
|
, hasAtLeastOneVisitor : ()
|
|
, withModuleContext : Rule.Required
|
|
}
|
|
()
|
|
()
|
|
|
|
Hint: Seems like a record field typo. Maybe canAddModuleVisitor should be
|
|
hasAtLeastOneVisitor?
|
|
|
|
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!
|
|
|