on master help sign in
Merge pull request #199 from ret/patch-1

Modernizing the TH example.

commit598b0bd27c5a2555a9c65e64392b76928d59c0b2 authorBryan O'Sullivan <bos@serpentine.com> dateWed 2 Jul 2014, 12:16 (12 years ago) parent0dcdd7226835cc
1 file changed+2−2
examples/TemplateHaskell.hs+2−2
examples/TemplateHaskell.hs+2−2
@@ -7,7 +7,7 @@
77{-# LANGUAGE OverloadedStrings #-}
88
99import Data.Aeson (decode, encode)
10−import Data.Aeson.TH (deriveJSON)
10+import Data.Aeson.TH (deriveJSON, defaultOptions)
1111import qualified Data.ByteString.Lazy.Char8 as BL
1212
1313data Coord = Coord { x :: Double, y :: Double }
@@ -19,7 +19,7 @@ data Coord = Coord { x :: Double, y :: Double }
1919-- names of the type's fields. We don't want to transform them, so we
2020-- use the identity function.
2121
22−$(deriveJSON id ''Coord)
22+$(deriveJSON defaultOptions ''Coord)
2323
2424main :: IO ()
2525main = do