open Types open Util let rec phase input = log_line 1 "- Output assembly"; match input with | Assembly instrs -> (match args.outfile with | Some filename -> let oc = open_out filename in Print.print_assembly oc instrs; close_out oc | None -> if args.verbose >= 2 then ( prerr_endline "--------------------------------------------------" ); Print.print_assembly stdout instrs ); Empty | _ -> raise (InvalidInput "output")