anchor.diff:  - v24: Added a single constructor to the expression type to reflect the addition
     of type applications to the ML extraction language.
   - v25: Added a number of type parameters for globals.
  +- v26: Flags for DExternal and all the DType's
   *)
   
   (* COPY-PASTED ****************************************************************)
  
positive.code: 
  and translate_type_decl env ty: option<decl> =
    match ty with
    | (assumed, name, _mangled_name, args, _, Some (MLTD_Abbrev t)) ->
        let name = env.module_name, name in
        let env = List.fold_left (fun env name -> extend_t env name) env args in
        if assumed then
          // JP: TODO: shall we be smarter here?
          None
        else
          Some (DTypeAlias (name, List.length args, translate_type env t))
  
    | (_, name, _mangled_name, args, _, Some (MLTD_Record fields)) ->
        let name = env.module_name, name in
        let env = List.fold_left (fun env name -> extend_t env name) env args in
        Some (DTypeFlat (name, List.length args, List.map (fun (f, t) ->
          f, (translate_type env t, false)) fields))
  
    | (_, name, _mangled_name, args, attrs, Some (MLTD_DType branches)) ->
        let name = env.module_name, name in
        let flags = translate_flags attrs in
        let env = List.fold_left extend_t env args in
        Some (DTypeVariant (name, flags, List.length args, List.map (fun (cons, ts) ->
          cons, List.map (fun (name, t) ->
  
negative.code: 
  and flag =
    | Private
    | WipeBody
    | CInline
    | Substitute
    | GCType
    | Comment of string
    | MustDisappear
  
  and fsdoc = string
  
  