diff -up HaXml-1.20.2/HaXml.cabal.orig HaXml-1.20.2/HaXml.cabal
--- HaXml-1.20.2/HaXml.cabal.orig	2013-07-02 11:47:56.215891845 +0900
+++ HaXml-1.20.2/HaXml.cabal	2013-07-02 11:49:58.028921316 +0900
@@ -52,7 +52,7 @@ library
         Text.XML.HaXml.Xtract.Lex,
         Text.XML.HaXml.Xtract.Parse
   hs-source-dirs: src
-  build-depends: haskell98, polyparse >= 1.2, filepath
+  build-depends: polyparse >= 1.2, filepath
   if flag(splitBase)
     build-depends: base >= 3 && < 6, pretty, random, containers
   else
@@ -64,52 +64,3 @@ library
   extensions: CPP, ExistentialQuantification
   cpp-options: -DMYVERSION="1.20.2"
   nhc98-options: -K10M
-
-Executable Canonicalise
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: Canonicalise.hs
-
-Executable CanonicaliseLazy
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: CanonicaliseLazy.hs
-
-Executable Xtract
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: Xtract.hs
-
-Executable XtractLazy
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: XtractLazy.hs
-
-Executable Validate
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: Validate.hs
-
-Executable MkOneOf
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: MkOneOf.hs
-
-Executable DtdToHaskell
-  GHC-Options: -Wall
-  Extensions:  CPP
-  Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="1.20.2"
-  Main-Is: DtdToHaskell.hs
diff -up HaXml-1.20.2/src/Text/XML/HaXml/ByteStringPP.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/ByteStringPP.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/ByteStringPP.hs.orig	2013-07-02 11:47:56.265891852 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/ByteStringPP.hs	2013-07-02 11:49:19.705909874 +0900
@@ -21,7 +21,7 @@ module Text.XML.HaXml.ByteStringPP
   ) where
 
 import Prelude hiding (maybe,either,elem,concat)
-import Maybe hiding (maybe)
+import Data.Maybe hiding (maybe)
 import Data.List (intersperse)
 --import Data.ByteString.Lazy hiding (pack,map,head,any,singleton,intersperse,join)
 import Data.ByteString.Lazy.Char8 (ByteString(), concat, pack, singleton, intercalate
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Combinators.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Combinators.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Combinators.hs.orig	2013-07-02 11:47:56.266891852 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Combinators.hs	2013-07-02 11:49:19.705909874 +0900
@@ -51,7 +51,7 @@ module Text.XML.HaXml.Combinators
 
 
 import Text.XML.HaXml.Types
-import Maybe (fromMaybe)
+import Data.Maybe (fromMaybe)
 
 infixl 6 `with`, `without`
 infixr 5 `o`, `oo`, `union`, `andThen`		-- , `orelse`
diff -up HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Convert.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Convert.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Convert.hs.orig	2013-07-02 11:47:56.266891852 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Convert.hs	2013-07-02 11:49:19.706909874 +0900
@@ -5,7 +5,7 @@ module Text.XML.HaXml.DtdToHaskell.Conve
   ( dtd2TypeDef
   ) where
 
-import List (intersperse,nub)
+import Data.List (intersperse,nub)
 
 import Text.XML.HaXml.Types hiding (Name)
 import Text.XML.HaXml.DtdToHaskell.TypeDef
diff -up HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Instance.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Instance.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Instance.hs.orig	2013-07-02 11:47:56.266891852 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/Instance.hs	2013-07-02 11:49:19.706909874 +0900
@@ -2,7 +2,7 @@ module Text.XML.HaXml.DtdToHaskell.Insta
   ( mkInstance
   ) where
 
-import List (intersperse)
+import Data.List (intersperse)
 
 import Text.XML.HaXml.DtdToHaskell.TypeDef
 import Text.PrettyPrint.HughesPJ
diff -up HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs.orig	2013-07-02 11:47:56.266891852 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs	2013-07-02 11:49:19.707909874 +0900
@@ -18,8 +18,8 @@ module Text.XML.HaXml.DtdToHaskell.TypeD
   , name, name_, name_a, name_ac, name_f, mangle, manglef
   ) where
 
