y. arg ) { return true ; } else { return false ; } } } function decomposeCheck ( g, m, a ) { if ( m. tag === "Pair" && a. tag === "Prod" ) { return Just ( [ [ Check ( g, m. args [ 0 ], a. args [ 0 ] ), Check ( g, m. args [ 1 ], a. args [ 1 ] ) ], as => Just ( undefined ) ] ) ; } else if ( m. tag === "Lam" && a. tag === "Arr" ) { return Just ( [ [ Check ( [ [ m. args [ 0 ], a. args [ 0 ] ] ].
) { return { tag : "Ann", args : [ m, a ] } ; } function Pair ( m, n ) { return { tag : "Pair", args : [ m, n ] } ; } function Fst ( m ) { return { tag : "Fst", arg : m } ; } function Snd ( m ) { return { tag : "Snd", arg : m } ; } function Lam ( x, m ) { return { tag : "Lam", args : [ x, m ] } ; } function App ( m, n ) { return { tag : "App", args : [ m, n ] } ; } The last change that we'll make will be to change the notion of synthesis a little bit from what we had before.