git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Remove some 'the's
commit8432b7caa31b6e90080a118319cb55f94f54b1d3 authorPhil Freeman <paf31@cantab.net> dateSat 24 Oct 2015, 14:49 (11 years ago) parent688fc66
1 file changed+42−40
src/Language/PureScript/Errors.hs+42−40
src/Language/PureScript/Errors.hs+42−40
@@ -457,19 +457,19 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
457457 renderSimpleErrorMessage (UnknownDataConstructor dc tc) =
458458 line $ "Unknown data constructor " ++ showQualified runProperName dc ++ foldMap ((" for type constructor " ++) . showQualified runProperName) tc
459459 renderSimpleErrorMessage (UnknownImportType mn name) =
460− paras [ line $ "Cannot import the type " ++ runProperName name ++ " from module " ++ runModuleName mn
460+ paras [ line $ "Cannot import type " ++ runProperName name ++ " from module " ++ runModuleName mn
461461 , line "It either does not exist or the module does not export it."
462462 ]
463463 renderSimpleErrorMessage (UnknownExportType name) =
464464 line $ "Cannot export unknown type " ++ runProperName name
465465 renderSimpleErrorMessage (UnknownImportTypeClass mn name) =
466− paras [ line $ "Cannot import the type class " ++ runProperName name ++ " from module " ++ runModuleName mn
466+ paras [ line $ "Cannot import type class " ++ runProperName name ++ " from module " ++ runModuleName mn
467467 , line "It either does not exist or the module does not export it."
468468 ]
469469 renderSimpleErrorMessage (UnknownExportTypeClass name) =
470470 line $ "Cannot export unknown type class " ++ runProperName name
471471 renderSimpleErrorMessage (UnknownImportValue mn name) =
472− paras [ line $ "Cannot import the value " ++ showIdent name ++ " from module " ++ runModuleName mn
472+ paras [ line $ "Cannot import value " ++ showIdent name ++ " from module " ++ runModuleName mn
473473 , line "It either does not exist or the module does not export it."
474474 ]
475475 renderSimpleErrorMessage (UnknownExportValue name) =
@@ -483,7 +483,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
483483 renderSimpleErrorMessage (UnknownExportDataConstructor tcon dcon) =
484484 line $ "Cannot export data constructor " ++ runProperName dcon ++ " for type " ++ runProperName tcon ++ ", as it has not been declared."
485485 renderSimpleErrorMessage (ConflictingImport nm mn) =
486− paras [ line $ "Cannot declare " ++ show nm ++ ", since another declaration of that name was imported from the module " ++ runModuleName mn
486+ paras [ line $ "Cannot declare " ++ show nm ++ ", since another declaration of that name was imported from module " ++ runModuleName mn
487487 , line $ "Consider hiding " ++ show nm ++ " when importing " ++ runModuleName mn ++ ":"
488488 , indent . line $ "import " ++ runModuleName mn ++ " hiding (" ++ nm ++ ")"
489489 ]
@@ -494,15 +494,15 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
494494 renderSimpleErrorMessage (ConflictingCtorDecls nm) =
495495 line $ "Conflicting data constructor declarations for " ++ runProperName nm
496496 renderSimpleErrorMessage (TypeConflictsWithClass nm) =
497− line $ "The type " ++ runProperName nm ++ " conflicts with a type class declaration of the same name."
497+ line $ "Type " ++ runProperName nm ++ " conflicts with a type class declaration with the same name."
498498 renderSimpleErrorMessage (CtorConflictsWithClass nm) =
499− line $ "The data constructor " ++ runProperName nm ++ " conflicts with a type class declaration of the same name."
499+ line $ "Data constructor " ++ runProperName nm ++ " conflicts with a type class declaration with the same name."
500500 renderSimpleErrorMessage (ClassConflictsWithType nm) =
501− line $ "The type class " ++ runProperName nm ++ " conflicts with a type declaration of the same name."
501+ line $ "Type class " ++ runProperName nm ++ " conflicts with a type declaration with the same name."
502502 renderSimpleErrorMessage (ClassConflictsWithCtor nm) =
503− line $ "The type class " ++ runProperName nm ++ " conflicts with a data constructor declaration of the same name."
503+ line $ "Type class " ++ runProperName nm ++ " conflicts with a data constructor declaration with the same name."
504504 renderSimpleErrorMessage (DuplicateModuleName mn) =
505− line $ "The module " ++ runModuleName mn ++ " has been defined multiple times."
505+ line $ "Module " ++ runModuleName mn ++ " has been defined multiple times."
506506 renderSimpleErrorMessage (DuplicateClassExport nm) =
507507 line $ "Duplicate export declaration for type class " ++ runProperName nm
508508 renderSimpleErrorMessage (DuplicateValueExport nm) =
@@ -510,20 +510,22 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
510510 renderSimpleErrorMessage (CycleInDeclaration nm) =
511511 line $ "The value of " ++ showIdent nm ++ " is undefined here, so this reference is not allowed."
512512 renderSimpleErrorMessage (CycleInModules mns) =
513− line $ "There is a cycle in the module dependencies: " ++ intercalate ", " (map runModuleName mns)
513+ paras [ line $ "There is a cycle in module dependencies in these modules: "
514+ , indent $ paras (map (line . runModuleName) mns)
515+ ]
514516 renderSimpleErrorMessage (CycleInTypeSynonym name) =
515517 paras [ line $ case name of
516− Just pn -> "A cycle appears in the definition of the type synonym " ++ runProperName pn
518+ Just pn -> "A cycle appears in the definition of type synonym " ++ runProperName pn
517519 Nothing -> "A cycle appears in a set of type synonym definitions."
518520 , line "Cycles are disallowed because they can lead to loops in the type checker."
519521 , line "Consider using a 'newtype' instead."
520522 ]
521523 renderSimpleErrorMessage (NameIsUndefined ident) =
522− line $ "The value " ++ showIdent ident ++ " is undefined."
524+ line $ "Value " ++ showIdent ident ++ " is undefined."
523525 renderSimpleErrorMessage (UndefinedTypeVariable name) =
524− line $ "The type variable " ++ runProperName name ++ " is undefined."
526+ line $ "Type variable " ++ runProperName name ++ " is undefined."
525527 renderSimpleErrorMessage (PartiallyAppliedSynonym name) =
526− paras [ line $ "The type synonym " ++ showQualified runProperName name ++ " is partially applied."
528+ paras [ line $ "Type synonym " ++ showQualified runProperName name ++ " is partially applied."
527529 , line "Type synonyms must be applied to all of their type arguments."
528530 ]
529531 renderSimpleErrorMessage (EscapedSkolem binding) =
@@ -544,7 +546,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
544546 , indent $ line $ prettyPrintKind k2
545547 ]
546548 renderSimpleErrorMessage (ConstrainedTypeUnified t1 t2) =
547− paras [ line "Could not match the constrained type"
549+ paras [ line "Could not match constrained type"
548550 , indent $ typeAsBox t1
549551 , line "with type"
550552 , indent $ typeAsBox t2
@@ -567,7 +569,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
567569 ]
568570 ]
569571 renderSimpleErrorMessage (PossiblyInfiniteInstance nm ts) =
570− paras [ line "The type class instance for"
572+ paras [ line "Type class instance for"
571573 , indent $ Box.hsep 1 Box.left [ line (showQualified runProperName nm)
572574 , Box.vcat Box.left (map typeAtomAsBox ts)
573575 ]
@@ -582,12 +584,12 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
582584 renderSimpleErrorMessage (CannotFindDerivingType nm) =
583585 line $ "Cannot derive a type class instance, because the type declaration for " ++ runProperName nm ++ " could not be found."
584586 renderSimpleErrorMessage (DuplicateLabel l expr) =
585− paras $ [ line $ "The label " ++ show l ++ " appears more than once in a row type." ]
587+ paras $ [ line $ "Label " ++ show l ++ " appears more than once in a row type." ]
586588 <> foldMap (\expr' -> [ line "Relevant expression: "
587589 , indent $ prettyPrintValue expr'
588590 ]) expr
589591 renderSimpleErrorMessage (DuplicateTypeArgument name) =
590− line $ "The type argument " ++ show name ++ " appears more than once."
592+ line $ "Type argument " ++ show name ++ " appears more than once."
591593 renderSimpleErrorMessage (DuplicateValueDeclaration nm) =
592594 line $ "Multiple value declarations exist for " ++ showIdent nm ++ "."
593595 renderSimpleErrorMessage (ArgListLengthsDiffer ident) =
@@ -595,7 +597,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
595597 renderSimpleErrorMessage (OverlappingArgNames ident) =
596598 line $ "Overlapping names in function/binder" ++ foldMap ((" in declaration" ++) . showIdent) ident
597599 renderSimpleErrorMessage (MissingClassMember ident) =
598− line $ "The type class member " ++ showIdent ident ++ " has not been implemented."
600+ line $ "Type class member " ++ showIdent ident ++ " has not been implemented."
599601 renderSimpleErrorMessage (ExtraneousClassMember ident className) =
600602 line $ showIdent ident ++ " is not a member of type class " ++ showQualified runProperName className
601603 renderSimpleErrorMessage (ExpectedType ty kind) =
@@ -607,17 +609,17 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
607609 , line "instead."
608610 ]
609611 renderSimpleErrorMessage (IncorrectConstructorArity nm) =
610− line $ "The data constructor " ++ showQualified runProperName nm ++ " was given the wrong number of arguments in a case expression."
612+ line $ "Data constructor " ++ showQualified runProperName nm ++ " was given the wrong number of arguments in a case expression."
611613 renderSimpleErrorMessage (ExprDoesNotHaveType expr ty) =
612− paras [ line "The expression"
614+ paras [ line "Expression"
613615 , indent $ prettyPrintValue expr
614616 , line "does not have type"
615617 , indent $ typeAsBox ty
616618 ]
617619 renderSimpleErrorMessage (PropertyIsMissing prop row) =
618− paras [ line "The row type"
620+ paras [ line "Row type"
619621 , indent $ prettyPrintRowWith '(' ')' row
620− , line $ "lacks the required label " ++ show prop
622+ , line $ "lacks required label " ++ show prop
621623 ]
622624 renderSimpleErrorMessage (CannotApplyFunction fn arg) =
623625 paras [ line "A function of type"
@@ -628,7 +630,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
628630 renderSimpleErrorMessage TypeSynonymInstance =
629631 line "Type class instances for type synonyms are disallowed."
630632 renderSimpleErrorMessage (OrphanInstance nm cnm ts) =
631− paras [ line $ "The type class instance " ++ showIdent nm ++ " for "
633+ paras [ line $ "Type class instance " ++ showIdent nm ++ " for "
632634 , indent $ Box.hsep 1 Box.left [ line (showQualified runProperName cnm)
633635 , Box.vcat Box.left (map typeAtomAsBox ts)
634636 ]
@@ -637,11 +639,11 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
637639 , line "Consider moving the instance, if possible, or using a newtype wrapper."
638640 ]
639641 renderSimpleErrorMessage (InvalidNewtype name) =
640− paras [ line $ "The newtype " ++ runProperName name ++ " is invalid."
642+ paras [ line $ "Newtype " ++ runProperName name ++ " is invalid."
641643 , line "Newtypes must define a single constructor with a single argument."
642644 ]
643645 renderSimpleErrorMessage (InvalidInstanceHead ty) =
644− paras [ line "Type class instance head is invalid due to the use of the type"
646+ paras [ line "Type class instance head is invalid due to use of type"
645647 , indent $ typeAsBox ty
646648 , line "All types appearing in instance declarations must be of the form T a_1 .. a_n, where each type a_i is of the same form."
647649 ]
@@ -649,13 +651,13 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
649651 paras $ line ("An export for " ++ prettyPrintExport x ++ " requires the following to also be exported: ")
650652 : map (line . prettyPrintExport) ys
651653 renderSimpleErrorMessage (ShadowedName nm) =
652− line $ "The name '" ++ showIdent nm ++ "' was shadowed."
654+ line $ "Name '" ++ showIdent nm ++ "' was shadowed."
653655 renderSimpleErrorMessage (ShadowedTypeVar tv) =
654− line $ "The type variable '" ++ tv ++ "' was shadowed."
656+ line $ "Type variable '" ++ tv ++ "' was shadowed."
655657 renderSimpleErrorMessage (UnusedTypeVar tv) =
656− line $ "The type variable '" ++ tv ++ "' was declared but not used."
658+ line $ "Type variable '" ++ tv ++ "' was declared but not used."
657659 renderSimpleErrorMessage (ClassOperator className opName) =
658− paras [ line $ "The type class '" ++ runProperName className ++ "' declares operator " ++ showIdent opName ++ "."
660+ paras [ line $ "Type class '" ++ runProperName className ++ "' declares operator " ++ showIdent opName ++ "."
659661 , line "This may be disallowed in the future - consider declaring a named member in the class and making the operator an alias:"
660662 , indent . line $ showIdent opName ++ " = someMember"
661663 ]
@@ -666,7 +668,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
666668 , line $ "An attempt was made to hide the import of " ++ runModuleName name
667669 ]
668670 renderSimpleErrorMessage (WildcardInferredType ty) =
669− paras [ line "The wildcard type definition has the inferred type "
671+ paras [ line "Wildcard type definition has the inferred type "
670672 , indent $ typeAsBox ty
671673 ]
672674 renderSimpleErrorMessage (MissingTypeDeclaration ident) =
@@ -695,9 +697,9 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
695697 renderHint (NotYetDefined names) =
696698 line $ "The following are not yet defined here: " ++ intercalate ", " (map showIdent names) ++ ":"
697699 renderHint (ErrorUnifyingTypes t1 t2) =
698− paras [ lineWithLevel "while trying to match the type "
700+ paras [ lineWithLevel "while trying to match type "
699701 , indent $ typeAsBox t1
700− , line "with the type"
702+ , line "with type"
701703 , indent $ typeAsBox t2
702704 ]
703705 renderHint (ErrorInExpression expr) =
@@ -708,9 +710,9 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
708710 paras [ lineWithLevel $ "in module " ++ runModuleName mn ++ ":"
709711 ]
710712 renderHint (ErrorInSubsumption t1 t2) =
711− paras [ lineWithLevel "checking that the type"
713+ paras [ lineWithLevel "checking that type"
712714 , indent $ typeAsBox t1
713− , line "is at least as general as the type"
715+ , line "is at least as general as type"
714716 , indent $ typeAsBox t2
715717 ]
716718 renderHint (ErrorInInstance nm ts) =
@@ -720,17 +722,17 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
720722 ]
721723 ]
722724 renderHint (ErrorCheckingKind ty) =
723− paras [ lineWithLevel "checking the kind of the type"
725+ paras [ lineWithLevel "checking kind of type"
724726 , indent $ typeAsBox ty
725727 ]
726728 renderHint (ErrorInferringType expr) =
727− paras [ lineWithLevel "inferring the type of the expression"
729+ paras [ lineWithLevel "inferring type of expression"
728730 , indent $ prettyPrintValue expr
729731 ]
730732 renderHint (ErrorCheckingType expr ty) =
731− paras [ lineWithLevel "checking that the expression"
733+ paras [ lineWithLevel "checking that expression"
732734 , indent $ prettyPrintValue expr
733− , line "has the type"
735+ , line "has type"
734736 , indent $ typeAsBox ty
735737 ]
736738 renderHint (ErrorInApplication f t a) =
@@ -738,7 +740,7 @@ prettyPrintSingleError full level e = prettyPrintErrorMessage . positionHintsFir
738740 , indent $ prettyPrintValue f
739741 , line "of type"
740742 , indent $ typeAsBox t
741− , line "to the argument"
743+ , line "to argument"
742744 , indent $ prettyPrintValue a
743745 ]
744746 renderHint (ErrorInDataConstructor nm) =