Hi Rodrigo, > I´m just starting with HXT. My question is, how can I expose a "use case" > from the main function below (the XmlPickler for UseCase has been already > defined): > > main :: IO () > main = do > runX ( xunpickleDocument xpUseCase [ (a_validate,v_0) ], "uc.xml" ) > return () > > For example, if I just want to show the use case contents, how can I call > "show" for a retrived use case.
------------------------------------- 1. version main :: IO () main = do [x] <- runX ( xunpickleDocument xpUseCase [ (a_validate,v_0) ], "uc.xml" ) print x return () x is processed outside the arrow ------------------------------------- 2. version main :: IO () main = do runX ( xunpickleDocument xpUseCase [ (a_validate,v_0) ], "uc.xml" >>> arrIO print ) return () x is processed within an arrow by lifting the print function to then arrow level. ------------------------------------ There is a new wiki page about picklers http://www.haskell.org/haskellwiki/HXT/Conversion_of_Haskell_data_from/to_XML Cheers, Uwe -- Uwe Schmidt Web: http://www.fh-wedel.de/~si/ _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe