Changeset [37739ef6e867fa53cb039c707bf15d4e1affd1ba] by Douglas Creager

August 30th, 2008 @ 04:50 PM

Flattening the Expression type

Before, we had separate datatypes for each “class” of expression; for instance, a Number type for any expression that always evaluates to a number. The Expression type was then defined as a sum type across all of these subtypes.

This patch flattens things so that there's only a single Expression type. This simplifies things by removing a level of indirection in the type definitions, and also will make it easier to define “bound expressions” as we implement static-scoped environments.

Lighthouse: [#11] http://github.com/dcreager/hst/c...

Committed by Douglas Creager

  • M cspm/HST.cabal
  • M cspm/src/HST/CSPM/Evaluate.hs
  • M cspm/src/HST/CSPM/Expressions.hs
  • M cspm/src/HST/CSPM/Utils.hs
  • M cspm/tests/HST/CSPM/Tests/Booleans.hs
  • M cspm/tests/HST/CSPM/Tests/Generators.hs
  • M cspm/tests/HST/CSPM/Tests/Numbers.hs
  • M cspm/tests/HST/CSPM/Tests/Sequences.hs
  • M cspm/tests/HST/CSPM/Tests/Sets.hs
New-ticket Create new ticket

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.