Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: b7e11faeca
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (22 sloc) 0.48 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29

% a handy type abbreviation
.alias [
    .name t
    .type complex
]


% complex number
.record [
    .name complex

    .field [ .name re .type float ]
    .field [ .name im .type float ]
]


% some record which uses "complex" type
.record [
    .name foo
    .field [
        .name bar
        .type t
        .optional

        % piqi supports structured defaults for optional fields:
        .default [.re 1 .im 0] % NOTE: it is possible to skip names and use [1 0]
    ]
]
Something went wrong with that request. Please try again.