Commit accbc242 authored by Sylvain Henry's avatar Sylvain Henry Committed by Marge Bot
Browse files

DynFlags: disentangle Outputable

- put panic related functions into GHC.Utils.Panic
- put trace related functions using DynFlags in GHC.Driver.Ppr

One step closer making Outputable fully independent of DynFlags.

Bump haddock submodule
parent f1088b3f
......@@ -338,6 +338,7 @@ import GHC.Driver.Types
import GHC.Driver.CmdLine
import GHC.Driver.Session hiding (WarnReason(..))
import GHC.Platform.Ways
import GHC.Driver.Ppr
import GHC.SysTools
import GHC.SysTools.BaseDir
import GHC.Types.Annotations
......
......@@ -181,9 +181,11 @@ import GHC.Types.SrcLoc ( noSrcSpan )
import GHC.Types.Unique
import Data.Array
import GHC.Data.FastString
import GHC.Data.BooleanFormula ( mkAnd )
import GHC.Utils.Outputable
import GHC.Utils.Misc
import GHC.Data.BooleanFormula ( mkAnd )
import GHC.Utils.Panic
import qualified Data.ByteString.Char8 as BS
......
......@@ -121,6 +121,7 @@ import GHC.Types.Unique
import GHC.Builtin.Names
import GHC.Data.FastString
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Core.TyCo.Rep -- Doesn't need special access, but this is easier to avoid
-- import loops which show up if you import Type instead
......
......@@ -33,10 +33,12 @@ import GHC.Core.TyCon
import GHC.Core.DataCon
import GHC.Types.Id
import GHC.Types.Basic
import GHC.Utils.Outputable
import GHC.Types.Unique
import GHC.Types.Name
import GHC.Utils.Outputable
import GHC.Utils.Misc
import GHC.Utils.Panic
import Data.Bits
import Data.Maybe
......
......@@ -72,6 +72,7 @@ import GHC.Core.Class
import GHC.Core.TyCon
import GHC.Types.Unique.FM
import GHC.Utils.Misc
import GHC.Utils.Panic
import GHC.Builtin.Types.Literals ( typeNatTyCons )
import GHC.Hs.Doc
......
......@@ -33,6 +33,7 @@ import GHC.StgToCmm.Layout ( ArgRep(..) )
import GHC.Runtime.Heap.Layout
import GHC.Driver.Session
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Platform
import GHC.Utils.Misc
import GHC.Types.Unique
......
......@@ -127,6 +127,7 @@ import GHC.Types.Unique
import GHC.Builtin.PrimOps
import GHC.Types.CostCentre
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Data.FastString
import GHC.Driver.Session
import GHC.Driver.Backend
......
......@@ -16,6 +16,7 @@ import GHC.Driver.Session
import GHC.Platform
import GHC.Platform.Profile
import GHC.Utils.Outputable
import GHC.Utils.Panic
-- Calculate the 'GlobalReg' or stack locations for function call
-- parameters as used by the Cmm calling convention.
......
......@@ -24,6 +24,7 @@ import qualified Data.List as List
import Data.Word
import qualified Data.Map as M
import GHC.Utils.Outputable
import GHC.Utils.Panic
import qualified GHC.Data.TrieMap as TM
import GHC.Types.Unique.FM
import GHC.Types.Unique
......
......@@ -36,6 +36,7 @@ import GHC.Core
import GHC.Data.FastString ( nilFS, mkFastString )
import GHC.Unit.Module
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Cmm.Ppr.Expr ( pprExpr )
import GHC.Types.SrcLoc
import GHC.Utils.Misc ( seqList )
......
......@@ -39,7 +39,7 @@ import GHC.Cmm.CLabel
import GHC.Cmm.MachOp
import GHC.Cmm.Type
import GHC.Driver.Session
import GHC.Utils.Outputable (panic)
import GHC.Utils.Panic (panic)
import GHC.Types.Unique
import Data.Set (Set)
......
......@@ -29,6 +29,7 @@ import GHC.Cmm.Utils
import GHC.Driver.Session
import GHC.Data.Maybe
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Runtime.Heap.Layout
import GHC.Types.Unique.Supply
import GHC.Types.CostCentre
......
......@@ -35,6 +35,7 @@ import GHC.Utils.Misc
import GHC.Driver.Session
import GHC.Data.FastString
import GHC.Utils.Outputable hiding ( isEmpty )
import GHC.Utils.Panic
import qualified Data.Set as Set
import Control.Monad.Fix
import Data.Array as Array
......
......@@ -25,6 +25,7 @@ import GHC.Cmm.Dataflow.Label
import GHC.Data.Maybe
import GHC.Utils.Outputable
import GHC.Utils.Panic
-----------------------------------------------------------------------------
-- Calculating what variables are live on entry to a basic block
......
......@@ -19,7 +19,7 @@ import GHC.Cmm.Utils
import GHC.Cmm
import GHC.Utils.Misc
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Platform
import Data.Bits
......
......@@ -247,6 +247,7 @@ import GHC.Types.Unique
import GHC.Types.Unique.FM
import GHC.Types.SrcLoc
import GHC.Driver.Session
import GHC.Driver.Ppr
import GHC.Utils.Error
import GHC.Data.StringBuffer
import GHC.Data.FastString
......@@ -1047,7 +1048,7 @@ callishMachOps = listToUFM $
args' = init args
align = case last args of
CmmLit (CmmInt alignInteger _) -> fromInteger alignInteger
e -> pprPgmError "Non-constant alignment in memcpy-like function:" (ppr e)
e -> pgmErrorDoc "Non-constant alignment in memcpy-like function:" (ppr e)
-- The alignment of memcpy-ish operations must be a
-- compile-time constant. We verify this here, passing it around
-- in the MO_* constructor. In order to do this, however, we
......
......@@ -46,6 +46,7 @@ import GHC.Platform
import GHC.Cmm.Ppr.Expr
import GHC.Cmm
import GHC.Driver.Ppr
import GHC.Driver.Session
import GHC.Utils.Outputable
import GHC.Data.FastString
......
......@@ -41,8 +41,10 @@ where
import GHC.Prelude
import GHC.Platform
import GHC.Driver.Session (targetPlatform)
import GHC.Driver.Ppr
import GHC.Platform
import GHC.Cmm.Expr
import GHC.Utils.Outputable
......
......@@ -24,6 +24,7 @@ import Data.List (sortBy)
import GHC.Data.Maybe
import Control.Monad
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Platform
import GHC.Types.Unique.Supply
import GHC.Cmm.Dataflow.Block
......
......@@ -16,6 +16,7 @@ import GHC.Prelude
import GHC.Utils.Outputable
import GHC.Driver.Backend
import GHC.Utils.Panic
import GHC.Cmm.Dataflow.Label (Label)
import Data.Maybe
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment