The pure boundary analysis API seems to have a problem in that it can produce different results when given identical arguments.
The following example illustrates the problem:
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Monad
import Data.Monoid
import Data.Text.ICU
main = do
let x = "foobar"
x' = foldr (\_ x -> x <> x) x [1..15]
forM_ [1..10] $ \_ -> print $ length (charBreaks x')
charBreaks = breaks (breakCharacter Current)
When I run this, I get (in one instance):
196419
196392
196416
196549
196469
196565
196449
196258
196247
196373
Any idea what might be going wrong?
The pure boundary analysis API seems to have a problem in that it can produce different results when given identical arguments.
The following example illustrates the problem:
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad import Data.Monoid import Data.Text.ICU main = do let x = "foobar" x' = foldr (\_ x -> x <> x) x [1..15] forM_ [1..10] $ \_ -> print $ length (charBreaks x') charBreaks = breaks (breakCharacter Current)When I run this, I get (in one instance):
Any idea what might be going wrong?