Could not find module `Text.Regex'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Could not find module `Text.Regex'

z_axis
import Text.Regex

date_by_ntday dateStr ntday = do
    let [y,m,d] = map (\x -> read x::Int) $ splitRegex (mkRegex "-") dateStr
    ....

%ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.12.1

Which package(s) do i need to use Text.Regex ?

Sincerely!
e^(π.i) + 1 = 0
Reply | Threaded
Open this post in threaded view
|

Re: Could not find module `Text.Regex'

Lee Houghton-3
On 29/01/2010 03:51, zaxis wrote:

>
> import Text.Regex
>
> date_by_ntday dateStr ntday = do
>      let [y,m,d] = map (\x ->  read x::Int) $ splitRegex (mkRegex "-") dateStr
>      ....
>
> %ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.12.1
>
> Which package(s) do i need to use Text.Regex ?
>
> Sincerely!

It looks like you want regex-compat:

http://hackage.haskell.org/packages/archive/regex-compat/0.92/doc/html/Text-Regex.html

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Could not find module `Text.Regex'

Don Stewart-2
In reply to this post by z_axis
z_axis:

>
> import Text.Regex
>
> date_by_ntday dateStr ntday = do
>     let [y,m,d] = map (\x -> read x::Int) $ splitRegex (mkRegex "-") dateStr
>     ....
>
> %ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.12.1
>
> Which package(s) do i need to use Text.Regex ?

In general, you can find an answer via hayoo:

    http://holumbus.fh-wedel.de/hayoo/hayoo.html

e.g typing in "Text.Regex" brings:

    http://holumbus.fh-wedel.de/hayoo/hayoo.html?query=Text.Regex

says, for the first hit:

    regex-compat    
    Text.Regex. splitRegex  :: Regex -> String -> [ String ]

so yes, you need regex-compat
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: Could not find module `Text.Regex'

z_axis
In reply to this post by Lee Houghton-3
`cabal install regex-compat` fixes my problem.  thanks!
e^(π.i) + 1 = 0
Reply | Threaded
Open this post in threaded view
|

Re: Could not find module `Text.Regex'

Jason Dagit-2


On Fri, Jan 29, 2010 at 1:09 AM, zaxis <[hidden email]> wrote:

`cabal install regex-compat` fixes my problem.  thanks!

For what it's worth, according to the documentation the "-compat" package is for easing a transition in the api (which has now been completed).  You may want to "upgrade" to a different package now, for instance regex-posix (which I've found to be in a nice spot between portability and performance).

Jason


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe