@@ -436,8 +436,8 @@ sumToEncoding opts multiCons conName exp
436436 array (encStr opts conName <%> fexp)
437437 TaggedObject{tagFieldName, contentsFieldName} ->
438438 object $
439− ([|E.builder tagFieldName|] <:> encStr opts conName) <%>
440− ([|E.builder contentsFieldName|] <:> fexp)
439+ ([|E.text (T.pack tagFieldName)|] <:> encStr opts conName) <%>
440+ ([|E.text (T.pack contentsFieldName)|] <:> fexp)
441441 ObjectWithSingleField ->
442442 object (encStr opts conName <:> fexp)
443443
@@ -500,7 +500,8 @@ argsToEncoding opts multiCons (RecC conName ts) = case (unwrapUnaryRecords opts,
500500 toPair (arg, (field, _, _)) =
501501 toFieldName field <:> [|E.builder|] `appE` varE arg
502502
503− toFieldName field = [|E.builder|] `appE` fieldLabelExp opts field
503+ toFieldName field = [|E.text|] `appE`
504+ ([|T.pack|] `appE` fieldLabelExp opts field)
504505
505506 match (conP conName $ map varP args)
506507 ( normalB
@@ -509,7 +510,8 @@ argsToEncoding opts multiCons (RecC conName ts) = case (unwrapUnaryRecords opts,
509510 TwoElemArray -> array $
510511 encStr opts conName <%> [|fromEncoding|] `appE` exp
511512 TaggedObject{tagFieldName} -> object $
512− ([|E.builder tagFieldName|] <:> encStr opts conName) <%>
513+ ([|E.text (T.pack tagFieldName)|] <:>
514+ encStr opts conName) <%>
513515 objBody
514516 ObjectWithSingleField -> object $
515517 encStr opts conName <:> [|fromEncoding|] `appE` exp