1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Haskell-language backend: scope model, AbcSize, used-once/never-used.
//!
//! Metric spec (mirrors the Rust/Zig backends' semantics where a direct
//! analogue exists):
//! - Units: every value-level `function` (has a `match`) and every
//! top-level / class / instance `bind` with a `match`. Nested
//! where-bound `function`s are separate units. Local `let`/`where`
//! binds and lambdas roll into the enclosing unit.
//! - A: local named binds (+1), do/`<-` pattern binders, generator and
//! pattern-guard binders, case-alternative and lambda pattern
//! binders, as-patterns. Unit parameters are protocol (not A).
//! - B: applications (`apply`), non-condition `infix` operators,
//! unary `negation`.
//! - C: `conditional`, each `alternative`, boolean/pattern guards,
//! multi-way-if matches, comparisons and `&&`/`||`.
//! - UsedOnce: single plain write, pure RHS, straight-line write,
//! single read after the write. Parameters and pattern binders are
//! protocol. Root-scope (module) bindings stay unreported
//! (`include_root_scope: false`) because exports may be consumed
//! elsewhere.
//! - NeverUsed: written but never read, reported at the first write.
//! Parameters and pattern binders stay exempt (`exempt_bindings`),
//! matching the man-page contract.
pub
use Tree;
pub use ;