mirror of
https://github.com/github/semantic.git
synced 2024-12-29 18:06:14 +03:00
Add traceError
This commit is contained in:
parent
8a66ce5509
commit
aed8dc607d
@ -317,3 +317,6 @@ resumingTypeError = runTypesWith (\ (BaseError context err) -> trace ("TypeError
|
|||||||
|
|
||||||
prettyShow :: Show a => a -> String
|
prettyShow :: Show a => a -> String
|
||||||
prettyShow = hscolour TTY defaultColourPrefs False False "" False . ppShow
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user