@@ -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"
@@ -486,10 +485,6 @@ prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalS
486 line $ "There are multiple fixity/precedence declarations for type operator " ++ markCode (showOp op)
485 line $ "There are multiple fixity/precedence declarations for type operator " ++ markCode (showOp op)
487 renderSimpleErrorMessage (OrphanTypeDeclaration nm) =
486 renderSimpleErrorMessage (OrphanTypeDeclaration nm) =
488 line $ "The type declaration for " ++ markCode (showIdent nm) ++ " should be followed by its definition."
487 line $ "The type declaration for " ++ markCode (showIdent nm) ++ " should be followed by its definition."
489− renderSimpleErrorMessage (RedefinedModule name filenames) =
490− paras [ line ("The module " ++ markCode (runModuleName name) ++ " has been defined multiple times:")
491− , indent . paras $ map (line . displaySourceSpan) filenames
493 renderSimpleErrorMessage (RedefinedIdent name) =
488 renderSimpleErrorMessage (RedefinedIdent name) =
494 line $ "The value " ++ markCode (showIdent name) ++ " has been defined multiple times"
489 line $ "The value " ++ markCode (showIdent name) ++ " has been defined multiple times"
495 renderSimpleErrorMessage (UnknownName name) =
490 renderSimpleErrorMessage (UnknownName name) =
@@ -519,8 +514,10 @@ prettyPrintSingleError (PPEOptions codeColor full level showWiki) e = flip evalS
519 line $ "Declaration for " ++ printName (Qualified Nothing new) ++ " conflicts with an existing " ++ nameType existing ++ " of the same name."
514 line $ "Declaration for " ++ printName (Qualified Nothing new) ++ " conflicts with an existing " ++ nameType existing ++ " of the same name."
520 renderSimpleErrorMessage (ExportConflict new existing) =
515 renderSimpleErrorMessage (ExportConflict new existing) =
521 line $ "Export for " ++ printName new ++ " conflicts with " ++ runName existing
516 line $ "Export for " ++ printName new ++ " conflicts with " ++ runName existing
522− renderSimpleErrorMessage (DuplicateModuleName mn) =
517+ renderSimpleErrorMessage (DuplicateModule mn ss) =
523− line $ "Module " ++ markCode (runModuleName mn) ++ " has been defined multiple times."
518+ paras [ line ("Module " ++ markCode (runModuleName mn) ++ " has been defined multiple times:")
519+ , indent . paras $ map (line . displaySourceSpan) ss
524 renderSimpleErrorMessage (CycleInDeclaration nm) =
521 renderSimpleErrorMessage (CycleInDeclaration nm) =
525 line $ "The value of " ++ markCode (showIdent nm) ++ " is undefined here, so this reference is not allowed."
522 line $ "The value of " ++ markCode (showIdent nm) ++ " is undefined here, so this reference is not allowed."
526 renderSimpleErrorMessage (CycleInModules mns) =
523 renderSimpleErrorMessage (CycleInModules mns) =