nametype definitions
-
Douglas Creager
(from [44b7758612fa95b1b7cd5f9900977473eb7a6cc4]) 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 nametype definitions] http://github.com/hst/hst/commit...
-
Douglas Creager
(from [1d240247d57548c7162181ab816f4dceb9f5253b]) “nametype” statements
The CSPM parser now supports “nametype” statements at the top level of a CSPM script. A nametype statement is a simple binding of a variable to a type expression. There is not yet support for the tuple operator in type expressions; a later patch will introduce its product type semantics.
Lighthouse: [#17 nametype definitions] http://github.com/hst/hst/commit...
-
Douglas Creager
- Milestone set to 1.0-α4
-
Douglas Creager
(from [8da06dd715d084d42f086b1df9e6730417a30d17]) Product types
In a type expression, a tuple creates a product type. In other words, with a type expression, you get
nametype A = ({0,1}, {2,3}) A == {(0,2), (0,3), (1,2), (1,3)}
whereas in a regular expression, you get
A == ({0,1}, {2,3})
Currently type expressions only occur in nametype statements.
Lighthouse: [#17 nametype definitions] http://github.com/hst/hst/commit...
-
Douglas Creager
(from [8da06dd715d084d42f086b1df9e6730417a30d17]) Product types
In a type expression, a tuple creates a product type. In other words, with a type expression, you get
nametype A = ({0,1}, {2,3}) A == {(0,2), (0,3), (1,2), (1,3)}
whereas in a regular expression, you get
A == ({0,1}, {2,3})
Currently type expressions only occur in nametype statements.
Lighthouse: [#17 nametype definitions] http://github.com/hst/hst/commit...
-
Douglas Creager
- State changed from new to open
-
Douglas Creager
- State changed from open to resolved
- Title changed from Type definitions to nametype definitions
We've got
nametypestatements implemented, so I'm going to retroactively focus this ticket on that one feature, and close the ticket.I'll open a new ticket for
datatypestatements. I also need to add support for dotted values tonametypestatements, but I'm filing that work under ticket #15 Dotted values.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.