2020-03-20 00:42:24 +03:00
|
|
|
-- 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:
|
|
|
|
|
2020-03-20 01:15:42 +03:00
|
|
|
Rule.ProjectRuleSchema () () { canAddModuleVisitor : () }
|
2020-03-20 00:42:24 +03:00
|
|
|
|
|
|
|
But (|>) is piping it to a function that expects:
|
|
|
|
|
|
|
|
Rule.ProjectRuleSchema
|
|
|
|
()
|
|
|
|
()
|
2020-03-20 01:15:42 +03:00
|
|
|
{ a | canAddModuleVisitor : (), withModuleContext : Rule.Required }
|
|
|
|
|
|
|
|
Hint: Seems like a record field typo. Maybe withModuleContext 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!
|
2020-03-20 00:42:24 +03:00
|
|
|
|