Skip to content

Commit

Permalink
Improved formatting for fixity error message.
Browse files Browse the repository at this point in the history
Cf. #590.
  • Loading branch information
Brian Huffman committed Jun 24, 2019
1 parent f0e527a commit eb7b74a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Cryptol/ModuleSystem/Renamer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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." ])

Expand Down

0 comments on commit eb7b74a

Please sign in to comment.