HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

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

  • 7 types
  • 2 classes
  • 38 values
  • Packageghc-9.10.3
  • Exports47
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceLogger.hs
classclass HasLogger (m :: Type -> Type) where
#

Methods

Instances8HasLogger, …

Logger setup

6 declarations
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

8 declarations

Dumping

7 declarations

Tracing

5 declarations