Skip to content

Commit

Permalink
Merge pull request #199 from ret/patch-1
Browse files Browse the repository at this point in the history
Modernizing the TH example.
  • Loading branch information
bos committed Jul 2, 2014
2 parents 0dcdd72 + 26835cc commit 598b0bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/TemplateHaskell.hs
Expand Up @@ -7,7 +7,7 @@
{-# 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 }
Expand All @@ -19,7 +19,7 @@ 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
Expand Down

0 comments on commit 598b0bd

Please sign in to comment.