Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify Maybe fix for SYB generics

  • Loading branch information...
commit fb81fbf25a66939090bbc2a95a79d5c9f4d8b888 1 parent 72ae354
@bos authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 Data/Aeson/Generic.hs
View
4 Data/Aeson/Generic.hs
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.