let annot_kind_of_string ~start ~stop annot_string = function
  "type" ->
    Type
      (Lazy.lazy_from_fun
       (fun () -> String.sub annot_string start (stop-start))
      )
| "ident" ->
    Ident (ident_info_of_string (String.sub annot_string start (stop-start)))
| "call" ->
    begin
      let k =
        match no_blanks (String.sub annot_string start (stop-start)) with
          "tail" -> `Tail
        | "stack" -> `Stack
        | s -> failwith ("Unknown call value \""^s^"\"")
      in
      Call k
    end
| s -> failwith ("Unknown annotation kind "^s)