@@ -16,6 +16,23 @@
17-- For documentation on the @aeson@ types, functions, classes, and
17-- For documentation on the @aeson@ types, functions, classes, and
18-- operators, please see the @Data.Aeson@ module of the @aeson@ package.
18-- operators, please see the @Data.Aeson@ module of the @aeson@ package.
22+-- Decode into a data structure by specifying the desired type to the 'decode'
25+-- > {-# LANGUAGE OverloadedStrings #-}
27+-- > import qualified Data.Yaml as Y
30+-- > putStrLn . show $ (Y.decode "[1,2,3]" :: Maybe [Integer])
32+-- You can go one step further and decode into a custom type by implementing
33+-- 'FromJSON' for that type. This is also appropriate where extra
34+-- normalization, formatting or manipulation of the YAML is required on decode.
19#if (defined (ghcjs_HOST_OS))
36#if (defined (ghcjs_HOST_OS))
20module Data.Yaml {-# WARNING "GHCJS is not supported yet (will break at runtime once called)." #-}
37module Data.Yaml {-# WARNING "GHCJS is not supported yet (will break at runtime once called)." #-}