[Haskell-beginners] A difficult package

Daniel Fischer daniel.is.fischer at web.de
Wed Jul 14 18:19:03 EDT 2010


On Wednesday 14 July 2010 19:20:09, Ben Wise wrote:
> Folks,
>
> I'm trying to work through Conrad Barski's Haskell tutorial,
> http://www.lisperati.com/haskell/, and I've run into a difficult package
> problem. I've googled around for two days, but nothing seems to work.
>
> Basically, I can not get it recognize matchRegex, mkRegex, and similar.
> They are all in the Text.Regex.Posix package,

hoogle and hayoo think they're not in regex-posix but in regex-compat

> and version 0.94.1 is
> installed according to 'cabal list regex'. The 'import Text.Regex.Posix'
> line compiles just fine, so it is finding the package: it just doesn't
> find the symbols in it ?!
>
> But (under all four combinations of command line ghc or Leksah on
> Windows 7 or Ubuntu), it keeps trying to use the 'base' version, not
> posix.

Text.Regex.Posix imports and re-exports Text.Regex.Base, so if you're using 
Text.Regex.Posix, you're *also* using regex-base.

> At least, that's what 'ghc -v main.hs'

add --make

> seems to be saying. In
> Leksah, adding some of the suggested build dependencies fixed earlier
> problems with importing the Text and Random things, but adding
> 'regex-compat' as suggested did not help.
>
> Has anyone else gotten CB's tutorial to work?
>
> Any suggestions as to how to get Text.Regex.Posix imported?



More information about the Beginners mailing list