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.

nametype definitions

#17

The CSPM compiler doesn't currently support type definitions.

Reported by Douglas Creager · January 12th, 2009 @ 10:56 PM

State: resolved
Milestone: 1.0-α4
Assigned to: Douglas Creager Douglas Creager

Activity

  1. Douglas Creager
    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...

    February 13th, 2009 @ 10:21 PM

  2. Douglas Creager
    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...

    February 13th, 2009 @ 10:21 PM

  3. Douglas Creager
  4. Douglas Creager
    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...

    February 28th, 2009 @ 12:50 PM

  5. Douglas Creager
    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...

    February 28th, 2009 @ 12:50 PM

  6. Douglas Creager
    Douglas Creager
    • State changed from new to open

    March 2nd, 2009 @ 05:21 PM

  7. Douglas Creager
    Douglas Creager
    • State changed from open to resolved
    • Title changed from Type definitions to nametype definitions

    We've got nametype statements 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 datatype statements. I also need to add support for dotted values to nametype statements, but I'm filing that work under ticket #15 Dotted values.

    March 2nd, 2009 @ 06:23 PM

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.