[Haskell-cafe] HaXml and ghci unresolved symbol

Andrea Rossato mailing_list at istitutocolli.org
Sat Sep 9 08:17:36 EDT 2006


Hello!

probably it's me, but I cannot understand what I'm doing wrong.

I'm trying to learn HaXml. I've never used it before and I never did
xml processing in Haskell. So I'm a total newbie!!

I downloaded and compiled. Everything seems fine. I'm also able to run
some examples in the related directory of the source tree.

Then I try doing something myself. Very simply, a document with just
one element:

module Xml where
import Text.XML.HaXml

xml = "<a>test</a>"
doc = xmlParse "test" xml
elemName (Document prolog _ (Elem name _ _) _) = name

When I try it:

*Xml> elemName doc

I get a message I've never got before (I'm a newbie!) and I don't know
whether the problem is in my code (this would be my first guess), in
HaXml or in GHCi. And so I cannot even start understanding out to
solve it:

During interactive linking, GHCi couldn't find the following symbol:
  TextziXMLziHaXmlziParse_xmlParse_closure
This may be due to you not asking GHCi to load extra object files,
archives or DLLs needed by your current session.  Restart GHCi, specifying
the missing library using the -L/path/to/object/dir and -lmissinglibname
flags, or simply by naming the relevant files on the GHCi command line.
Alternatively, this link failure might indicate a bug in GHCi.
If you suspect the latter, please send a bug report to:
  glasgow-haskell-bugs at haskell.org
*Xml> 

xmlParse is defined in Text.Xml.HaXml (xmlParse :: String -> String ->
Document) and it should be imported by Text.XML.HaXml.

Can you give me please some directions?

Thanks for your kind attention.


More information about the Haskell-Cafe mailing list