Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- instance FromJSON Tag where
- parseJSON (AesonTypes.Array v)
- | V.length v == 3 = case v ! 0 of
- Text "p" -> ETag <$> ((,) <$> parseJSON (v ! 1) <*> parseJSON (v ! 2)
- Text "e" -> PTag <$> ((,) <$> parseJSON (v ! 1) <*> parseJSON (v ! 2)
- _ -> mzero
- | otherwise = mzero
- parseJSON _ = mzero
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement