[Pkg-haskell-maintainers] Bug#753299: libghc-highlighting-kate-dev: Highlighting Ocaml fails

John MacFarlane jgm at berkeley.edu
Fri Jul 18 23:53:17 UTC 2014

I'd tested before with pcre-regex-builtin, which worked.
I recompiled with pcre-light, and got the failure you report.

The problem can be exhibited in pcre-light:

Prelude Text.Regex.PCRE.Light Data.ByteString.UTF8> match (compile
"[\\o{0370}-\\o{0377}") [utf8,anchored]) (fromString "hi") []
*** Exception: Text.Regex.PCRE.Light: Error in regex: range out of order
character class

The unicode ranges seem to be confusing it, even with 'utf8' set.

Submitted an issue upstream:

In the mean time, I suggest that debian packagers use pcre-regex-builtin
instead (though perhaps there was a reason for using pcre-light?).

+++ Samuel Hym [Jul 01 14 18:06 ]:
>Hi John,
>>Are you certain that the version you are using in GHCI is,
>>and not an older version (perhaps from your user database)?
>I rechecked, using the same version of the package but on a different 
>machine, different arch, just in case. But still with debian-built 
>packages, and with the same result.
>Here is what ghci has to say, with the full versions of the modules used:
>GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
>Loading package ghc-prim ... linking ... done.
>Loading package integer-gmp ... linking ... done.
>Loading package base ... linking ... done.
>Prelude> :m +Text.Highlighting.Kate
>Prelude Text.Highlighting.Kate> highlightAs "ocaml" "a"
>Loading package array- ... linking ... done.
>Loading package deepseq- ... linking ... done.
>Loading package containers- ... linking ... done.
>Loading package bytestring- ... linking ... done.
>Loading package transformers- ... linking ... done.
>Loading package mtl-2.1.2 ... linking ... done.
>Loading package text- ... linking ... done.
>Loading package parsec-3.1.3 ... linking ... done.
>Loading package blaze-builder- ... linking ... done.
>Loading package blaze-markup- ... linking ... done.
>Loading package blaze-html- ... linking ... done.
>Loading package pcre-light-0.4 ... linking ... done.
>Loading package utf8-string-0.3.7 ... linking ... done.
>Loading package highlighting-kate- ... linking ... done.
>[*** Exception: Text.Regex.PCRE.Light: Error in regex: range out of 
>order in character class
>You think something else might be to blame in the module stack?
>Do you know if there is a way to ask pcre-light to be somewhat more 
>informative about the regex producing the issue?
>By the way, many thanks for pandoc!
>Best regards

More information about the Pkg-haskell-maintainers mailing list