on master help sign in
Fix missing data constructor in doc comments
8ab4feeBrian McKenna
Data/Aeson/Types/Class.hs+4−4
@@ -66,7 +66,7 @@ genericParseJSON opts = fmap to . gParseJSON opts
66--
66--
67-- @{-\# LANGUAGE OverloadedStrings #-}
67-- @{-\# LANGUAGE OverloadedStrings #-}
68--
68--
69−-- data Coord { x :: Double, y :: Double }
69+-- data Coord = Coord { x :: Double, y :: Double }
70--
70--
71-- instance ToJSON Coord where
71-- instance ToJSON Coord where
72-- toJSON (Coord x y) = 'object' [\"x\" '.=' x, \"y\" '.=' y]
72-- toJSON (Coord x y) = 'object' [\"x\" '.=' x, \"y\" '.=' y]
@@ -99,7 +99,7 @@ genericParseJSON opts = fmap to . gParseJSON opts
99--
99--
100-- import GHC.Generics
100-- import GHC.Generics
101--
101--
102−-- data Coord { x :: Double, y :: Double } deriving Generic
102+-- data Coord = Coord { x :: Double, y :: Double } deriving Generic
103--
103--
104-- instance ToJSON Coord
104-- instance ToJSON Coord
105-- @
105-- @
@@ -131,7 +131,7 @@ class ToJSON a where
131--
131--
132-- @{-\# LANGUAGE OverloadedStrings #-}
132-- @{-\# LANGUAGE OverloadedStrings #-}
133--
133--
134−-- data Coord { x :: Double, y :: Double }
134+-- data Coord = Coord { x :: Double, y :: Double }
135--
135--
136-- instance FromJSON Coord where
136-- instance FromJSON Coord where
137-- parseJSON ('Object' v) = Coord '<$>'
137-- parseJSON ('Object' v) = Coord '<$>'
@@ -169,7 +169,7 @@ class ToJSON a where
169--
169--
170-- import GHC.Generics
170-- import GHC.Generics
171--
171--
172−-- data Coord { x :: Double, y :: Double } deriving Generic
172+-- data Coord = Coord { x :: Double, y :: Double } deriving Generic
173--
173--
174-- instance FromJSON Coord
174-- instance FromJSON Coord
175-- @
175-- @