module imports form a cycle instead of failing to parse
Some issue of parsing is causing certain module imports not to respect the proper format for a module name:
modid → {conid .} conid (modules)
A module import ending in numbers or a dot may be treated as if the . or .<numbers> weren't there. I would expect these to be parse errors instead of falling back to their 'parent', that's surely vague so here's examples.
Minimally:
echo "module Lib where import Lib. " > test.hs && ghc test.hs
echo "module Lib where import Lib.123 " > test.hs && ghc test.hs
Will both result in:
Module imports form a cycle:
module ‘Lib’ (test.hs) imports itself
This is an error because it's not importing itself, it's importing Lib. or Lib.123 which are invalid module names.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |