GHC.Core.UsageEnv

ghc-9.0.0.20201227: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.Core.UsageEnv

Synopsis

- data UsageEnv
- addUsage :: Usage -> Usage -> Usage
- scaleUsage :: Mult -> Usage -> Usage
- zeroUE :: UsageEnv
- lookupUE :: NamedThing n => UsageEnv -> n -> Usage
- scaleUE :: Mult -> UsageEnv -> UsageEnv
- deleteUE :: NamedThing n => UsageEnv -> n -> UsageEnv
- addUE :: UsageEnv -> UsageEnv -> UsageEnv
- data Usage
  - = Zero
  - | Bottom
  - | MUsage Mult
- unitUE :: NamedThing n => n -> Mult -> UsageEnv
- bottomUE :: UsageEnv
- supUE :: UsageEnv -> UsageEnv -> UsageEnv
- supUEs :: [UsageEnv] -> UsageEnv

# Documentation

data UsageEnv Source #

#### Instances

Instances details

Outputable UsageEnv # |
Instance details Defined in GHC.Core.UsageEnv Methods ppr :: UsageEnv -> SDoc Source # pprPrec :: Rational -> UsageEnv -> SDoc Source #

addUsage :: Usage -> Usage -> Usage Source #

scaleUsage :: Mult -> Usage -> Usage Source #

zeroUE :: UsageEnv 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|.

scaleUE :: Mult -> UsageEnv -> UsageEnv Source #

deleteUE :: NamedThing n => UsageEnv -> n -> UsageEnv Source #

addUE :: UsageEnv -> UsageEnv -> UsageEnv Source #

data Usage Source #

Constructors

Zero |
Bottom |
MUsage Mult |

#### Instances

Instances details

Outputable Usage # |
Instance details Defined in GHC.Core.UsageEnv Methods ppr :: Usage -> SDoc Source # pprPrec :: Rational -> Usage -> SDoc Source #

unitUE :: NamedThing n => n -> Mult -> UsageEnv Source #

bottomUE :: UsageEnv Source #

supUE :: UsageEnv -> UsageEnv -> UsageEnv Source #

supUEs :: [UsageEnv] -> UsageEnv Source #