prettyEncodedField :: DexFile -> [(FieldId, [VisibleAnnotation])] -> (Word32, EncodedField) -> PP.Doc
prettyEncodedField dex _annots (n, f) =
  case getField dex (fieldId f) of
    Nothing -> "<unknown field ID: " <> word16HexFixed (fieldId f) <> ">"
    Just fld ->
      vsep [ M.mconcat ["    #", word32Dec n, "              : (in ", getTypeName' dex (fieldClassId fld), ")"]
              , prettyField "      name" (PP.quotes (getStr' dex (fieldNameId fld)))
              , prettyField "      type" (PP.quotes (getTypeName' dex (fieldTypeId fld)))
              , prettyFieldHexS "      access" (fieldAccessFlags f) (AF.flagsString AF.AField (fieldAccessFlags f))
              ]
prettyEncodedField :: DexFile -> [(FieldId, [VisibleAnnotation])] -> (Word32, EncodedField) -> PP.Doc
prettyEncodedField dex _annots (n, f) =
  case getField dex (fieldId f) of
    Nothing -> "<unknown field ID: " <> word16HexFixed (fieldId f) <> ">"
    Just fld ->
      vsep [ M.mconcat ["    #", word32Dec n, "              : (in ", getTypeName' dex (fieldClassId fld), ")"]
              , prettyField "      name" (PP.quotes (getStr' dex (fieldNameId fld)))
              , prettyField "      type" (PP.quotes (getTypeName' dex (fieldTypeId fld)))
              , prettyFieldHexS "      access" (fieldAccessFlags f) (AF.flagsString AF.AField (fieldAccessFlags f))
              ]
prettyEncodedField dex _annots (n, f) =
  case getField dex (fieldId f) of
    Nothing -> "<unknown field ID: " <> word16HexFixed (fieldId f) <> ">"
    Just fld ->
      vsep [ M.mconcat ["    #", word32Dec n, "              : (in ", getTypeName' dex (fieldClassId fld), ")"]
              , prettyField "      name" (PP.quotes (getStr' dex (fieldNameId fld)))
              , prettyField "      type" (PP.quotes (getTypeName' dex (fieldTypeId fld)))
              , prettyFieldHexS "      access" (fieldAccessFlags f) (AF.flagsString AF.AField (fieldAccessFlags f))
              ]