Changeset [44b7758612fa95b1b7cd5f9900977473eb7a6cc4] by Douglas Creager
Revision 44b7758612fa95b1b7cd5f9900977473eb7a6cc4,
committed by Douglas Creager
· February 13th, 2009 @ 10:13 PM
Int and Bool built-in types
This patch introduces initial support for named types in CSPM. Types treated the same as sets; the only difference is in that certain contexts, the tuple constructor and dot operator have different semantics, which make it easier to define the kinds of sets that types usually consist of.
The first two named types are the built-in Int and Bool types. They are defined as keywords, and have built-in evaluation rules that result in the appropriate {True, False} and {..., -1, 0, 1, ...} sets.
Lighthouse: [#17] http://github.com/hst/hst/commit...
8 changed files
-
M
cspm/src/HST/CSPM/Bind.hs -
M
cspm/src/HST/CSPM/Evaluate.hs -
M
cspm/src/HST/CSPM/Lexer.lhs -
M
cspm/src/HST/CSPM/Parser.hs -
M
cspm/src/HST/CSPM/Parser.ly -
M
cspm/src/HST/CSPM/Types.hs -
M
cspm/tests/expressions/test-booleans.sh -
M
cspm/tests/expressions/test-numbers.sh