let annotate_data_type dt env = match dt with
    Ast.SynEnumOrStructType (s,tlist) ->
      if isdef_struct s env then 
        tlist := get_struct_data_type_list s env
      else if isdef_enum s env then
        tlist := [] 
      else 
        raise_type_error [s;" is not an enum or struct type but was used in a struct declaration."]
  | x -> ()