Advertisement
Guest User

Untitled

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