GHC.Core.Stats

ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Core.Stats

Contents

- Expression and bindings size

Description

Functions to computing the statistics reflective of the "size" of a Core expression

Synopsis

- coreBindsSize :: [CoreBind] -> Int
- exprSize :: CoreExpr -> Int
- data CoreStats = CS {
  - cs_tm :: !Int
  - cs_ty :: !Int
  - cs_co :: !Int
  - cs_vb :: !Int
  - cs_jb :: !Int
  }
- coreBindsStats :: [CoreBind] -> CoreStats
- exprStats :: CoreExpr -> CoreStats

# Expression and bindings size

coreBindsSize :: [CoreBind] -> Int #

exprSize :: CoreExpr -> Int #

A measure of the size of the expressions, strictly greater than 0 Counts *leaves*, not internal nodes. Types and coercions are not counted.

data CoreStats #

Constructors

CS |
Fields cs_tm :: !Int cs_ty :: !Int cs_co :: !Int cs_vb :: !Int cs_jb :: !Int

#### Instances

Instances details

Outputable CoreStats # |
Instance details Defined in GHC.Core.Stats Methods ppr :: CoreStats -> SDoc #

coreBindsStats :: [CoreBind] -> CoreStats #

exprStats :: CoreExpr -> CoreStats #