about summary refs log tree commit diff
path: root/src/Data/Aeson/Generic/DerivingVia.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-12-01T00·55-0500
committerGriffin Smith <root@gws.fyi>2019-12-01T00·55-0500
commit71b628c604556bc2d829f12980db99c9a526ec84 (patch)
tree2bd0b27810139c2fcf19813c0cf3f31100d5008f /src/Data/Aeson/Generic/DerivingVia.hs
parent4431d453f61e88383aba40c8db3c4afb3c828b2e (diff)
Add messages on the ground
Add support for a "GroundMessage" entity type, support for a Read
command to read them, and randomly place an initial, tone-setting
tutorial message on the ground near the character at the beginning of
the game.
Diffstat (limited to 'src/Data/Aeson/Generic/DerivingVia.hs')
-rw-r--r--src/Data/Aeson/Generic/DerivingVia.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Data/Aeson/Generic/DerivingVia.hs b/src/Data/Aeson/Generic/DerivingVia.hs
index f387f1deccb1..34f2a9403892 100644
--- a/src/Data/Aeson/Generic/DerivingVia.hs
+++ b/src/Data/Aeson/Generic/DerivingVia.hs
@@ -73,10 +73,17 @@ data Setting = FieldLabelModifier     [StrFun]
 
 type FieldLabelModifier     = 'FieldLabelModifier
 type ConstructorTagModifier = 'ConstructorTagModifier
+-- | If 'True' the constructors of a datatype, with all nullary constructors,
+-- will be encoded to just a string with the constructor tag. If 'False' the
+-- encoding will always follow the 'SumEncoding'.
 type AllNullaryToStringTag  = 'AllNullaryToStringTag
 type OmitNothingFields      = 'OmitNothingFields
 type SumEnc                 = 'SumEnc
+-- | Hide the field name when a record constructor has only one field, like a
+-- newtype.
 type UnwrapUnaryRecords     = 'UnwrapUnaryRecords
+-- | Encode types with a single constructor as sums, so that
+-- 'AllNullaryToStringTag' and 'SumEncoding' apply.
 type TagSingleConstructors  = 'TagSingleConstructors
 
 class Demotable (a :: k) where