-import Char (isLower, isUpper, toLower, toUpper, isDigit)
-import List (intersperse)
+import Data.Char (isLower, isUpper, toLower, toUpper, isDigit)
+import Data.List (intersperse)
 import Text.PrettyPrint.HughesPJ
 
 
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Escape.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Escape.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Escape.hs.orig	2013-07-02 11:47:56.267891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Escape.hs	2013-07-02 11:49:19.707909874 +0900
@@ -55,7 +55,7 @@ module Text.XML.HaXml.Escape(
 
    ) where
 
-import Char
+import Data.Char
 -- import Numeric
 import Text.XML.HaXml.Types
 
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Html/Generate.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Html/Generate.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Html/Generate.hs.orig	2013-07-02 11:47:56.267891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Html/Generate.hs	2013-07-02 11:49:19.707909874 +0900
@@ -28,7 +28,7 @@ module Text.XML.HaXml.Html.Generate
   , htmlprint
   ) where
 
-import Char (isSpace)
+import Data.Char (isSpace)
 
 import Text.XML.HaXml.Types
 import Text.XML.HaXml.Combinators
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Html/Parse.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Html/Parse.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Html/Parse.hs.orig	2013-07-02 11:47:56.267891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Html/Parse.hs	2013-07-02 11:49:19.708909875 +0900
@@ -13,10 +13,10 @@ module Text.XML.HaXml.Html.Parse
 
 import Prelude hiding (either,maybe,sequence)
 import qualified Prelude (either)
-import Maybe hiding (maybe)
-import Char (toLower, isSpace, isDigit, isHexDigit)
+import Data.Maybe hiding (maybe)
+import Data.Char (toLower, isSpace, isDigit, isHexDigit)
 import Numeric (readDec,readHex)
-import Monad
+import Control.Monad
 
 import Text.XML.HaXml.Types
 import Text.XML.HaXml.Lex
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Html/ParseLazy.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Html/ParseLazy.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Html/ParseLazy.hs.orig	2013-07-02 11:47:56.268891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Html/ParseLazy.hs	2013-07-02 11:49:19.708909875 +0900
@@ -13,10 +13,10 @@ module Text.XML.HaXml.Html.ParseLazy
 
 import Prelude hiding (either,maybe,sequence)
 import qualified Prelude (either)
-import Maybe hiding (maybe)
-import Char (toLower, isSpace, isDigit, isHexDigit)
+import Data.Maybe hiding (maybe)
+import Data.Char (toLower, isSpace, isDigit, isHexDigit)
 import Numeric (readDec,readHex)
-import Monad
+import Control.Monad
 
 import Text.XML.HaXml.Types
 import Text.XML.HaXml.Lex
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Html/Pretty.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Html/Pretty.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Html/Pretty.hs.orig	2013-07-02 11:47:56.268891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Html/Pretty.hs	2013-07-02 11:49:19.708909875 +0900
@@ -9,9 +9,9 @@ module Text.XML.HaXml.Html.Pretty
   ) where
 
 import Prelude hiding (maybe,either)
-import Maybe hiding (maybe)
-import List (intersperse)
-import Char (isSpace)
+import Data.Maybe hiding (maybe)
+import Data.List (intersperse)
+import Data.Char (isSpace)
 import Text.PrettyPrint.HughesPJ
 import Text.XML.HaXml.Types
 
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Lex.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Lex.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Lex.hs.orig	2013-07-02 11:47:56.268891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Lex.hs	2013-07-02 11:49:19.709909875 +0900
@@ -26,7 +26,7 @@ module Text.XML.HaXml.Lex
   , Section(..)
   ) where
 
