ANN: case-insensitive-0.1

Dear all, I had this old module laying around that I wrote some time ago. I dusted it off and uploaded it to Hackage: http://hackage.haskell.org/package/case-insensitive-0.1 The package provides the module Data.CaseInsensitive which exports the CI type constructor which can be parameterised by a string-like type like: String, ByteString, Text, etc.. Comparisons of values of the resulting type are then insensitive to cases. It is my hope that one day packages like snap-core[1], http-types[2] or wai[3] all use this common way of making strings case insensitive. Regards, Bas [1] http://hackage.haskell.org/packages/archive/snap-core/latest/doc/html/Data-C... [2] http://hackage.haskell.org/packages/archive/http-types/0.3.0/doc/html/Networ... [3] http://hackage.haskell.org/packages/archive/wai/latest/doc/html/Network-Wai....

Hi Bas
This could be a useful package but can you add a note that this does
not do correct Unicode-aware comparison on String (though AFAICT it is
correct for Text)?
--Max
On Mon, Feb 7, 2011 at 02:06, Bas van Dijk
Dear all,
I had this old module laying around that I wrote some time ago. I dusted it off and uploaded it to Hackage:
http://hackage.haskell.org/package/case-insensitive-0.1
The package provides the module Data.CaseInsensitive which exports the CI type constructor which can be parameterised by a string-like type like: String, ByteString, Text, etc.. Comparisons of values of the resulting type are then insensitive to cases.
It is my hope that one day packages like snap-core[1], http-types[2] or wai[3] all use this common way of making strings case insensitive.
Regards,
Bas
[1] http://hackage.haskell.org/packages/archive/snap-core/latest/doc/html/Data-C... [2] http://hackage.haskell.org/packages/archive/http-types/0.3.0/doc/html/Networ... [3] http://hackage.haskell.org/packages/archive/wai/latest/doc/html/Network-Wai....
_______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell

On 7 February 2011 15:26, Max Rabkin
This could be a useful package but can you add a note that this does not do correct Unicode-aware comparison on String (though AFAICT it is correct for Text)?
Good point! I just released version 0.2: http://hackage.haskell.org/package/case-insensitive-0.2 Changelog: * Added note about the not fully correct case folding of types other than Text Requested by Max Rabkin. * Removed FoldCase instance for [s] and added one for String I think this makes more sense. Bumped version from 0.1 to 0.2 because of the removed instance. * Export foldedCase :: CI s -> s. * Other little documentation fixes. Regards, Bas
participants (2)
-
Bas van Dijk
-
Max Rabkin