on master help sign in
Clarify where DefaultSignatures is available
commit2b3ce1e20bd2197cab2fb46a4a4052cd362a9e07 authorBryan O'Sullivan <bos@serpentine.com> dateMon 16 Jul 2012, 20:25 (14 years ago) parent5e2e4aa
1 file changed+3−3
Data/Aeson/Types/Class.hs+3−3
Data/Aeson/Types/Class.hs+3−3
@@ -111,8 +111,8 @@ class GFromJSON f where
111111-- type which is an instance of 'Data'.
112112--
113113-- * If your compiler has support for the @DeriveGeneric@ and
114−-- @DefaultSignatures@ language extensions, @toJSON@ will have a default generic
115−-- implementation.
114+-- @DefaultSignatures@ language extensions (GHC 7.2 and newer),
115+-- @toJSON@ will have a default generic implementation.
116116--
117117-- To use the latter option, simply add a @deriving 'Generic'@ clause to your
118118-- datatype and declare a @ToJSON@ instance for your datatype without giving a
@@ -754,7 +754,7 @@ obj .:? key = case H.lookup key obj of
754754-- from an object without affecting its validity and we know a default
755755-- value to assign in that case. If the key and value are mandatory,
756756-- use '(.:)' instead.
757−--
757+--
758758-- Example usage:
759759--
760760-- @ v1 <- o '.:?' \"opt_field_with_dfl\" .!= \"default_val\"