@@ -309,7 +309,7 @@ onErrorMessages :: (ErrorMessage -> ErrorMessage) -> MultipleErrors -> MultipleE
309onErrorMessages f = MultipleErrors . map f . runMultipleErrors
309onErrorMessages f = MultipleErrors . map f . runMultipleErrors
311-- | The various types of things which might need to be relabelled in errors messages.
311-- | The various types of things which might need to be relabelled in errors messages.
312−data LabelType = TypeLabel | SkolemLabel String deriving (Show, Eq, Ord)
312+data LabelType = TypeLabel | SkolemLabel String deriving (Show, Read, Eq, Ord)
314-- | A map from rigid type variable name/unknown variable pairs to new variables.
314-- | A map from rigid type variable name/unknown variable pairs to new variables.
315type UnknownMap = M.Map (LabelType, Unknown) Unknown
315type UnknownMap = M.Map (LabelType, Unknown) Unknown
@@ -430,13 +430,13 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
430 , indent . prettyPrintParseError $ err
430 , indent . prettyPrintParseError $ err
432 goSimple (MissingFFIModule mn) =
432 goSimple (MissingFFIModule mn) =
433− line $ "Missing FFI implementations for module " ++ show mn
433+ line $ "Missing FFI implementations for module " ++ runModuleName mn
434 goSimple (UnnecessaryFFIModule mn path) =
434 goSimple (UnnecessaryFFIModule mn path) =
435− paras [ line $ "Unnecessary FFI implementations have been provided for module " ++ show mn ++ ": "
435+ paras [ line $ "Unnecessary FFI implementations have been provided for module " ++ runModuleName mn ++ ": "
436 , indent . line $ path
436 , indent . line $ path
438 goSimple (MultipleFFIModules mn paths) =
438 goSimple (MultipleFFIModules mn paths) =
439− paras $ [ line $ "Multiple FFI implementations have been provided for module " ++ show mn ++ ": " ]
439+ paras $ [ line $ "Multiple FFI implementations have been provided for module " ++ runModuleName mn ++ ": " ]
440 ++ map (indent . line) paths
440 ++ map (indent . line) paths
441 goSimple (InvalidExternsFile path) =
441 goSimple (InvalidExternsFile path) =
442 paras [ line "Externs file is invalid: "
442 paras [ line "Externs file is invalid: "
@@ -461,80 +461,80 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
461 , indent $ line $ prettyPrintKind ki
461 , indent $ line $ prettyPrintKind ki
463 goSimple (MultipleFixities name) =
463 goSimple (MultipleFixities name) =
464− line $ "Multiple fixity declarations for " ++ show name
464+ line $ "Multiple fixity declarations for " ++ showIdent name
465 goSimple (OrphanTypeDeclaration nm) =
465 goSimple (OrphanTypeDeclaration nm) =
466− line $ "Orphan type declaration for " ++ show nm
466+ line $ "Orphan type declaration for " ++ showIdent nm
467 goSimple (OrphanFixityDeclaration op) =
467 goSimple (OrphanFixityDeclaration op) =
468 line $ "Orphan fixity declaration for " ++ show op
468 line $ "Orphan fixity declaration for " ++ show op
469 goSimple (RedefinedModule name filenames) =
469 goSimple (RedefinedModule name filenames) =
470− paras $ [ line $ "Module " ++ show name ++ " has been defined multiple times:"
470+ paras $ line ("Module " ++ runModuleName name ++ " has been defined multiple times:")
471− ] ++ map (indent . line . displaySourceSpan) filenames
471+ : map (indent . line . displaySourceSpan) filenames
472 goSimple (RedefinedIdent name) =
472 goSimple (RedefinedIdent name) =
473− line $ "Name " ++ show name ++ " has been defined multiple times"
473+ line $ "Name " ++ showIdent name ++ " has been defined multiple times"
474 goSimple (UnknownModule mn) =
474 goSimple (UnknownModule mn) =
475− line $ "Unknown module " ++ show mn
475+ line $ "Unknown module " ++ runModuleName mn
476 goSimple (UnknownType name) =
476 goSimple (UnknownType name) =
477− line $ "Unknown type " ++ show name
477+ line $ "Unknown type " ++ showQualified runProperName name
478 goSimple (UnknownTypeClass name) =
478 goSimple (UnknownTypeClass name) =
479− line $ "Unknown type class " ++ show name
479+ line $ "Unknown type class " ++ showQualified runProperName name
480 goSimple (UnknownValue name) =
480 goSimple (UnknownValue name) =
481− line $ "Unknown value " ++ show name
481+ line $ "Unknown value " ++ showQualified showIdent name
482 goSimple (UnknownTypeConstructor name) =
482 goSimple (UnknownTypeConstructor name) =
483− line $ "Unknown type constructor " ++ show name
483+ line $ "Unknown type constructor " ++ showQualified runProperName name
484 goSimple (UnknownDataConstructor dc tc) =
484 goSimple (UnknownDataConstructor dc tc) =
485− line $ "Unknown data constructor " ++ show dc ++ foldMap ((" for type constructor " ++) . show) tc
485+ line $ "Unknown data constructor " ++ showQualified runProperName dc ++ foldMap ((" for type constructor " ++) . showQualified runProperName) tc
486 goSimple (UnknownImportType mn name) =
486 goSimple (UnknownImportType mn name) =
487− line $ "Module " ++ show mn ++ " does not export type " ++ show name
487+ line $ "Module " ++ runModuleName mn ++ " does not export type " ++ runProperName name
488 goSimple (UnknownExportType name) =
488 goSimple (UnknownExportType name) =
489− line $ "Cannot export unknown type " ++ show name
489+ line $ "Cannot export unknown type " ++ runProperName name
490 goSimple (UnknownImportTypeClass mn name) =
490 goSimple (UnknownImportTypeClass mn name) =
491− line $ "Module " ++ show mn ++ " does not export type class " ++ show name
491+ line $ "Module " ++ runModuleName mn ++ " does not export type class " ++ runProperName name
492 goSimple (UnknownExportTypeClass name) =
492 goSimple (UnknownExportTypeClass name) =
493− line $ "Cannot export unknown type class " ++ show name
493+ line $ "Cannot export unknown type class " ++ runProperName name
494 goSimple (UnknownImportValue mn name) =
494 goSimple (UnknownImportValue mn name) =
495− line $ "Module " ++ show mn ++ " does not export value " ++ show name
495+ line $ "Module " ++ runModuleName mn ++ " does not export value " ++ showIdent name
496 goSimple (UnknownExportValue name) =
496 goSimple (UnknownExportValue name) =
497− line $ "Cannot export unknown value " ++ show name
497+ line $ "Cannot export unknown value " ++ showIdent name
498 goSimple (UnknownExportModule name) =
498 goSimple (UnknownExportModule name) =
499− line $ "Cannot export unknown module " ++ show name ++ ", it either does not exist or has not been imported by the current module"
499+ line $ "Cannot export unknown module " ++ runModuleName name ++ ", it either does not exist or has not been imported by the current module"
500 goSimple (UnknownImportDataConstructor mn tcon dcon) =
500 goSimple (UnknownImportDataConstructor mn tcon dcon) =
501− line $ "Module " ++ show mn ++ " does not export data constructor " ++ show dcon ++ " for type " ++ show tcon
501+ line $ "Module " ++ runModuleName mn ++ " does not export data constructor " ++ runProperName dcon ++ " for type " ++ runProperName tcon
502 goSimple (UnknownExportDataConstructor tcon dcon) =
502 goSimple (UnknownExportDataConstructor tcon dcon) =
503− line $ "Cannot export data constructor " ++ show dcon ++ " for type " ++ show tcon ++ " as it has not been declared"
503+ line $ "Cannot export data constructor " ++ runProperName dcon ++ " for type " ++ runProperName tcon ++ " as it has not been declared"
504 goSimple (ConflictingImport nm mn) =
504 goSimple (ConflictingImport nm mn) =
505− line $ "Cannot declare " ++ show nm ++ " since another declaration of that name was imported from " ++ show mn
505+ line $ "Cannot declare " ++ show nm ++ " since another declaration of that name was imported from " ++ runModuleName mn
506 goSimple (ConflictingImports nm m1 m2) =
506 goSimple (ConflictingImports nm m1 m2) =
507− line $ "Conflicting imports for " ++ nm ++ " from modules " ++ show m1 ++ " and " ++ show m2
507+ line $ "Conflicting imports for " ++ nm ++ " from modules " ++ runModuleName m1 ++ " and " ++ runModuleName m2
508 goSimple (ConflictingTypeDecls nm) =
508 goSimple (ConflictingTypeDecls nm) =
509− line $ "Conflicting type declarations for " ++ show nm
509+ line $ "Conflicting type declarations for " ++ runProperName nm
510 goSimple (ConflictingCtorDecls nm) =
510 goSimple (ConflictingCtorDecls nm) =
511− line $ "Conflicting data constructor declarations for " ++ show nm
511+ line $ "Conflicting data constructor declarations for " ++ runProperName nm
512 goSimple (TypeConflictsWithClass nm) =
512 goSimple (TypeConflictsWithClass nm) =
513− line $ "Type " ++ show nm ++ " conflicts with type class declaration of the same name"
513+ line $ "Type " ++ runProperName nm ++ " conflicts with type class declaration of the same name"
514 goSimple (CtorConflictsWithClass nm) =
514 goSimple (CtorConflictsWithClass nm) =
515− line $ "Data constructor " ++ show nm ++ " conflicts with type class declaration of the same name"
515+ line $ "Data constructor " ++ runProperName nm ++ " conflicts with type class declaration of the same name"
516 goSimple (ClassConflictsWithType nm) =
516 goSimple (ClassConflictsWithType nm) =
517− line $ "Type class " ++ show nm ++ " conflicts with type declaration of the same name"
517+ line $ "Type class " ++ runProperName nm ++ " conflicts with type declaration of the same name"
518 goSimple (ClassConflictsWithCtor nm) =
518 goSimple (ClassConflictsWithCtor nm) =
519− line $ "Type class " ++ show nm ++ " conflicts with data constructor declaration of the same name"
519+ line $ "Type class " ++ runProperName nm ++ " conflicts with data constructor declaration of the same name"
520 goSimple (DuplicateClassExport nm) =
520 goSimple (DuplicateClassExport nm) =
521− line $ "Duplicate export declaration for type class " ++ show nm
521+ line $ "Duplicate export declaration for type class " ++ runProperName nm
522 goSimple (DuplicateValueExport nm) =
522 goSimple (DuplicateValueExport nm) =
523− line $ "Duplicate export declaration for value " ++ show nm
523+ line $ "Duplicate export declaration for value " ++ showIdent nm
524 goSimple (CycleInDeclaration nm) =
524 goSimple (CycleInDeclaration nm) =
525− line $ "Cycle in declaration of " ++ show nm
525+ line $ "Cycle in declaration of " ++ showIdent nm
526 goSimple (CycleInModules mns) =
526 goSimple (CycleInModules mns) =
527− line $ "Cycle in module dependencies: " ++ intercalate ", " (map show mns)
527+ line $ "Cycle in module dependencies: " ++ intercalate ", " (map runModuleName mns)
528 goSimple (CycleInTypeSynonym pn) =
528 goSimple (CycleInTypeSynonym pn) =
529− line $ "Cycle in type synonym" ++ foldMap ((" " ++) . show) pn
529+ line $ "Cycle in type synonym" ++ foldMap ((" " ++) . runProperName) pn
530 goSimple (NameIsUndefined ident) =
530 goSimple (NameIsUndefined ident) =
531− line $ show ident ++ " is undefined"
531+ line $ showIdent ident ++ " is undefined"
532 goSimple (NameNotInScope ident) =
532 goSimple (NameNotInScope ident) =
533− line $ show ident ++ " may not be defined in the current scope"
533+ line $ showIdent ident ++ " may not be defined in the current scope"
534 goSimple (UndefinedTypeVariable name) =
534 goSimple (UndefinedTypeVariable name) =
535− line $ "Type variable " ++ show name ++ " is undefined"
535+ line $ "Type variable " ++ runProperName name ++ " is undefined"
536 goSimple (PartiallyAppliedSynonym name) =
536 goSimple (PartiallyAppliedSynonym name) =
537− paras [ line $ "Partially applied type synonym " ++ show name
537+ paras [ line $ "Partially applied type synonym " ++ showQualified runProperName name
538 , line "Type synonyms must be applied to all of their type arguments."
538 , line "Type synonyms must be applied to all of their type arguments."
540 goSimple (EscapedSkolem binding) =
540 goSimple (EscapedSkolem binding) =
@@ -561,18 +561,18 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
561 , indent $ line $ prettyPrintType t2
561 , indent $ line $ prettyPrintType t2
563 goSimple (OverlappingInstances nm ts (d : ds)) =
563 goSimple (OverlappingInstances nm ts (d : ds)) =
564− paras [ line $ "Overlapping instances found for " ++ show nm ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ ":"
564+ paras [ line $ "Overlapping instances found for " ++ showQualified runProperName nm ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ ":"
565− , indent $ paras (line (show d ++ " (chosen)") : map (line . show) ds)
565+ , indent $ paras (line (showQualified showIdent d ++ " (chosen)") : map (line . showQualified showIdent) ds)
567 goSimple OverlappingInstances{} = error "OverlappingInstances: empty instance list"
567 goSimple OverlappingInstances{} = error "OverlappingInstances: empty instance list"
568 goSimple (NoInstanceFound nm ts) =
568 goSimple (NoInstanceFound nm ts) =
569− line $ "No instance found for " ++ show nm ++ " " ++ unwords (map prettyPrintTypeAtom ts)
569+ line $ "No instance found for " ++ showQualified runProperName nm ++ " " ++ unwords (map prettyPrintTypeAtom ts)
570 goSimple (PossiblyInfiniteInstance nm ts) =
570 goSimple (PossiblyInfiniteInstance nm ts) =
571− line $ "Instance for " ++ show nm ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ " is possibly infinite."
571+ line $ "Instance for " ++ showQualified runProperName nm ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ " is possibly infinite."
572 goSimple (CannotDerive nm ts) =
572 goSimple (CannotDerive nm ts) =
573− line $ "Cannot derive " ++ show nm ++ " instance for " ++ unwords (map prettyPrintTypeAtom ts)
573+ line $ "Cannot derive " ++ showQualified runProperName nm ++ " instance for " ++ unwords (map prettyPrintTypeAtom ts)
574 goSimple (CannotFindDerivingType nm) =
574 goSimple (CannotFindDerivingType nm) =
575− line $ "Cannot derive instance, because the type declaration for " ++ show nm ++ " could not be found."
575+ line $ "Cannot derive instance, because the type declaration for " ++ runProperName nm ++ " could not be found."
576 goSimple (DuplicateLabel l expr) =
576 goSimple (DuplicateLabel l expr) =
577 paras $ [ line $ "Duplicate label " ++ show l ++ " in row." ]
577 paras $ [ line $ "Duplicate label " ++ show l ++ " in row." ]
578 <> foldMap (\expr' -> [ line "Relevant expression: "
578 <> foldMap (\expr' -> [ line "Relevant expression: "
@@ -581,22 +581,22 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
581 goSimple (DuplicateTypeArgument name) =
581 goSimple (DuplicateTypeArgument name) =
582 line $ "Duplicate type argument " ++ show name
582 line $ "Duplicate type argument " ++ show name
583 goSimple (DuplicateValueDeclaration nm) =
583 goSimple (DuplicateValueDeclaration nm) =
584− line $ "Duplicate value declaration for " ++ show nm
584+ line $ "Duplicate value declaration for " ++ showIdent nm
585 goSimple (ArgListLengthsDiffer ident) =
585 goSimple (ArgListLengthsDiffer ident) =
586− line $ "Argument list lengths differ in declaration " ++ show ident
586+ line $ "Argument list lengths differ in declaration " ++ showIdent ident
587 goSimple (OverlappingArgNames ident) =
587 goSimple (OverlappingArgNames ident) =
588− line $ "Overlapping names in function/binder" ++ foldMap ((" in declaration" ++) . show) ident
588+ line $ "Overlapping names in function/binder" ++ foldMap ((" in declaration" ++) . showIdent) ident
589 goSimple (MissingClassMember ident) =
589 goSimple (MissingClassMember ident) =
590− line $ "Member " ++ show ident ++ " has not been implemented"
590+ line $ "Member " ++ showIdent ident ++ " has not been implemented"
591 goSimple (ExtraneousClassMember ident) =
591 goSimple (ExtraneousClassMember ident) =
592− line $ "Member " ++ show ident ++ " is not a member of the class being instantiated"
592+ line $ "Member " ++ showIdent ident ++ " is not a member of the class being instantiated"
593 goSimple (ExpectedType ty kind) =
593 goSimple (ExpectedType ty kind) =
594 paras [ line "In a type-annotated expression x :: t, the type t must have kind *."
594 paras [ line "In a type-annotated expression x :: t, the type t must have kind *."
595 , line $ "The error arises from the type " ++ prettyPrintType ty ++ " having the kind " ++ prettyPrintKind kind ++ " instead."
595 , line $ "The error arises from the type " ++ prettyPrintType ty ++ " having the kind " ++ prettyPrintKind kind ++ " instead."
597 goSimple (IncorrectConstructorArity nm) =
597 goSimple (IncorrectConstructorArity nm) =
598− line $ "Wrong number of arguments to constructor " ++ show nm
598+ line $ "Wrong number of arguments to constructor " ++ showQualified runProperName nm
599− goSimple SubsumptionCheckFailed = line $ "Unable to check type subsumption"
599+ goSimple SubsumptionCheckFailed = line "Unable to check type subsumption"
600 goSimple (ExprDoesNotHaveType expr ty) =
600 goSimple (ExprDoesNotHaveType expr ty) =
601 paras [ line "Expression"
601 paras [ line "Expression"
602 , indent $ line $ prettyPrintValue expr
602 , indent $ line $ prettyPrintValue expr
@@ -614,7 +614,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
614 goSimple TypeSynonymInstance =
614 goSimple TypeSynonymInstance =
615 line "Type synonym instances are disallowed"
615 line "Type synonym instances are disallowed"
616 goSimple (OrphanInstance nm cnm ts) =
616 goSimple (OrphanInstance nm cnm ts) =
617− paras [ line $ "Instance " ++ show nm ++ " for " ++ show cnm ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ " is an orphan instance."
617+ paras [ line $ "Instance " ++ showIdent nm ++ " for " ++ showQualified runProperName cnm ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ " is an orphan instance."
618 , line "An orphan instance is an instance which is defined in neither the class module nor the data type module."
618 , line "An orphan instance is an instance which is defined in neither the class module nor the data type module."
619 , line "Consider moving the instance, if possible, or using a newtype wrapper."
619 , line "Consider moving the instance, if possible, or using a newtype wrapper."
@@ -625,19 +625,19 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
625 , indent $ line $ prettyPrintType ty
625 , indent $ line $ prettyPrintType ty
627 goSimple (TransitiveExportError x ys) =
627 goSimple (TransitiveExportError x ys) =
628− paras $ (line $ "An export for " ++ prettyPrintExport x ++ " requires the following to also be exported: ")
628+ paras $ line ("An export for " ++ prettyPrintExport x ++ " requires the following to also be exported: ")
629 : map (line . prettyPrintExport) ys
629 : map (line . prettyPrintExport) ys
630 goSimple (ShadowedName nm) =
630 goSimple (ShadowedName nm) =
631− line $ "Name '" ++ show nm ++ "' was shadowed."
631+ line $ "Name '" ++ showIdent nm ++ "' was shadowed."
632 goSimple (ClassOperator className opName) =
632 goSimple (ClassOperator className opName) =
633− paras [ line $ "Class '" ++ show className ++ "' declares operator " ++ show opName ++ "."
633+ paras [ line $ "Class '" ++ runProperName className ++ "' declares operator " ++ showIdent opName ++ "."
634− , indent $ line $ "This may be disallowed in the future - consider declaring a named member in the class and making the operator an alias:"
634+ , indent $ line "This may be disallowed in the future - consider declaring a named member in the class and making the operator an alias:"
635− , indent $ line $ show opName ++ " = someMember"
635+ , indent $ line $ showIdent opName ++ " = someMember"
637 goSimple (MisleadingEmptyTypeImport mn name) =
637 goSimple (MisleadingEmptyTypeImport mn name) =
638− line $ "Importing type " ++ show name ++ "(..) from " ++ show mn ++ " is misleading as it has no exported data constructors"
638+ line $ "Importing type " ++ runProperName name ++ "(..) from " ++ runModuleName mn ++ " is misleading as it has no exported data constructors"
639 goSimple (ImportHidingModule name) =
639 goSimple (ImportHidingModule name) =
640− line $ "Attempted to hide module " ++ show name ++ " in import expression, this is not permitted"
640+ line $ "Attempted to hide module " ++ runModuleName name ++ " in import expression, this is not permitted"
641 goSimple (WildcardInferredType ty) =
641 goSimple (WildcardInferredType ty) =
642 line $ "The wildcard type definition has the inferred type " ++ prettyPrintType ty
642 line $ "The wildcard type definition has the inferred type " ++ prettyPrintType ty
643 goSimple (NotExhaustivePattern bs b) =
643 goSimple (NotExhaustivePattern bs b) =
@@ -652,7 +652,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
653 [ line "..." | not b ]
653 [ line "..." | not b ]
654 go (NotYetDefined names err) =
654 go (NotYetDefined names err) =
655− paras [ line $ "The following are not yet defined here: " ++ intercalate ", " (map show names) ++ ":"
655+ paras [ line $ "The following are not yet defined here: " ++ intercalate ", " (map showIdent names) ++ ":"
656 , indent $ go err
656 , indent $ go err
658 go (ErrorUnifyingTypes t1 t2 err) =
658 go (ErrorUnifyingTypes t1 t2 err) =
@@ -668,7 +668,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
670 go (ErrorInModule mn err) =
670 go (ErrorInModule mn err) =
671− paras [ lineWithLevel $ "in module " ++ show mn ++ ":"
671+ paras [ lineWithLevel $ "in module " ++ runModuleName mn ++ ":"
674 go (ErrorInSubsumption t1 t2 err) =
674 go (ErrorInSubsumption t1 t2 err) =
@@ -679,7 +679,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
681 go (ErrorInInstance name ts err) =
681 go (ErrorInInstance name ts err) =
682− paras [ lineWithLevel $ "in type class instance " ++ show name ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ ":"
682+ paras [ lineWithLevel $ "in type class instance " ++ showQualified runProperName name ++ " " ++ unwords (map prettyPrintTypeAtom ts) ++ ":"
685 go (ErrorCheckingKind ty err) =
685 go (ErrorCheckingKind ty err) =
@@ -709,15 +709,15 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
711 go (ErrorInDataConstructor nm err) =
711 go (ErrorInDataConstructor nm err) =
712− paras [ lineWithLevel $ "in data constructor " ++ show nm ++ ":"
712+ paras [ lineWithLevel $ "in data constructor " ++ runProperName nm ++ ":"
715 go (ErrorInTypeConstructor nm err) =
715 go (ErrorInTypeConstructor nm err) =
716− paras [ lineWithLevel $ "in type constructor " ++ show nm ++ ":"
716+ paras [ lineWithLevel $ "in type constructor " ++ runProperName nm ++ ":"
719 go (ErrorInBindingGroup nms err) =
719 go (ErrorInBindingGroup nms err) =
720− paras [ lineWithLevel $ "in binding group " ++ intercalate ", " (map show nms) ++ ":"
720+ paras [ lineWithLevel $ "in binding group " ++ intercalate ", " (map showIdent nms) ++ ":"
723 go (ErrorInDataBindingGroup err) =
723 go (ErrorInDataBindingGroup err) =
@@ -725,15 +725,15 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
727 go (ErrorInTypeSynonym name err) =
727 go (ErrorInTypeSynonym name err) =
728− paras [ lineWithLevel $ "in type synonym " ++ show name ++ ":"
728+ paras [ lineWithLevel $ "in type synonym " ++ runProperName name ++ ":"
731 go (ErrorInValueDeclaration n err) =
731 go (ErrorInValueDeclaration n err) =
732− paras [ lineWithLevel $ "in value declaration " ++ show n ++ ":"
732+ paras [ lineWithLevel $ "in value declaration " ++ showIdent n ++ ":"
735 go (ErrorInForeignImport nm err) =
735 go (ErrorInForeignImport nm err) =
736− paras [ lineWithLevel $ "in foreign import " ++ show nm ++ ":"
736+ paras [ lineWithLevel $ "in foreign import " ++ showIdent nm ++ ":"
739 go (PositionedError srcSpan err) =
739 go (PositionedError srcSpan err) =
@@ -753,8 +753,8 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
753 suggestions :: ErrorMessage -> [Box.Box]
753 suggestions :: ErrorMessage -> [Box.Box]
754 suggestions = suggestions' . unwrapErrorMessage
754 suggestions = suggestions' . unwrapErrorMessage
756− suggestions' (ConflictingImport nm im) = [ line $ "Possible fix: hide " ++ show nm ++ " when importing " ++ show im ++ ":"
756+ suggestions' (ConflictingImport nm im) = [ line $ "Possible fix: hide " ++ show nm ++ " when importing " ++ runModuleName im ++ ":"
757− , indent . line $ "import " ++ show im ++ " hiding (" ++ nm ++ ")"
757+ , indent . line $ "import " ++ runModuleName im ++ " hiding (" ++ nm ++ ")"
759 suggestions' (TypesDoNotUnify t1 t2)
759 suggestions' (TypesDoNotUnify t1 t2)
760 | isObject t1 && isFunction t2 = [line "Note that function composition in PureScript is defined using (<<<)"]
760 | isObject t1 && isFunction t2 = [line "Note that function composition in PureScript is defined using (<<<)"]
@@ -768,11 +768,11 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage <$> onTypesInError
768 -- Pretty print and export declaration
768 -- Pretty print and export declaration
770 prettyPrintExport :: DeclarationRef -> String
770 prettyPrintExport :: DeclarationRef -> String
771− prettyPrintExport (TypeRef pn _) = show pn
771+ prettyPrintExport (TypeRef pn _) = runProperName pn
772− prettyPrintExport (ValueRef ident) = show ident
772+ prettyPrintExport (ValueRef ident) = showIdent ident
773− prettyPrintExport (TypeClassRef pn) = show pn
773+ prettyPrintExport (TypeClassRef pn) = runProperName pn
774− prettyPrintExport (TypeInstanceRef ident) = show ident
774+ prettyPrintExport (TypeInstanceRef ident) = showIdent ident
775− prettyPrintExport (ModuleRef name) = "module " ++ show name
775+ prettyPrintExport (ModuleRef name) = "module " ++ runModuleName name
776 prettyPrintExport (PositionedDeclarationRef _ _ ref) = prettyPrintExport ref
776 prettyPrintExport (PositionedDeclarationRef _ _ ref) = prettyPrintExport ref