git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Use 'markCode' when pretty-printing Labels
0539687Harry Garrood
src/Language/PureScript/Errors.hs+3−3
@@ -671,7 +671,7 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
671 renderSimpleErrorMessage (CannotFindDerivingType nm) =
671 renderSimpleErrorMessage (CannotFindDerivingType nm) =
672 line $ "Cannot derive a type class instance, because the type declaration for " <> markCode (runProperName nm) <> " could not be found."
672 line $ "Cannot derive a type class instance, because the type declaration for " <> markCode (runProperName nm) <> " could not be found."
673 renderSimpleErrorMessage (DuplicateLabel l expr) =
673 renderSimpleErrorMessage (DuplicateLabel l expr) =
674− paras $ [ line $ "Label " <> prettyPrintLabel l <> " appears more than once in a row type." ]
674+ paras $ [ line $ "Label " <> markCode (prettyPrintLabel l) <> " appears more than once in a row type." ]
675 <> foldMap (\expr' -> [ line "Relevant expression: "
675 <> foldMap (\expr' -> [ line "Relevant expression: "
676 , markCodeBox $ indent $ prettyPrintValue valueDepth expr'
676 , markCodeBox $ indent $ prettyPrintValue valueDepth expr'
677 ]) expr
677 ]) expr
@@ -704,9 +704,9 @@ prettyPrintSingleError (PPEOptions codeColor full level showDocs) e = flip evalS
704 , markCodeBox $ indent $ typeAsBox ty
704 , markCodeBox $ indent $ typeAsBox ty
705 ]
705 ]
706 renderSimpleErrorMessage (PropertyIsMissing prop) =
706 renderSimpleErrorMessage (PropertyIsMissing prop) =
707− line $ "Type of expression lacks required label " <> prettyPrintLabel prop <> "."
707+ line $ "Type of expression lacks required label " <> markCode (prettyPrintLabel prop) <> "."
708 renderSimpleErrorMessage (AdditionalProperty prop) =
708 renderSimpleErrorMessage (AdditionalProperty prop) =
709− line $ "Type of expression contains additional label " <> prettyPrintLabel prop <> "."
709+ line $ "Type of expression contains additional label " <> markCode (prettyPrintLabel prop) <> "."
710 renderSimpleErrorMessage TypeSynonymInstance =
710 renderSimpleErrorMessage TypeSynonymInstance =
711 line "Type class instances for type synonyms are disallowed."
711 line "Type class instances for type synonyms are disallowed."
712 renderSimpleErrorMessage (OrphanInstance nm cnm ts) =
712 renderSimpleErrorMessage (OrphanInstance nm cnm ts) =