Commits

Bryan O'Sullivan committed 7776fd3 Merge

Merge pull request #199 from ret/patch-1

Modernizing the TH example.

  • Participants
  • Parent commits f6713d5, 07dc61f

Comments (0)

Files changed (1)

File examples/TemplateHaskell.hs

 {-# LANGUAGE OverloadedStrings #-}
 
 import Data.Aeson (decode, encode)
-import Data.Aeson.TH (deriveJSON)
+import Data.Aeson.TH (deriveJSON, defaultOptions)
 import qualified Data.ByteString.Lazy.Char8 as BL
 
 data Coord = Coord { x :: Double, y :: Double }
 -- names of the type's fields.  We don't want to transform them, so we
 -- use the identity function.
 
-$(deriveJSON id ''Coord)
+$(deriveJSON defaultOptions ''Coord)
 
 main :: IO ()
 main = do