Skip to content

Commit

Permalink
Pretty print exception in displayException
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonchinn178 authored and mrkkrp committed May 23, 2023
1 parent 17ae060 commit 7e76dbc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
not mentioned in an existing cabal file. [Issue
1032](https://github.com/tweag/ormolu/issues/1032)

* Update `displayException` for `OrmoluException` to pretty print the
exception. [PR 1031](https://github.com/tweag/ormolu/pull/1031).

## Ormolu 0.7.0.0

* Inference of operator fixity information is now more precise and takes
Expand Down
3 changes: 2 additions & 1 deletion src/Ormolu/Exception.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ data OrmoluException
OrmoluFixityOverridesParseError (ParseErrorBundle Text Void)
deriving (Show)

instance Exception OrmoluException
instance Exception OrmoluException where
displayException = T.unpack . runTermPure . printOrmoluException

-- | Print an 'OrmoluException'.
printOrmoluException ::
Expand Down

0 comments on commit 7e76dbc

Please sign in to comment.