-import Char
+import Data.Char
 import Text.XML.HaXml.Posn
 
 data Where = InTag String | NotInTag
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Parse.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Parse.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Parse.hs.orig	2013-07-02 11:47:56.269891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Parse.hs	2013-07-02 11:49:19.709909875 +0900
@@ -31,10 +31,10 @@ module Text.XML.HaXml.Parse
 
 import Prelude hiding (either,maybe,sequence)
 import qualified Prelude (either)
-import Maybe hiding (maybe)
-import List (intersperse)       -- debugging only
-import Char (isSpace,isDigit,isHexDigit)
-import Monad hiding (sequence)
+import Data.Maybe hiding (maybe)
+import Data.List (intersperse)       -- debugging only
+import Data.Char (isSpace,isDigit,isHexDigit)
+import Control.Monad hiding (sequence)
 import Numeric (readDec,readHex)
 
 import Text.XML.HaXml.Types
diff -up HaXml-1.20.2/src/Text/XML/HaXml/ParseLazy.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/ParseLazy.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/ParseLazy.hs.orig	2013-07-02 11:47:56.269891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/ParseLazy.hs	2013-07-02 11:49:19.709909875 +0900
@@ -30,10 +30,10 @@ module Text.XML.HaXml.ParseLazy
 
 import Prelude hiding (either,maybe,sequence,catch)
 import qualified Prelude (either)
-import Maybe hiding (maybe)
-import List (intersperse)       -- debugging only
-import Char (isSpace,isDigit,isHexDigit)
-import Monad hiding (sequence)
+import Data.Maybe hiding (maybe)
+import Data.List (intersperse)       -- debugging only
+import Data.Char (isSpace,isDigit,isHexDigit)
+import Control.Monad hiding (sequence)
 import Numeric (readDec,readHex)
 --import Control.Exception (catch)
 
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Posn.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Posn.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Posn.hs.orig	2013-07-02 11:47:56.269891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Posn.hs	2013-07-02 11:49:19.709909875 +0900
@@ -14,7 +14,7 @@ module Text.XML.HaXml.Posn
   , posnFilename, posnLine, posnColumn
   ) where
 
-import Char
+import Data.Char
 
 -- | Source positions contain a filename, line, column, and an
 --   inclusion point, which is itself another source position,
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Pretty.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Pretty.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Pretty.hs.orig	2013-07-02 11:47:56.270891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Pretty.hs	2013-07-02 11:49:19.710909875 +0900
@@ -22,8 +22,8 @@ module Text.XML.HaXml.Pretty
   ) where
 
 import Prelude hiding (maybe,either)
-import Maybe hiding (maybe)
-import List (intersperse)
+import Data.Maybe hiding (maybe)
+import Data.List (intersperse)
 --import Char (isSpace)
 import Text.PrettyPrint.HughesPJ
 import Text.XML.HaXml.Types
diff -up HaXml-1.20.2/src/Text/XML/HaXml/ShowXmlLazy.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/ShowXmlLazy.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/ShowXmlLazy.hs.orig	2013-07-02 11:47:56.270891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/ShowXmlLazy.hs	2013-07-02 11:49:19.710909875 +0900
@@ -5,7 +5,7 @@ import Text.XML.HaXml.TypeMapping -- (to
 
 import qualified Text.XML.HaXml.XmlContent as X
 import Prelude hiding (maybe,either)
-import Maybe hiding (maybe)
+import Data.Maybe hiding (maybe)
 import Data.List
 
 -- | Convert a fully-typed XML document to a string (without DTD).
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Validate.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Validate.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Validate.hs.orig	2013-07-02 11:47:56.271891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Validate.hs	2013-07-02 11:49:19.710909875 +0900
@@ -9,9 +9,9 @@ import qualified Prelude (elem)
 import Text.XML.HaXml.Types
 import Text.XML.HaXml.Combinators (multi,tag,iffind,literal,none,o)
 import Text.XML.HaXml.XmlContent (attr2str)
-import Maybe (fromMaybe,isNothing,fromJust)
-import List (intersperse,nub,(\\))
-import Char (isSpace)
+import Data.Maybe (fromMaybe,isNothing,fromJust)
+import Data.List (intersperse,nub,(\\))
+import Data.Char (isSpace)
 
 #if __GLASGOW_HASKELL__ >= 604 || __NHC__ >= 118 || defined(__HUGS__)
 -- emulate older finite map interface using Data.Map, if it is available
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Wrappers.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Wrappers.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Wrappers.hs.orig	2013-07-02 11:47:56.271891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Wrappers.hs	2013-07-02 11:49:19.710909875 +0900
@@ -8,9 +8,10 @@ module Text.XML.HaXml.Wrappers
 
 -- imports required for processXmlWith and fix2Args
 import Prelude hiding (filter)
-import System
-import IO
-import List (isSuffixOf)
+import System.Environment
+import System.Exit
+import System.IO
+import Data.List (isSuffixOf)
 import Control.Monad (when)
 
 import Text.XML.HaXml.Types       (Document(..),Content(..))
diff -up HaXml-1.20.2/src/Text/XML/HaXml/XmlContent.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/XmlContent.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/XmlContent.hs.orig	2013-07-02 11:47:56.272891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/XmlContent.hs	2013-07-02 11:49:19.711909875 +0900
@@ -31,7 +31,7 @@ module Text.XML.HaXml.XmlContent
   , hGetXml,  hPutXml, fpsHPutXml
   ) where
 
