X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=hxt-compile.git;a=blobdiff_plain;f=Main.hs;h=15482e2cd41ec821cc558bc7631979925a27a000;hp=d82a4bd93b7e75a6ff9845150450ae0709b93086;hb=3128cde83c431e117badabba87cbcd9c7de26b52;hpb=52451180867f9eaab5bea8c88f9485ecdd415621 diff --git a/Main.hs b/Main.hs index d82a4bd..15482e2 100644 --- a/Main.hs +++ b/Main.hs @@ -1,4 +1,33 @@ module Main where +import Language.Haskell.Pretty +import Language.Haskell.Syntax +import Text.XML.HXT.Compilation +import Text.XML.HXT.Arrow +import qualified System.IO.UTF8 as Uio + + main :: IO () -main = return () +main = do let fpath = "examples/dtd.xml" + + [hsMod] <- runX ( setErrorMsgHandler False fail + >>> + constA fpath + >>> + readFromDocument [ (a_validate , v_0) + , (a_canonicalize , v_0) + , (a_check_namespaces, v_1) + ] + >>> + ( constA (Module "Foo") + &&& + constA [] + &&& + constA (HsIdent "foo") + &&& + compileDocument + ) + >>> + wrapIntoModule + ) + Uio.putStrLn (prettyPrint hsMod)