alternative to loadWithLogge

Hello, ghc-mod, IDE-like back-end for Emacs, uses warning related APIs including loadWithLogger and getWarnings in GHC 7.0.3 API. I found that they disappeared in GHC 7.2.1 API. What should I use to handle warnings in GHC 7.2.1 API? --Kazu

On Tue, Aug 16, 2011 at 2:25 AM, Kazu Yamamoto
Hello,
ghc-mod, IDE-like back-end for Emacs, uses warning related APIs including loadWithLogger and getWarnings in GHC 7.0.3 API. I found that they disappeared in GHC 7.2.1 API. What should I use to handle warnings in GHC 7.2.1 API?
You can set the log_action field of the session's DynFlags to a custom handler. Its value is type LogAction = Severity -> SrcSpan -> PprStyle -> Message -> IO () The Severity parameter will let you tell whether a message is a warning or an error. Best, -Judah

Judah,
ghc-mod, IDE-like back-end for Emacs, uses warning related APIs including loadWithLogger and getWarnings in GHC 7.0.3 API. I found that they disappeared in GHC 7.2.1 API. What should I use to handle warnings in GHC 7.2.1 API?
You can set the log_action field of the session's DynFlags to a custom handler. Its value is
type LogAction = Severity -> SrcSpan -> PprStyle -> Message -> IO ()
The Severity parameter will let you tell whether a message is a warning or an error.
Thank you very much for this information. Now ghc-mod can be complied with GHC 7.2.1! --Kazu
participants (2)
-
Judah Jacobson
-
Kazu Yamamoto