Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
be35e86
Add canonical completion infrastructure and test scaffolding
disconcision Jan 24, 2026
e07088d
Implement canonical completion with blank-line heuristic
disconcision Jan 25, 2026
21b84db
Optimize partition_at_blank_lines to single O(n) pass
disconcision Jan 25, 2026
4136237
Optimize completion to single pass; unify Indentation completion
disconcision Jan 25, 2026
2ddee08
Update canonical-completion.md with current status
disconcision Jan 25, 2026
0977067
User-managed indentation with auto-insert on linebreak
disconcision Jan 25, 2026
9dab780
Document indentation-based partitioning heuristic plan
disconcision Jan 25, 2026
98a3adf
Add zero-indent partition heuristic and fix Parser auto-indent
disconcision Jan 25, 2026
14e20ce
Restore self-contained Indentation.re; remove CanonicalCompletion dep…
disconcision Jan 25, 2026
4cf87d0
Implement relative indent heuristic for canonical completion
disconcision Jan 25, 2026
9847746
Line movement skips leading/trailing whitespace
disconcision Jan 25, 2026
e1e8c27
Track content boundaries in Measured; fix decoration stretching
disconcision Jan 25, 2026
cbcb30f
Regrout after remold in canonical completion
disconcision Jan 25, 2026
c8d7839
Add whitespace editing features: indent-level backspace, hungry delet…
disconcision Jan 25, 2026
3d911d5
Update comma indentation test to match current behavior
disconcision Jan 25, 2026
ce968f4
Fix case expression indentation; add editing tests for indent behavior
disconcision Jan 26, 2026
b923c0f
Add insert-in-middle editing tests for indentation
disconcision Jan 26, 2026
2b37321
Add nested case tests and parse_with_caret test helper
disconcision Jan 26, 2026
311a205
Update canonical-completion.md with cleanup tasks and status
disconcision Jan 26, 2026
301bef6
old indentation code cleanup. printer no longer depends on measured. …
disconcision Jan 26, 2026
bd39a03
Optimize indentation algorithm: single-pass context computation
disconcision Jan 26, 2026
cc6428b
Remove union_all, use direct fold for child map merging
disconcision Jan 26, 2026
a782620
Add short-circuit level_of for single linebreak lookup
disconcision Jan 26, 2026
c1b6924
Update canonical-completion.md: mark indentation optimization as done
disconcision Jan 26, 2026
02da0f4
Add AutoFormat module and doc slide migration infrastructure
disconcision Jan 26, 2026
18d3e96
Update canonical-completion.md with migration status
disconcision Jan 26, 2026
82e5a99
Add Destruct(Line(Left)) for delete-to-line-start action
disconcision Jan 27, 2026
95e97e8
Add completion visualization module with text mockup format
disconcision Jan 27, 2026
cf21203
Elaborate MultiHole as right-associative Seq chain
disconcision Jan 27, 2026
1b91f39
Add QuiverDec visualization and simplify completion hole logic
disconcision Jan 27, 2026
c368d5c
Fix indent-level backspace triggering in wrong contexts
disconcision Jan 27, 2026
2126044
fmt
disconcision Jan 27, 2026
3ce8430
merge fix
disconcision Jan 29, 2026
b775e3d
glom triggered indentation - tests only, commented out
disconcision Jan 29, 2026
b23d03f
Merge branch 'projector-in-terms' into canonical-completion
disconcision Feb 2, 2026
09d039a
Merge branch 'projector-in-terms' into canonical-completion
disconcision Feb 3, 2026
0325978
Merge branch 'canonical-completion' of github.com:hazelgrove/hazel in…
disconcision Feb 4, 2026
9399a59
Merge branch 'dev' of github.com:hazelgrove/hazel into canonical-comp…
disconcision Feb 4, 2026
e0c6b86
mv plan in progress
disconcision Feb 4, 2026
3a5f8b8
Merge branch 'projector-in-terms' of github.com:hazelgrove/hazel into…
disconcision Feb 5, 2026
67ea1ed
Merge branch 'dev' into canonical-completion
disconcision Feb 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Hazel Project Guide

Hazel is a live functional programming environment with typed holes and live evaluation.

## Build & Test

### Building
```bash
make
```

### Running Tests

**Full test suite (very slow, ~4 minutes):**
```bash
make test
```
**Important test suite (slow, ~2 minutes):**
```bash
make test-quick
```

**Running specific tests (fast, ~0.1s):**
**Note that you should still grep on the results, as they include lengthy records of all the other skipped tests!**

```bash
# Build first
dune build

# Run by test group name (regex)
node _build/default/test/haz3ltest.bc.js test 'ProbeSteps'
node _build/default/test/haz3ltest.bc.js test 'Evaluator'

# Run specific test number(s) within a group
node _build/default/test/haz3ltest.bc.js test 'ProbeSteps' '3'
node _build/default/test/haz3ltest.bc.js test 'ProbeSteps' '0..3'
node _build/default/test/haz3ltest.bc.js test 'ProbeSteps' '0,2,5'

# Show errors inline
node _build/default/test/haz3ltest.bc.js test 'ProbeSteps' --show-errors

# List all available tests
node _build/default/test/haz3ltest.bc.js list
```

**Test output locations:**
- Logs: `_build/_tests/HazelTests/<TestGroup>.<number>.output`
- Check failures: `grep -l "FAIL" _build/_tests/HazelTests/*.output`

### Test Framework
Uses [Alcotest](https://github.com/mirage/alcotest) with js_of_ocaml. Tests in `test/` use `` `Quick `` or `` `Slow `` annotations.

### Expected failures:

Tests in Pattern Coverage Checker may fail regilarly locally; this is a known node issue. There is an intermittant failure in the Mehnir property test; re-run.


## Code Style

- **Language:** ReasonML (`.re` files) compiled with js_of_ocaml
- **Comments:** `/* ... */` style

## Key Files

- `src/haz3lcore/` - Core Hazel library
- `src/haz3lcore/zipper/` - Zipper/editing infrastructure
- `src/haz3lcore/lang/` - Language definitions (MakeTerm, Grammar, etc.)
- `src/haz3lcore/derived/` - Derived computations (Indentation, Measured, etc.)
- `src/haz3lcore/statics/` - Type checking (ExpToSegment, Statics, etc.)
- `test/` - Test files (Test_*.re)

## Test File Conventions

- When possibly (it's not always possible) tests should use textual concrete Hazel syntax directly: `"let x = 1 in x"`
- Cursor position can be printed with appropriate Printer options, commonly: `"¦"` character
- Convex holes (explicit) can be printed with appropriate Printer options, commonly: `"?"`
- Concave grout can be printed with appropriate Printer options, commonly: `"~"`
- Parse with: `Parser.to_term(s)`, `Parser.to_segment(s)`, `Parser.to_zipper(s)`
- Print segments: `Printer.of_segment(~holes="?", ~refractors=Id.Map.empty, seg)`
Loading