module GHC.Types.IPE (
DCMap,
ClosureMap,
InfoTableProvMap(..),
emptyInfoTableProvMap,
IpeSourceLocation
) where
import GHC.Prelude
import GHC.Types.Name
import GHC.Data.FastString
import GHC.Types.SrcLoc
import GHC.Core.DataCon
import GHC.Types.Unique.DFM
import GHC.Core.Type
import Data.List.NonEmpty
import GHC.Cmm.CLabel (CLabel)
import qualified Data.Map.Strict as Map
type IpeSourceLocation = (RealSrcSpan, LexicalFastString)
type ClosureMap = UniqDFM Name
(Name, (Type, Maybe IpeSourceLocation))
type DCMap = UniqDFM DataCon (DataCon, NonEmpty (Int, Maybe IpeSourceLocation))
type InfoTableToSourceLocationMap = Map.Map CLabel (Maybe IpeSourceLocation)
data InfoTableProvMap = InfoTableProvMap
{ InfoTableProvMap -> DCMap
provDC :: DCMap
, InfoTableProvMap -> ClosureMap
provClosure :: ClosureMap
, InfoTableProvMap -> InfoTableToSourceLocationMap
provInfoTables :: InfoTableToSourceLocationMap
}
emptyInfoTableProvMap :: InfoTableProvMap
emptyInfoTableProvMap :: InfoTableProvMap
emptyInfoTableProvMap = DCMap
-> ClosureMap -> InfoTableToSourceLocationMap -> InfoTableProvMap
InfoTableProvMap DCMap
forall {k} (key :: k) elt. UniqDFM key elt
emptyUDFM ClosureMap
forall {k} (key :: k) elt. UniqDFM key elt
emptyUDFM InfoTableToSourceLocationMap
forall k a. Map k a
Map.empty