Skip to content

Commit 30496fa

Browse files
committed
update README for ppx_regexp pattern guards
1 parent 42192c5 commit 30496fa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,14 @@ The syntax follow Perl's syntax:
142142

143143
## Limitations
144144

145-
### No Pattern Guards
145+
### No Pattern Guards for `ppx_tyre`
146146

147-
Pattern guards are not supported. This is due to the fact that all match
148-
cases are combined into a single regular expression, so if one of the
149-
patterns succeed, the match is committed before we can check the guard
150-
condition.
147+
Pattern guards are not supported in `ppx_tyre`. This is due to the fact that all match
148+
cases are combined into a single regular expression, so if one of the patterns succeed,
149+
the match is committed before we can check the guard condition.
150+
151+
`ppx_regexp` does support pattern guards by grouping cases with identical patterns
152+
and generating monadic handler functions that evaluate guards sequentially after a pattern matches.
151153

152154
### No Exhaustiveness Check
153155

0 commit comments

Comments
 (0)