@@ -90,7 +90,6 @@ errorCode em = case unwrapErrorMessage em of
90 MultipleValueOpFixities{} -> "MultipleValueOpFixities"
90 MultipleValueOpFixities{} -> "MultipleValueOpFixities"
91 MultipleTypeOpFixities{} -> "MultipleTypeOpFixities"
91 MultipleTypeOpFixities{} -> "MultipleTypeOpFixities"
92 OrphanTypeDeclaration{} -> "OrphanTypeDeclaration"
92 OrphanTypeDeclaration{} -> "OrphanTypeDeclaration"
93− RedefinedModule{} -> "RedefinedModule"
94 RedefinedIdent{} -> "RedefinedIdent"
93 RedefinedIdent{} -> "RedefinedIdent"
95 OverlappingNamesInLet -> "OverlappingNamesInLet"
94 OverlappingNamesInLet -> "OverlappingNamesInLet"
96 UnknownName{} -> "UnknownName"
95 UnknownName{} -> "UnknownName"
@@ -102,7 +101,7 @@ errorCode em = case unwrapErrorMessage em of
102 ScopeShadowing{} -> "ScopeShadowing"
101 ScopeShadowing{} -> "ScopeShadowing"
103 DeclConflict{} -> "DeclConflict"
102 DeclConflict{} -> "DeclConflict"
104 ExportConflict{} -> "ExportConflict"
103 ExportConflict{} -> "ExportConflict"
105− DuplicateModuleName{} -> "DuplicateModuleName"
104+ DuplicateModule{} -> "DuplicateModule"
106 DuplicateTypeArgument{} -> "DuplicateTypeArgument"
105 DuplicateTypeArgument{} -> "DuplicateTypeArgument"
107 InvalidDoBind -> "InvalidDoBind"
106 InvalidDoBind -> "InvalidDoBind"
108 InvalidDoLet -> "InvalidDoLet"
107 InvalidDoLet -> "InvalidDoLet"
@@ -488,10 +487,6 @@ prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalS
488 line $ "There are multiple fixity/precedence declarations for type operator " ++ markCode (showOp op)
487 line $ "There are multiple fixity/precedence declarations for type operator " ++ markCode (showOp op)
489 renderSimpleErrorMessage (OrphanTypeDeclaration nm) =
488 renderSimpleErrorMessage (OrphanTypeDeclaration nm) =
490 line $ "The type declaration for " ++ markCode (showIdent nm) ++ " should be followed by its definition."
489 line $ "The type declaration for " ++ markCode (showIdent nm) ++ " should be followed by its definition."
491− renderSimpleErrorMessage (RedefinedModule name filenames) =
492− paras [ line ("The module " ++ markCode (runModuleName name) ++ " has been defined multiple times:")
493− , indent . paras $ map (line . displaySourceSpan) filenames
495 renderSimpleErrorMessage (RedefinedIdent name) =
490 renderSimpleErrorMessage (RedefinedIdent name) =
496 line $ "The value " ++ markCode (showIdent name) ++ " has been defined multiple times"
491 line $ "The value " ++ markCode (showIdent name) ++ " has been defined multiple times"
497 renderSimpleErrorMessage (UnknownName name) =
492 renderSimpleErrorMessage (UnknownName name) =
@@ -521,8 +516,10 @@ prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalS
521 line $ "Declaration for " ++ printName (Qualified Nothing new) ++ " conflicts with an existing " ++ nameType existing ++ " of the same name."
516 line $ "Declaration for " ++ printName (Qualified Nothing new) ++ " conflicts with an existing " ++ nameType existing ++ " of the same name."
522 renderSimpleErrorMessage (ExportConflict new existing) =
517 renderSimpleErrorMessage (ExportConflict new existing) =
523 line $ "Export for " ++ printName new ++ " conflicts with " ++ runName existing
518 line $ "Export for " ++ printName new ++ " conflicts with " ++ runName existing
524− renderSimpleErrorMessage (DuplicateModuleName mn) =
519+ renderSimpleErrorMessage (DuplicateModule mn ss) =
525− line $ "Module " ++ markCode (runModuleName mn) ++ " has been defined multiple times."
520+ paras [ line ("Module " ++ markCode (runModuleName mn) ++ " has been defined multiple times:")
521+ , indent . paras $ map (line . displaySourceSpan) ss
526 renderSimpleErrorMessage (CycleInDeclaration nm) =
523 renderSimpleErrorMessage (CycleInDeclaration nm) =
527 line $ "The value of " ++ markCode (showIdent nm) ++ " is undefined here, so this reference is not allowed."
524 line $ "The value of " ++ markCode (showIdent nm) ++ " is undefined here, so this reference is not allowed."
528 renderSimpleErrorMessage (CycleInModules mns) =
525 renderSimpleErrorMessage (CycleInModules mns) =