Skip to content

Reader: bare < tokenizes as angle-opener and silently swallows the rest of the file #69

Description

@hierophantos

Found by the N6e grounding-audit (HEAD 55b59fc), traced end-to-end:

  1. Bare < tokenizes ONLY as langle (parse-reader.rkt:1188-1189, priority 25; lte/gte have symbol patterns at 26, bare < does not).
  2. The untyped bracket-depth counter treats langle as an opener but decrements on ANY closer (parse-reader.rkt:1263-1268) -> the line ends at depth 1 -> every subsequent line of the file becomes a continuation line.
  3. group-tokens opens a $angle-type group hunting a rangle and SILENTLY SKIPS stray closers (parse-reader.rkt:2152-2157) -> the file tail is absorbed as extra arguments.
  4. The mangled form becomes a prologos-error at preparse and is silently dropped by the driver merge filter #:when (not (prologos-error? s)) (driver.rkt:2155-2156) -- zero diagnostics; the file just loses its tail.

Example: [filter [< _ 3] xs] -- everything after < vanishes. Note < is not even the generic-comparison spelling (lt/le are) -- but the failure mode is catastrophic and diagnostic-free for ANY stray <.

Two fixes, separable: (a) the reader tokenization/depth treatment of bare <; (b) the driver silent filter should emit a loud error for dropped mangled commands -- (b) is scoped into Numerics N6e-E5 (docs/tracking/2026-06-30_NUMERICS_TRACK_STAGE3_DESIGN.md section 9d); (a) is this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions