[Haskell-cafe] Library support for sorting with Text.Data.ICU.Collate.MCollator?
Richard Cobbe
cobbe at ccs.neu.edu
Mon Sep 19 15:26:27 CEST 2011
I'm trying to sort a list of Text values using a collator obtained from the
Text.Data.ICU.Collate module in the text-icu package on Hackage.
Unfortunately, I can't use the normal Data.List.sortBy function with one of
these collators, because the collators return (IO Ordering), not Ordering.
It's easy to write sortWithCollator :: [Text] -> IO [Text], but I'd rather
not have to. I haven't been able to find library support for this anywhere
-- am I overlooking it, or do I need to write the sort function myself?
Thanks,
Richard
More information about the Haskell-Cafe
mailing list