diff --git a/HaXml.cabal b/HaXml.cabal
--- a/HaXml.cabal
+++ b/HaXml.cabal
@@ -1,5 +1,5 @@
 name:		HaXml
-version:	1.22.3
+version:	1.22.4
 license:	LGPL
 license-file:	COPYRIGHT
 author:		Malcolm Wallace <Malcolm.Wallace@me.com>
@@ -75,54 +75,54 @@
   else
     build-depends: base < 2 || >= 3, bytestring
   extensions: CPP, ExistentialQuantification
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   nhc98-options: -K10M
 
 Executable Canonicalise
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: Canonicalise.hs
 
 Executable CanonicaliseLazy
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: CanonicaliseLazy.hs
 
 Executable Xtract
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: Xtract.hs
 
 Executable Validate
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: Validate.hs
 
 Executable MkOneOf
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: MkOneOf.hs
 
 Executable DtdToHaskell
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: DtdToHaskell.hs
 
 Executable XsdToHaskell
   GHC-Options: -Wall
   Extensions:  CPP
   Hs-Source-Dirs: src/tools, src
-  cpp-options: -DMYVERSION="\"1.22\""
+  cpp-options: -DMAJOR=1 -DMINOR=22
   Main-Is: XsdToHaskell.hs
diff --git a/src/Text/XML/HaXml.hs b/src/Text/XML/HaXml.hs
--- a/src/Text/XML/HaXml.hs
+++ b/src/Text/XML/HaXml.hs
@@ -33,5 +33,5 @@
 
 -- | The version of the library.
 version :: String
-version  = "1.22"
+version  = show MAJOR.MINOR
 		-- expect cpp to fill in value
diff --git a/src/Text/XML/HaXml/Schema/Schema.hs b/src/Text/XML/HaXml/Schema/Schema.hs
--- a/src/Text/XML/HaXml/Schema/Schema.hs
+++ b/src/Text/XML/HaXml/Schema/Schema.hs
@@ -47,7 +47,7 @@
 
 -- | A type t can extend another type s by the addition of extra elements
 --   and/or attributes.  s is therefore the supertype of t.
-class Extension t s {- - | t -> s -} where  -- fundep ill-advised.
+class Extension t s {- | t -> s -} where  -- fundep ill-advised.
     supertype :: t -> s
 
 -- | A type t can restrict another type s, that is, t admits fewer values
diff --git a/src/Text/XML/HaXml/Wrappers.hs b/src/Text/XML/HaXml/Wrappers.hs
--- a/src/Text/XML/HaXml/Wrappers.hs
+++ b/src/Text/XML/HaXml/Wrappers.hs
@@ -31,7 +31,7 @@
 fix2Args = do
   args <- getArgs
   when ("--version" `elem` args) $ do
-      putStrLn $ "part of HaXml-"++show MYVERSION
+      putStrLn $ "part of HaXml-"++show MAJOR.MINOR
       exitWith ExitSuccess
   when ("--help" `elem` args) $ do
       putStrLn $ "See http://haskell.org/HaXml"
