1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00

Add traceError

This commit is contained in:
Rick Winfrey 2018-08-06 14:43:44 -07:00
parent 8a66ce5509
commit aed8dc607d

View File

@ -317,3 +317,6 @@ resumingTypeError = runTypesWith (\ (BaseError context err) -> trace ("TypeError
prettyShow :: Show a => a -> String
prettyShow = hscolour TTY defaultColourPrefs False False "" False . ppShow
traceError :: (Member Trace effects, Effectful m, Show a) => String -> a -> ErrorContext -> m effects ()
traceError prefix err context = trace $ prefix <> ": " <> prettyShow err <> " " <> prettyShow context