ErrorMessagesIssue103ImportedModuleWithoutModuleLineTest
Tags:elm19-compile-errorerror-message
Issue: elm/error-message-catalog#103
Importing a module whose file has no `module` line is reported as MODULE NAME MISSING.
<https://github.com/elm/error-message-catalog/issues/103>
The imported file `ErrorMessagesIssue103NoModuleLineHelper.elm` has no `module` line. The
report must say the line is missing and suggest `module ErrorMessagesIssue103NoModuleLineHelper exposing (..)`.
It must not assume the module is called `Main` and report a name mismatch ("should be Main").Results
elm-0.19.1
passOutput
Compiling ...-- MODULE NAME MISSING --------- src/ErrorMessagesIssue103NoModuleLineHelper.elm
I need the module name to be declared at the top of this file, like this:
module ErrorMessagesIssue103NoModuleLineHelper exposing (..)
Try adding that as the first line of your file!
Note: It is best to replace (..) with an explicit list of types and functions
you want to expose. When you know a value is only used within this module, you
can refactor without worrying about uses elsewhere. Limiting exposed values can
also speed up compilation because I can skip a bunch of work if I see that the
exposed API has not changed.
Detected problems in 1 module.
elm-0.19.2
passOutput
Compiling ...-- MODULE NAME MISSING --------- src/ErrorMessagesIssue103NoModuleLineHelper.elm
I need the module name to be declared at the top of this file, like this:
module ErrorMessagesIssue103NoModuleLineHelper exposing (..)
Try adding that as the first line of your file!
Note: It is best to replace (..) with an explicit list of types and functions
you want to expose. When you know a value is only used within this module, you
can refactor without worrying about uses elsewhere. Limiting exposed values can
also speed up compilation because I can skip a bunch of work if I see that the
exposed API has not changed.
Detected problems in 1 module.
elm-0.19.3
passOutput
Compiling ...-- MODULE NAME MISSING --------- src/ErrorMessagesIssue103NoModuleLineHelper.elm
I need the module name to be declared at the top of this file, like this:
module ErrorMessagesIssue103NoModuleLineHelper exposing (..)
Try adding that as the first line of your file!
Note: It is best to replace (..) with an explicit list of types and functions
you want to expose. When you know a value is only used within this module, you
can refactor without worrying about uses elsewhere. Limiting exposed values can
also speed up compilation because I can skip a bunch of work if I see that the
exposed API has not changed.
Detected problems in 1 module.
lamdera-1.5.0
passOutput
Detected problems in 1 module.
-- MODULE NAME MISSING --------- src/ErrorMessagesIssue103NoModuleLineHelper.elm
I need the module name to be declared at the top of this file, like this:
module ErrorMessagesIssue103NoModuleLineHelper exposing (..)
Try adding that as the first line of your file!
Note: It is best to replace (..) with an explicit list of types and functions
you want to expose. When you know a value is only used within this module, you
can refactor without worrying about uses elsewhere. Limiting exposed values can
also speed up compilation because I can skip a bunch of work if I see that the
exposed API has not changed.
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-error-catalogue/ErrorMessagesIssue103ImportedModuleWithoutModuleLineTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ErrorMessagesIssue103ImportedModuleWithoutModuleLineTest exposing (..)
{-| Importing a module whose file has no `module` line is reported as MODULE NAME MISSING.
<https://github.com/elm/error-message-catalog/issues/103>
The imported file `ErrorMessagesIssue103NoModuleLineHelper.elm` has no `module` line. The
report must say the line is missing and suggest `module ErrorMessagesIssue103NoModuleLineHelper exposing (..)`.
It must not assume the module is called `Main` and report a name mismatch ("should be Main").
-}
-- TAGS: elm19-compile-error, error-message
-- COMPILE-ERROR: MODULE NAME MISSING, an imported module has no module line
-- CHECK: -- MODULE NAME MISSING -
-- CHECK: module ErrorMessagesIssue103NoModuleLineHelper exposing (..)
-- CHECK-NOT: should be Main
import ErrorMessagesIssue103NoModuleLineHelper
answer =
42