From eb7b74a041cb2d60e0b7d8b23d3ba2c2414df4ad Mon Sep 17 00:00:00 2001 From: Brian Huffman Date: Mon, 24 Jun 2019 11:43:08 -0700 Subject: [PATCH] Improved formatting for fixity error message. Cf. #590. --- src/Cryptol/ModuleSystem/Renamer.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Cryptol/ModuleSystem/Renamer.hs b/src/Cryptol/ModuleSystem/Renamer.hs index 3625ba2d6..7d28ff1cf 100644 --- a/src/Cryptol/ModuleSystem/Renamer.hs +++ b/src/Cryptol/ModuleSystem/Renamer.hs @@ -128,8 +128,10 @@ instance PP RenamerError where FixityError o1 f1 o2 f2 disp -> fixNameDisp disp $ hang (text "[error] at" <+> pp (srcRange o1) <+> text "and" <+> pp (srcRange o2)) - 4 (fsep [ text "The fixities of", pp (thing o1), parens (pp f1) - , text "and", pp (thing o2), parens (pp f2) + 4 (fsep [ text "The fixities of" + , nest 2 $ vcat + [ "•" <+> pp (thing o1) <+> parens (pp f1) + , "•" <+> pp (thing o2) <+> parens (pp f2) ] , text "are not compatible." , text "You may use explicit parentheses to disambiguate." ])