1fd3a827eSAlex Crichtonpackage foo:foo; 241417d9eSAlex Crichton 32329ecc3SAlex Crichtoninterface records { 4fd3a827eSAlex Crichton tuple-arg: func(x: tuple<char, u32>); 5fd3a827eSAlex Crichton tuple-result: func() -> tuple<char, u32>; 62329ecc3SAlex Crichton 72329ecc3SAlex Crichton record empty {} 82329ecc3SAlex Crichton 9fd3a827eSAlex Crichton empty-arg: func(x: empty); 10fd3a827eSAlex Crichton empty-result: func() -> empty; 112329ecc3SAlex Crichton 122329ecc3SAlex Crichton /// A record containing two scalar fields 132329ecc3SAlex Crichton /// that both have the same type 142329ecc3SAlex Crichton record scalars { 152329ecc3SAlex Crichton /// The first field, named a 162329ecc3SAlex Crichton a: u32, 172329ecc3SAlex Crichton /// The second field, named b 182329ecc3SAlex Crichton b: u32, 192329ecc3SAlex Crichton } 202329ecc3SAlex Crichton 21fd3a827eSAlex Crichton scalar-arg: func(x: scalars); 22fd3a827eSAlex Crichton scalar-result: func() -> scalars; 232329ecc3SAlex Crichton 242329ecc3SAlex Crichton /// A record that is really just flags 252329ecc3SAlex Crichton /// All of the fields are bool 262329ecc3SAlex Crichton record really-flags { 272329ecc3SAlex Crichton a: bool, 282329ecc3SAlex Crichton b: bool, 292329ecc3SAlex Crichton c: bool, 302329ecc3SAlex Crichton d: bool, 312329ecc3SAlex Crichton e: bool, 322329ecc3SAlex Crichton f: bool, 332329ecc3SAlex Crichton g: bool, 342329ecc3SAlex Crichton h: bool, 352329ecc3SAlex Crichton i: bool, 362329ecc3SAlex Crichton } 372329ecc3SAlex Crichton 38fd3a827eSAlex Crichton flags-arg: func(x: really-flags); 39fd3a827eSAlex Crichton flags-result: func() -> really-flags; 402329ecc3SAlex Crichton 412329ecc3SAlex Crichton record aggregates { 422329ecc3SAlex Crichton a: scalars, 432329ecc3SAlex Crichton b: u32, 442329ecc3SAlex Crichton c: empty, 452329ecc3SAlex Crichton d: string, 462329ecc3SAlex Crichton e: really-flags, 472329ecc3SAlex Crichton } 482329ecc3SAlex Crichton 49fd3a827eSAlex Crichton aggregate-arg: func(x: aggregates); 50fd3a827eSAlex Crichton aggregate-result: func() -> aggregates; 512329ecc3SAlex Crichton 52fd3a827eSAlex Crichton type tuple-typedef = tuple<s32>; 53fd3a827eSAlex Crichton type int-typedef = s32; 54fd3a827eSAlex Crichton type tuple-typedef2 = tuple<int-typedef>; 55fd3a827eSAlex Crichton typedef-inout: func(e: tuple-typedef2) -> s32; 56*ce09e2acSRoman Volosatovs 57*ce09e2acSRoman Volosatovs record futures-and-streams { 58*ce09e2acSRoman Volosatovs a: future<u8>, 59*ce09e2acSRoman Volosatovs b: stream<u8>, 60*ce09e2acSRoman Volosatovs c: stream<future<stream>>, 61*ce09e2acSRoman Volosatovs d: future<stream<future>>, 62*ce09e2acSRoman Volosatovs } 632329ecc3SAlex Crichton} 642329ecc3SAlex Crichton 6541417d9eSAlex Crichtonworld the-world { 66fd3a827eSAlex Crichton import records; 67fd3a827eSAlex Crichton export records; 682329ecc3SAlex Crichton} 69