ghcide-2.7.0.0: The core of an IDE

Safe Haskell | None
Language | GHC2021

Development.IDE.GHC.Compat.Logger

Contents

- Logging stuff

Description

Compat module for GHC 9.2 Logger infrastructure.

Synopsis

- putLogHook :: Logger -> HscEnv -> HscEnv
- pushLogHook :: (LogAction -> LogAction) -> Logger -> Logger
- type LogActionCompat = LogFlags -> Maybe DiagnosticReason -> Maybe Severity -> SrcSpan -> PrintUnqualified -> SDoc -> IO ()
- logActionCompat :: LogActionCompat -> LogAction
- defaultLogActionHPutStrDoc :: LogFlags -> Bool -> Handle -> SDoc -> IO ()

# Documentation

putLogHook :: Logger -> HscEnv -> HscEnv #

pushLogHook :: (LogAction -> LogAction) -> Logger -> Logger #

Push a log hook

# Logging stuff

type LogActionCompat = LogFlags -> Maybe DiagnosticReason -> Maybe Severity -> SrcSpan -> PrintUnqualified -> SDoc -> IO () #

logActionCompat :: LogActionCompat -> LogAction #

defaultLogActionHPutStrDoc :: LogFlags -> Bool -> Handle -> SDoc -> IO () #

The boolean arguments let's the pretty printer know if it can optimize indent by writing ascii ' ' characters without going through decoding.