CoreStats

ghc-8.10.7: The GHC API

Safe Haskell | None
Language | Haskell2010

CoreStats

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 CoreStats Methods ppr :: CoreStats -> SDoc # pprPrec :: Rational -> CoreStats -> SDoc #

coreBindsStats :: [CoreBind] -> CoreStats #

exprStats :: CoreExpr -> CoreStats #