Skip to main content

Module explain

Module explain 

Source
Expand description

Error code explanations.

This module provides detailed explanations for error codes, accessible via the --explain flag (e.g., bhc --explain E0001).

§Error Code Conventions

  • E0xxx: Type errors
  • E00xx: Basic type mismatches (E0001-E0019)
  • E002x: Shape/dimension errors (E0020-E0039)
  • E003x: Tensor operation errors (E0030-E0039)
  • E004x: Pattern matching errors (E0040-E0049)
  • E005x: Module/import errors (E0050-E0059)
  • W0xxx: Warnings
  • W001x: Unused bindings (W0010-W0019)
  • W002x: Deprecated features (W0020-W0029)

§M10 Phase 4: Contextual Help

Each error explanation includes:

  • Documentation links to relevant sections
  • Related error codes for similar issues
  • Common mistake patterns with fixes

Structs§

CommonMistake
A common mistake pattern with its fix.
ErrorExplanation
An error code explanation.

Functions§

all_error_codes
Get all registered error codes.
format_explanation
Format an error explanation for display.
get_explanation
Look up an error explanation by code.
print_explanation
Print an error explanation to stdout.