ErrorMessagesIssue203ListWithoutArgumentTest
Tags:elm19-compile-errorerror-message
Issue: elm/error-message-catalog#203
`List` used without its type argument in an annotation is reported as TOO FEW ARGS. <https://github.com/elm/error-message-catalog/issues/203> The annotation is `foo : List -> List`, and the body appends two lists with `++`. The report must say that `List` needs 1 argument and got 0, and must not mention a "type atom".
Results
elm-0.19.1
passOutput
Compiling ...-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
Detected problems in 1 module.
elm-0.19.2
passOutput
Compiling ...-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
Detected problems in 1 module.
elm-0.19.3
passOutput
Compiling ...-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
Detected problems in 1 module.
lamdera-1.5.0
passOutput
Detected problems in 1 module.
-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
-- TOO FEW ARGS ----------- src/ErrorMessagesIssue203ListWithoutArgumentTest.elm
The `List` type needs 1 argument, but I see 0 instead:
19| foo : List -> List
^^^^
What is missing? Are some parentheses misplaced?
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-error-catalogue/ErrorMessagesIssue203ListWithoutArgumentTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ErrorMessagesIssue203ListWithoutArgumentTest exposing (..)
{-| `List` used without its type argument in an annotation is reported as TOO FEW ARGS.
<https://github.com/elm/error-message-catalog/issues/203>
The annotation is `foo : List -> List`, and the body appends two lists with `++`. The report
must say that `List` needs 1 argument and got 0, and must not mention a "type atom".
-}
-- TAGS: elm19-compile-error, error-message
-- COMPILE-ERROR: TOO FEW ARGS, List without its argument
-- CHECK: -- TOO FEW ARGS -
-- CHECK: The `List` type needs 1 argument, but I see 0 instead
-- CHECK-NOT: type atom
foo : List -> List
foo list =
List.take 0 list ++ List.take 0 list