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

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

struct Const {
    field value: Int32;
}