]> gitweb @ CieloNegro.org - hxt-compile.git/commitdiff
Forgotten changes to be commited...
authorPHO <pho@cielonegro.org>
Tue, 9 Mar 2010 06:00:03 +0000 (15:00 +0900)
committerPHO <pho@cielonegro.org>
Tue, 9 Mar 2010 06:00:03 +0000 (15:00 +0900)
Main.hs
Text/XML/HXT/Compilation.hs

diff --git a/Main.hs b/Main.hs
index 8466f76542ed536646388fa60c09700d69ca8bdc..387491488ef9dc6f275e7abea59e54d4a08558a6 100644 (file)
--- a/Main.hs
+++ b/Main.hs
@@ -19,6 +19,8 @@ main = do let fpath = "examples/tiny.xml"
                                              ]
                             >>>
                             ( constA (Module "Foo")
+                              &&&
+                              constA []
                               &&&
                               constA (HsIdent "foo")
                               &&&
index cbcf396b03b57baaabf0eda579874b4c1c77e3e8..01e13e28b48ead8dd963a5cc6f4220ea75d49e4f 100644 (file)
@@ -18,13 +18,13 @@ compileDocument = uniqueNamespacesFromDeclAndQNames
                   )
 
 
-wrapIntoModule :: Arrow a => a (Module, (HsName, (HsQualType, HsExp))) HsModule
-wrapIntoModule = proc (modName, (symName, (symType, symExp))) ->
+wrapIntoModule :: Arrow a => a (Module, ([HsImportDecl], (HsName, (HsQualType, HsExp)))) HsModule
+wrapIntoModule = proc (modName, (extImports, (symName, (symType, symExp)))) ->
                  do let hsModule = HsModule undefined modName (Just exports) imports decls
                         exports  = [HsEVar (UnQual symName)]
                         imports  = [ HsImportDecl undefined (Module "Text.XML.HXT.Arrow") False Nothing Nothing
                                    , HsImportDecl undefined (Module "Text.XML.HXT.DOM.XmlNode") True (Just (Module "XN")) Nothing
-                                   ]
+                                   ] ++ extImports
                         decls    = [ HsTypeSig undefined [symName] symType
                                    , HsFunBind [HsMatch undefined symName [] (HsUnGuardedRhs symExp) []]
                                    ]