[Haskell-cafe] FPS lib

Simon Marlow simonmar at microsoft.com
Wed Oct 19 06:36:03 EDT 2005


On 18 October 2005 21:04, John Meacham wrote:

> On Tue, Oct 18, 2005 at 10:39:24AM +0300, Einar Karttunen wrote:
>> On 18.10 10:44, Bulat Ziganshin wrote:
>>> 2) as i say you before, i need to sort filenames in windows fashion
>>> (case-ignoring), so if you will include case-ignoring comparision
>>> operators - i will be glad
>> 
>> Case ignoring comparisons make only sense on characters - not on
>> bytes. And fps is ignoring character set conversion issues. I think
>> the proper way is to provide a layer on top of (and separate from)
>> fps that does conversion into character strings where things like
>> case make sense. 
> 
> My FastString library always stores everything as UTF8 to good effect.
> I have some nice fast unboxed UTF8 character folding routines in there
> too which you might want to grab if you go the UTF8 route. (which I
> recommend highly).
> 
>  http://repetae.net/john/repos/jhc/PackedString.hs

I believe I stole your UTF-8 code for my Data.PackedString.UTF8 version
(which Don uploaded here
http://www.cse.unsw.edu.au/~dons/packedstring.tar.gz).  

It might be slightly modified though; in my version I wanted to support
foldr/build optimisation of things like (pack (map f xs)) and (unpack s
++ t).  IIRC I got it working for unpack, but not for pack.

Cheers,
	Simon


More information about the Haskell-Cafe mailing list