HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Moduleghc-10.0.0.20260917GHC2024

GHC.Utils.Logger

Logger

The Logger is an configurable entity that is used by the compiler to output messages on the console (stdout, stderr) and in dump files.

The behaviour of default Logger returned by initLogger can be modified with hooks. The compiler itself uses hooks in multithreaded code (--make) and it is also probably used by ghc-api users (IDEs, etc.).

In addition to hooks, the Logger supports LogFlags: basically a subset of the command-line flags that control the logger behaviour at a higher level than hooks.

  1. Hooks are used to define how to generate a infowarningerror/dump messages

  2. LogFlags are used to decide when and how to generate messages

Contents
  1. Logger setup
  2. Hooks
  3. Flags
  4. Logging
  5. Dumping
  6. Tracing
Synopsis
classclass HasLogger (m :: Type -> Type) where
#

Methods

Instances8HasLogger, …

Logger setup

datadata DumpFormat

Format of a dump

Dump formats are loosely defined: dumps may contain various additional headers and annotations and they may be partial. DumpFormat is mainly a hint (e.g. for syntax highlighters).

Constructors

Instances2Eq, Show

Hooks

Flags

datadata LogFlags

Logger flags

Constructors

Logging

Dumping

Tracing