Changeset [89f4f7bd2000767025f65ac4aa62769d871a7e8f] by Douglas Creager
March 3rd, 2009 @ 11:43 PM
Simple datatypes
This patch introduces support for “simple” datatype statements — i.e., those whose constructors do not take any data values. So, in the following:
datatype SimpleColour = Red | Green | Blue datatype T = A.{0..3} | B.{4..7}
SimpleColour is a simple datatype, whereas T is not.
The SimpleColour definition creates four bindings: Red, Green, and Blue all resolve to a new “constructor value”, which just records which of the data constructors was used to create a particular value. SimpleColour resolves to a set containing all three constructor values.
Lighthouse: [#21] http://github.com/hst/hst/commit...
Committed by Douglas Creager
- M cspm/src/HST/CSPM/Bind.hs
- M cspm/src/HST/CSPM/Definitions.lhs
- M cspm/src/HST/CSPM/Evaluate.hs
- 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-types.sh
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
An open-source refinement checker for the CSP process algebra.