ghc-9.12.1: The GHC API
Safe HaskellNone
LanguageGHC2021

GHC.Core.UsageEnv

Synopsis

Documentation

data Usage Source #

Constructors

Zero 
Bottom 
MUsage Mult 

Instances

Instances details
Outputable Usage Source # 
Instance details

Defined in GHC.Core.UsageEnv

Methods

ppr :: Usage -> SDoc Source #

data UsageEnv Source #

Instances

Instances details
Outputable UsageEnv Source # 
Instance details

Defined in GHC.Core.UsageEnv

Methods

ppr :: UsageEnv -> SDoc Source #

lookupUE :: NamedThing n => UsageEnv -> n -> Usage Source #

|lookupUE x env| returns the multiplicity assigned to |x| in |env|, if |x| is not bound in |env|, then returns |Zero| or |Bottom|.

singleUsageUE :: Id -> UsageEnv Source #

Record a single usage of an Id, i.e. {n: 1} Exception: We do not record external names (both GlobalIds and top-level LocalIds) because they're not relevant to linearity checking.