summaryrefslogtreecommitdiff
path: root/examples/06-inductive-data-types/src/arithmetic.hob
blob: d3b20510f7a02344c3f56f677674ca673930b415 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
sum Expression {
    variant Box[Add];
    variant Const;
}

struct Add {
    field left: Expression;
    field right: Expression;
}

struct Const {
    field value: Int32;
}