Skip to content

Commit 182b7bf

Browse files
hyperpolymathclaude
andcommitted
fix: apply permutation in tangle composition type checking
Tangle[A,B] . Word[m] computed apply_perm_default m b into c but then ignored it, returning TTangle(a,b) instead of TTangle(a,c). The output boundary now correctly reflects the permutation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 4dfd5d7 commit 182b7bf

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

compiler/lib/typecheck.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,7 @@ and infer_binop (op : binop) (t1 : ty) (t2 : ty) : ty =
413413
word is wider than tangle output boundary"
414414
(pp_boundary a) (pp_boundary b) m;
415415
let c = apply_perm_default m b in
416-
ignore c;
417-
TTangle (a, b)
416+
TTangle (a, c)
418417
| _ ->
419418
type_error "Cannot compose %s with %s" (pp_ty t1) (pp_ty t2)
420419
end

0 commit comments

Comments
 (0)