diff options
| author | aspiwack | 2013-11-14 15:21:47 +0000 |
|---|---|---|
| committer | aspiwack | 2013-11-14 15:21:47 +0000 |
| commit | 31795152d0bb76f031f7f8f17aef60a4a44f0155 (patch) | |
| tree | 04b5b22fc4ca0a77d4196dc00b6bb1a8abeacc71 /kernel/type_errors.ml | |
| parent | 326c5769968d85bc0dc294c768585129d56e57d4 (diff) | |
Implementation of Ltac's match and match goal fully based on IStream.
The implementation was partly based on IStream and partly on a control flow with exception. The latter does not mix well with the monadic tactics.
I've moved the algorithmic part of pattern-matching to a new file (tactics/tacticMatching.ml), in order to de-entangle the pattern-matching procedure from the interpretation. This shaves off 300 lines of code from Tacinterp, which is still over 2000 lines of code. It is a first step towards refactoring tacinterp. To be fair, part of what disapeared are lines which sent messages to the debugger. I was not too concerned with them because I understand people found the debugger much too fine-grain on Ltac's pattern matching. But conversely, there may be too few debugging hooks now. This is worth looking into.
In TacticMatching itself, I used a monadic style to express the pattern-matching procedure concisely. I implemented the monad in a fairly brute-force way, using the existing primitive of IStream. It may be worth experimenting with specialized primitive. I am less worried about the monadic style than about the number of allocation of list cells that the primitives entail.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@17089 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'kernel/type_errors.ml')
0 files changed, 0 insertions, 0 deletions
