Changeset [16bd7ca6cb94a2cb867977092d1fbdfedd81577f] by Douglas Creager
Revision 16bd7ca6cb94a2cb867977092d1fbdfedd81577f,
committed by Douglas Creager
· November 14th, 2008 @ 06:46 PM
Initial pattern matching support
This pattern introduces some underlying functionality for implementing pattern matching. We've defined an ADT to represent patterns, and a “valueMatches” function that determines whether a particular value matches a pattern. Most of the patterns defined by CSPM are included; the two that are missing are channel names (which only match the corresponding event), and dotted channel expressions, which we haven't implemented yet at the expression level, either.
This patch also doesn't add pattern support to the CSPM parser or expression evaluator. http://github.com/hst/hst/commit...
8 changed files
-
M
cspm/HST.cabal -
M
cspm/qc-tests/HST/CSPM/Tests.hs -
M
cspm/qc-tests/HST/CSPM/Tests/Patterns.hs -
M
cspm/src/HST/CSPM.hs -
M
cspm/src/HST/CSPM/Bind.hs -
M
cspm/src/HST/CSPM/Evaluate.hs -
M
cspm/src/HST/CSPM/Patterns.lhs -
M
cspm/src/HST/CSPM/Types.hs