aboutsummaryrefslogtreecommitdiff
path: root/src/nat.ts
blob: 7491e8283ae1118aebc46f1915db196bf59829a5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { Op } from './util';

export type Add<A extends Op, B extends Op> = { op: '+'; a: A; b: B };
export type Multiply<A extends Op, B extends Op> = { op: '*'; a: A; b: B };
export type Succ<A extends Op> = { op: 'succ', a: A };

export type _0 = '0'
export type _1 = Succ<_0>
export type _2 = Succ<_1>
export type _3 = Succ<_2>