typeof-lhs := λ(: lhs AST). (: ( (let r TAny) (match lhs ( () ( (App( (Lit( ':_s _ )) (App( _ (AType tt) )) )) ( (set r tt) )) ( (App( ps (App( (Lit( ':_s _ )) (App( _ (AType tt) )) )) )) ( (set r (t3( 'Cons_s (typeof-lhs ps) tt ))) )) ( ASTNil ( (set r (t1 'Nil_s)) )) ( _ (exit-error( 'Unknown\sLHS_s lhs ))) )) r ) Type);