1/*
2 * Copyright 2016, NICTA
3 *
4 * This software may be distributed and modified according to the terms of
5 * the GNU General Public License version 2. Note that NO WARRANTY is provided.
6 * See "LICENSE_GPLv2.txt" for details.
7 *
8 * @TAG(NICTA_GPL)
9 */
10
11#include "wip_anti-c-types.ac"
12
13$ty:(R a b) $id:(poly) (u32 arg)
14{
15  $ty:(R a b) ret;
16  ret.tag = TAG_ENUM_Ok;
17  $ty:(R Bool (R U32 #B)) x;
18  ret.Ok = $exp:(f[a]) (x);
19  return ret;
20}
21
22struct xxx {
23  $ty:(R Bool U32) x;
24  u32 y;
25};
26
27typedef struct xxx xxx_t;
28
29struct $id:(X a b) {
30  $ty:a x;
31  $ty:b *y;
32};
33
34int another (void) {
35  $ty:(U32) x;
36  x = $exp:(let x = 4 in x + c);
37  return x;
38
39}
40