-import IO
+import System.IO
 import qualified Text.XML.HaXml.ByteStringPP as FPS (document)
 import qualified Data.ByteString.Lazy.Char8 as FPS
 
diff -up HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Haskell.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Haskell.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Haskell.hs.orig	2013-07-02 11:47:56.272891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Haskell.hs	2013-07-02 11:49:19.711909875 +0900
@@ -29,8 +29,8 @@ module Text.XML.HaXml.XmlContent.Haskell
 
   ) where
 
-import IO
-import List (isPrefixOf, isSuffixOf)
+import System.IO
+import Data.List (isPrefixOf, isSuffixOf)
 import qualified Text.XML.HaXml.ByteStringPP as FPS (document)
 import qualified Data.ByteString.Lazy.Char8 as FPS
 
diff -up HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Parser.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Parser.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Parser.hs.orig	2013-07-02 11:47:56.272891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/XmlContent/Parser.hs	2013-07-02 11:49:19.711909875 +0900
@@ -68,9 +68,9 @@ module Text.XML.HaXml.XmlContent.Parser
   ) where
 
 --import IO
-import Maybe (catMaybes)
-import Char  (chr, isSpace)
-import List  (isPrefixOf, isSuffixOf)
+import Data.Maybe (catMaybes)
+import Data.Char  (chr, isSpace)
+import Data.List  (isPrefixOf, isSuffixOf)
 
 import Text.PrettyPrint.HughesPJ (render)
 import qualified Text.XML.HaXml.Pretty as PP
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Lex.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Lex.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Lex.hs.orig	2013-07-02 11:47:56.273891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Lex.hs	2013-07-02 11:49:19.711909875 +0900
@@ -13,7 +13,7 @@ module Text.XML.HaXml.Xtract.Lex
   , Token
   ) where
 
-import Char
+import Data.Char
 
 
 type Token = Either String (Posn, TokenT)
diff -up HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Parse.hs.orig HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Parse.hs
--- HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Parse.hs.orig	2013-07-02 11:47:56.273891853 +0900
+++ HaXml-1.20.2/src/Text/XML/HaXml/Xtract/Parse.hs	2013-07-02 11:49:19.711909875 +0900
@@ -12,7 +12,7 @@ import Text.XML.HaXml.Xtract.Lex
 import Text.XML.HaXml.Xtract.Combinators as D
 import Text.XML.HaXml.Combinators as C
 import Text.XML.HaXml.Types (Content)
-import List(isPrefixOf)
+import Data.List(isPrefixOf)
 import Text.XML.HaXml.Escape (xmlUnEscapeContent,stdXmlEscaper)
 
 -- output transformer - to ensure that text/references are glued together
