]> gitweb @ CieloNegro.org - hxt-compile.git/blobdiff - Text/XML/HXT/Compilation.hs
Forgotten changes to be commited...
[hxt-compile.git] / Text / XML / HXT / Compilation.hs
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) []]
                                    ]