val type_check : Ast.program -> (unit, string) result