[Haskell-cafe] Using regexps to filter data
michael rice
nowgate at yahoo.com
Sun Mar 14 22:43:41 EDT 2010
Not sure I'm even in the right neighborhood with this. Need to screen for integer data.
Am I going about this correctly?
Michael
======
[michael at localhost ~]$ ghci
GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> :m + Text.Regex.Base.RegexLike
Prelude Text.Regex.Base.RegexLike> let r = makeRegex "[+-]?[0-9]+"
<interactive>:1:8:
No instance for (RegexMaker regex compOpt execOpt [Char])
arising from a use of `makeRegex' at <interactive>:1:8-30
Possible fix:
add an instance declaration for
(RegexMaker regex compOpt execOpt [Char])
In the expression: makeRegex "[+-]?[0-9]+"
In the definition of `r': r = makeRegex "[+-]?[0-9]+"
Prelude Text.Regex.Base.RegexLike>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100314/6da125ef/attachment.html
More information about the Haskell-Cafe
mailing list