Skip to content

Commit b777b53

Browse files
hyperpolymathclaude
andcommitted
fix(extract_mathlib4): unwrap double-Regex in premise match
`hyp_patterns` already holds compiled `r"..."` Regex values; wrapping them in `Regex(...)` again fails with MethodError on Julia 1.12 and crashed every file, emitting 0 premise records. Pass the Regex straight to `eachmatch`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 0af1c4b commit b777b53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/extract_mathlib4.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function extract_mathlib4_proofs()
108108
]
109109
proof_text = !isnothing(by_match) ? strip(by_match.captures[1]) : ""
110110
for hyp_pattern in hyp_patterns
111-
for hyp_match in eachmatch(Regex(hyp_pattern), proof_text)
111+
for hyp_match in eachmatch(hyp_pattern, proof_text)
112112
hyps = [strip(h) for h in split(hyp_match.captures[1], ',')]
113113
for hyp in hyps
114114
if !isempty(hyp) && length(hyp) < 50

0 commit comments

Comments
 (0)