Permalink
Browse files

Simplify Maybe fix for SYB generics

  • Loading branch information...
bos committed Jan 15, 2013
1 parent 72ae354 commit fb81fbf25a66939090bbc2a95a79d5c9f4d8b888
Showing with 1 addition and 3 deletions.
  1. +1 −3 Data/Aeson/Generic.hs
View
@@ -84,7 +84,7 @@ type T a = a -> Value
toJSON :: (Data a) => a -> Value
toJSON = toJSON_generic
- `ext1Q` maybe
+ `ext1Q` maybe Null toJSON
`ext1Q` list
`ext1Q` vector
`ext1Q` set
@@ -120,8 +120,6 @@ toJSON = toJSON_generic
`extQ` (T.toJSON :: T ())
--`extQ` (T.toJSON :: T Ordering)
where
- maybe (Just a) = toJSON a
- maybe Nothing = Null
list xs = Array . V.fromList . map toJSON $ xs
vector v = Array . V.map toJSON $ v
set s = Array . V.fromList . map toJSON . Set.toList $ s

0 comments on commit fb81fbf

Please sign in to comment.