Add note about INVARIANT of Json.String
Any thing of Json.String should be appropriately escaped already.
Maybe if the representation starts having a couple variants, it could
have a toBuilder function that produces properly escaped strings.
commitab420bcf8f8222741fa0f619f339c03570507d86
authorEvan Czaplicki <evancz@users.noreply.github.com>
dateMon 3 Jun 2019, 10:51 (7 years ago)
parent2b72471
compiler/src/Json/String.hs+4−1
@@ -35,8 +35,11 @@ import qualified Parse.Primitives as P
3535-- JSON STRINGS
3636
3737
38+-- INVARIANT: any Json.String is appropriately escaped already
39+-- TODO: is this the right representation for Json.String? Maybe ByteString instead?
40+--
3841type String =
39− Utf8.Utf8 JSON_STRING -- TODO is this the right representation? Maybe ByteString instead?
42+ Utf8.Utf8 JSON_STRING
4043
4144
4245data JSON_STRING