on master help sign in
Mention where doc examples assume OverloadedStrings is enabled.

Hopefully, this will save haskell newcomers some confusion.

commit4eb3072cab09b0887e7a3c747b37c94cb5e5a859 authorNeill Bogie <neillbogie@googlemail.com> dateSun 22 May 2011, 19:08 (15 years ago) parent914bed2
1 file changed+4
Data/Aeson/Types.hs+4
Data/Aeson/Types.hs+4
@@ -288,6 +288,8 @@ object = Object . M.fromList
288288-- instance ToJSON Coord where
289289-- toJSON (Coord x y) = 'object' [\"x\" '.=' x, \"y\" '.=' y]
290290-- @
291+--
292+-- This example assumes the OverloadedStrings language option is enabled.
291293class ToJSON a where
292294 toJSON :: a -> Value
293295
@@ -310,6 +312,8 @@ class ToJSON a where
310312-- \-- A non-'Object' value is of the wrong type, so use 'mzero' to fail.
311313-- parseJSON _ = 'mzero'
312314-- @
315+--
316+-- This example assumes the OverloadedStrings language option is enabled.
313317class FromJSON a where
314318 parseJSON :: Value -> Parser a
315319