summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Error.hs-boot
blob: a455e730f2326b4ef268729778189295788c9251 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{-# LANGUAGE RankNTypes #-}

module GHC.Utils.Error where

import GHC.Prelude
import GHC.Utils.Outputable (SDoc, PprStyle )
import {-# SOURCE #-} GHC.Driver.Session ( DynFlags )

type DumpAction = DynFlags -> PprStyle -> DumpOptions -> String
                  -> DumpFormat -> SDoc -> IO ()

type TraceAction = forall a. DynFlags -> String -> SDoc -> a -> a

data DumpOptions = DumpOptions
   { dumpForcedToFile :: Bool
   , dumpSuffix       :: String
   }

data DumpFormat
  = FormatHaskell
  | FormatCore
  | FormatSTG
  | FormatByteCode
  | FormatCMM
  | FormatASM
  | FormatC
  | FormatLLVM
  | FormatText

defaultDumpAction :: DumpAction
defaultTraceAction :: TraceAction