let new_fun_frame opt_here opt_pre opt_post =
    let may_cons acc lab x =
      match x with
        | None -> acc
        | Some x -> (lab,x)::acc
    in
    let frame =
      (may_cons
         (may_cons
            (may_cons [] Clabels.Post opt_post)
            Clabels.Pre opt_pre)
         Clabels.Here opt_here)
    in
    ref frame