
12 Mar
2013
12 Mar
'13
6:11 a.m.
Hello, cafe! I made a package xml-conduit-generichttps://github.com/odr/xml-conduit-generic to provide conversion from ADT to xml and vice versa. Conversion works as Conduit (ToXml) or Consumer (FromXml). Example: data T4 = T4 {v4 :: Int, n4 :: Maybe T4} deriving (Eq, Show, Generic) instance ToXml T4 instance FromXml T4
runToXml $ T4 5 $ Just $ T4 6 Nothing "
</T4>"
runFromXml $ "
</T4>" :: IO (Either String T4) Right $ T4 5 $ Just $ T4 6 Nothing
It would be great if someone look to the version on github and give me some notes. Then I am going to put it on hackage. Unfortunately, I didn't find a way to avoid OverlappingInstances (for GFromXml class). Any ideas are welcome. Best regards, Dmitry
4455
Age (days ago)
4455
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Olshansky