HORIZON HASKELLDocslts/ghc-10.0.x8174fa42026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8174fa4 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

GHC.Prelude

Custom GHC Prelude

This module serves as a replacement for the Prelude module and abstracts over differences between the bootstrapping GHC version, and may also provide a common default vocabulary.

  • 12 values
valuepprTraceWith :: String -> (a -> SDoc) -> a -> a
#

pprTraceWith desc f x is equivalent to pprTrace desc (f x) x. This allows you to print details from the returned value as well as from ambient variables.

valuepprTrace_ :: String -> SDoc -> ()
#

A version of pprTrace that is useful for quick debugging:

fooBar x y
  | cond      = body1
  | otherwise = body2
  where
    !_ = pprTrace_ "fooBar" $
         vcat [ text "x:" + ppr x
              , text "y:" + ppr y
              , text "cond:" + ppr cond
              ]