[Haskell-cafe] Re: ByteString comparison question (was: another
Newbie performance question)
barsoap at web.de
Sun May 18 14:11:10 EDT 2008
Philip Müller <mail at philip.in-aachen.net> wrote:
> Achim Schneider schrieb:
> > Philip Müller <mail at philip.in-aachen.net> wrote:
> >> I do not know how to compare a Word8 to a Char. Or maybe I don't
> >> need to?
> > You don't need to, just use ByteString.Char8 or
> > ByteString.Lazy.Char8.
> Could you give a short example of how to check whether a ByteString
> starts with a comma (',')?
check s = runParser (char ',') () "" s
> But now I get strange errors when compiling, like
> Main.o: In function `rTD_info':
> (.text+0x5a): undefined reference to
> Is this a problem with my Code or is it just GHC unable to find the
> ByteString package?
No, it can find it, or you would have gotten errors beforehand. The
linker can't find it because GHC can be kind of demented when it comes
to remembering which packages it used while compiling, depending on
use ghc -package bytestring or, preferably, ghc --make
(c) this sig last receiving data processing entity. Inspect headers for
past copyright information. All rights reserved. Unauthorised copying,
hiring, renting, public performance and/or broadcasting of this
More information about the Haskell-Cafe