Skip to content

Commit

Permalink
Public codable
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebshr committed Nov 20, 2024
1 parent fd1c356 commit 05a6e1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Moat/Pretty/Swift.hs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ prettyEnumCoding indents parentName cases unknownCase SumOfProductEncodingOption

prettyCodingKeys :: String
prettyCodingKeys =
"enum CodingKeys: String, CodingKey {"
"public enum CodingKeys: String, CodingKey {"
++ indent
( case encodingStyle of
TaggedObjectStyle -> prettyTaggedCodingKeys
Expand All @@ -353,7 +353,7 @@ prettyEnumCoding indents parentName cases unknownCase SumOfProductEncodingOption

prettyInit :: String
prettyInit =
"init(from decoder: any Decoder) throws {"
"public init(from decoder: any Decoder) throws {"
++ indent
( "let container = try decoder.container(keyedBy: CodingKeys.self)\n"
++ "let discriminator = try container.decode(String.self, forKey: ."
Expand Down Expand Up @@ -475,7 +475,7 @@ prettyEnumCoding indents parentName cases unknownCase SumOfProductEncodingOption

prettyEncode :: String
prettyEncode =
"func encode(to encoder: any Encoder) throws {"
"public func encode(to encoder: any Encoder) throws {"
++ indent
( "var container = encoder.container(keyedBy: CodingKeys.self)\n"
++ "switch (self) {"
Expand Down

0 comments on commit 05a6e1d

Please sign in to comment.