Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Changeset [846067b5d5a95e857ca96abbe5d136d14a2ddd4e] by Douglas Creager

Revision 846067b5d5a95e857ca96abbe5d136d14a2ddd4e, committed by Douglas Creager · November 10th, 2008 @ 09:03 PM

Implementing built-in functions as keywords

This patch adds support in the CSPM compiler for the built-in CSPM functions. We've implemented these as keywords, instead of trying to pre-seed a root environment with actual function definitions. There are test cases for all of the functions except for “Seq”, since it returns an infinite set. (We can define a “take” function that would allow us to test, at least partially, infinite sequences. But currently we can't define an analogous function for sets.) http://github.com/hst/hst/commit...

5 changed files

  • M cspm/src/HST/CSPM/Lexer.lhs
  • M cspm/src/HST/CSPM/Parser.hs
  • M cspm/src/HST/CSPM/Parser.ly
  • M cspm/tests/expressions/test-sequences.sh
  • M cspm/tests/expressions/test-sets.sh