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

35 lines
1.2 KiB
Plaintext
Raw Normal View History

-- 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 () () { canAddModuleVisitor : () }
But (|>) is piping it to a function that expects:
Rule.ProjectRuleSchema
()
()
{ 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!