[Haskell] HaXml

Michael Mossey mpm at alumni.caltech.edu
Sat Nov 10 00:04:33 CET 2012

I'm fairly beginnerish. I'm trying to use HaXml with MusicXML. I got a hold
of the MusicXML DTD and ran DtdToHaskell. It generated a file which I then
attempted to import to a test program. I got a few compiler errors about
duplicate definitions and ambiguous definitions. It seemed pretty clear
that these resulted from names in the DTD clashing with each other or with
existing names, and I just tweaked some of those. Those compile errors went

However, I have a new set of compiler errors. I'm getting a similar error
hundreds of times, namely

"Couldn't match expected type Text.XML.HaXml.Types.QName with actual type

Poking around, I found this webpage describing an issue with a change to
HaXml that happened after version 1.20.2:


This web page suggests that I need to install HaXml-1.20.2 to use it with
the current version of the DtdToHaskell utility. Note that I already have
the latest version of HaXml installed, so I would need to replace it with
an older version.

I tried running

cabal install HaXml-1.20.2

but got
"Ambiguous model name 'Prelude': it was found in multiple packages: base

This sounds like something fundamental about the Haskell packages but I
don't know enough to know what to do.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell/attachments/20121109/67017755/attachment.htm>

More information about the Haskell mailing list