let peek_line ic = try Some(input_line ic) with _ -> None