Skip to content
Success

Changes

Summary

  1. matching: matcher_* take Simple.pattern arguments (commit: 67c56e6) (details)
  2. matching: specialize_matrix uses non-empty rows (commit: 97caf28) (details)
  3. matching: consolidate all matcher_ functions in a single matcher_head (commit: 0f5a1c4) (details)
  4. matching: refine the types in Context.ctx_matcher (commit: 387955e) (details)
  5. matching: finally, merge matcher and Context.ctx_matcher (commit: a26e509) (details)
  6. Changes (commit: ae4621c) (details)
  7. matching: use heads in the make_*_matching specialization calls (commit: ac1243c) (details)
  8. [minor] matching.ml: tune ~scopes handling (commit: 50fdc06) (details)
  9. matching: add a comment suggested by Florian Angeletti's review (commit: 3527653) (details)
  10. parmatch: normalize_pat is not used anymore (commit: 3903f9f) (details)
Commit 67c56e6ec88e8c6039cc20ac39a114f8922aac29 by gabriel.scherer
matching: matcher_* take Simple.pattern arguments
(commit: 67c56e6)
The file was modifiedlambda/matching.ml (diff)
Commit 97caf289b579fe9e24a9755ec4ad24219dbb3cb5 by gabriel.scherer
matching: specialize_matrix uses non-empty rows
(commit: 97caf28)
The file was modifiedlambda/matching.ml (diff)
Commit 0f5a1c4d1e531067d411a0406b98eb07a9e05fa6 by gabriel.scherer
matching: consolidate all matcher_ functions in a single matcher_head

This commit is delicate and needs a careful review.

The `matcher_of_pattern` function is a temporary measure to reduce the
invasiveness of the patch, and make it easier to review.

(Note for reviewers: in the previous version the Record case had
a funny handling of Any, but it is in fact equivalent to just adding
omegas as we now do in all cases.)

There are two obvious directions for improvement:

- Get rid of matcher_of_pattern and pass a head directly to the
  various make_matching_* functions.

- Try to factorize this code with ctx_matcher which, it is now
  obvious, does essentially the same thing.

Another, less immediate area of attack would be to consider
a presentation of Pattern_head.t where the Any case can be statically
ruled out -- maybe the description could have two levels, one
isomorphic to option (Any or not?) and one for non-any heads.
(commit: 0f5a1c4)
The file was modifiedlambda/matching.ml (diff)
Commit 387955e189995c409d4805e44239e1a5add21c3f by gabriel.scherer
matching: refine the types in Context.ctx_matcher
(commit: 387955e)
The file was modifiedlambda/matching.ml (diff)
Commit a26e509c57cba5da794b21472261569a85d3cf53 by gabriel.scherer
matching: finally, merge matcher and Context.ctx_matcher
(commit: a26e509)
The file was modifiedlambda/matching.ml (diff)
The file was modifiedChanges (diff)
Commit ac1243cbd1e17954d56144d6b905085c959ce20f by gabriel.scherer
matching: use heads in the make_*_matching specialization calls
(commit: ac1243c)
The file was modifiedlambda/matching.ml (diff)
Commit 50fdc06fcd10f799854411154295445fe7346094 by gabriel.scherer
[minor] matching.ml: tune ~scopes handling
(commit: 50fdc06)
The file was modifiedlambda/matching.ml (diff)
Commit 3527653363f3cc96d0e4212bb2ec5f425288cdd4 by gabriel.scherer
matching: add a comment suggested by Florian Angeletti's review
(commit: 3527653)
The file was modifiedlambda/matching.ml (diff)
Commit 3903f9fab55e64f5d4ef3fbe58f83aeb3358f7d9 by gabriel.scherer
parmatch: normalize_pat is not used anymore
(commit: 3903f9f)
The file was modifiedtyping/parmatch.ml (diff)
The file was modifiedtyping/parmatch.mli (diff)