Compiling HXML toolbox under Hugs/Windows

Graham Klyne gk at ninebynine.org
Mon Jan 12 11:59:58 EST 2004


I've been trying to compile the HXML toolbox, version 3.01 
(http://www.fh-wedel.de/~si/HXmlToolbox/HXmlToolbox-3.01.tar.gz), using the 
experimental Unicode version of Hugs, and have encountered a few source 
code problems that I think are maybe not specific to Hugs.

(1) hdom/xmltreefilter.hs, incorrect section syntax:
line 555, changed to:
del1Attr an = processAttrl ((none `when` isAttr an) $$)
line 613, changed to:
     = processAttrl ((modifyValue `when` isAttr an) $$)

(2) hparser/unicode.hs, questionable range of unicode characters in:
[[
-- |
-- test for a legal multi byte XML char

isMultiByteXmlChar      :: Unicode -> Bool
isMultiByteXmlChar i
     = ( i >= '\x00000080' && i <= '\x0000D7FF' )
       ||
       ( i >= '\x0000E000' && i <= '\x0000FFFD' )
       ||
       ( i >= '\x00010000' && i <= '\x0010FFFF' )
]]
Should that be \x0010FFFF or \x0010FFFD?  (The Hugs Unicode code had 
\x0010FFFD for the upper bound.)

(3) hparser/xmlinput.hs, line 38:  spurious ','

(4) Missing module 'Socket'.
[[
Reading file "..\hparser\XmlInput.hs":
Parsing
ERROR "..\hparser\XmlInput.hs" - Can't find imported module "Socket"
]]
Is this a GHC/Hugs library difference?  Should this be Network.Socket?  I 
tried using that and it seemed to be accepted.

(5) Ditto for module URI.

(6) I think a probem with the build instructions in README:
[[
Just add the modules from the directories "hdom", "hparser", "hvalidator",
"hxpath", "http" and
"parsec" to the path of your compiler or interpreter, the Makefile contains
an example.
It is planned to provide a GHC package of the Haskell XML Toolbox in the
near future.
An example ghci project file ".ghci" can be found in the examples directory.
]]
does not mention directory popen.

(7) in POpen.hs:
Module Posix should be Text.Regex.Posix?

At this point, I get:
[[
Reading file "..\popen\POpen.hs":
ERROR "..\popen\POpen.hs":39 - Undefined type constructor "ProcessID"
]]
and give up chasing down this problem.  I'm wondering if the HXML toolbox 
library has been tested under MS Windows?

#g


------------
Graham Klyne
For email:
http://www.ninebynine.org/#Contact



More information about the Haskell mailing list