File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -554,18 +554,18 @@ data SumEncoding =
554
554
-- the 'contentsFieldName' field.
555
555
| UntaggedValue
556
556
-- ^ Constructor names won't be encoded. Instead only the contents of the
557
- -- constructor will be encoded as if the type had single constructor. JSON
557
+ -- constructor will be encoded as if the type had a single constructor. JSON
558
558
-- encodings have to be disjoint for decoding to work properly.
559
559
--
560
560
-- When decoding, constructors are tried in the order of definition. If some
561
561
-- encodings overlap, the first one defined will succeed.
562
562
--
563
- -- /Note:/ Nullary constructors are encoded as the string (using
563
+ -- /Note:/ Nullary constructors are encoded as strings (using
564
564
-- 'constructorTagModifier'). Having a nullary constructor alongside a
565
565
-- single field constructor that encodes to a string leads to ambiguity.
566
566
--
567
567
-- /Note:/ Only the last error is kept when decoding, so in the case of
568
- -- mailformed JSON, only an error for the last constructor will be reported.
568
+ -- malformed JSON, only an error for the last constructor will be reported.
569
569
| ObjectWithSingleField
570
570
-- ^ A constructor will be encoded to an object with a single
571
571
-- field named after the constructor tag (modified by the
You can’t perform that action at this time.
0 commit comments