-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Case insensitive string comparison -- -- The module Data.CaseInsensitive provides 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 will be insensitive to cases. @package case-insensitive @version 0.2 -- | This module is intended to be imported qualified. May I suggest: -- --
--   import          Data.CaseInsensitive   ( CI )
--   import qualifed Data.CaseInsensitivee as CI
--   
module Data.CaseInsensitive -- | A CI s provides Case Insensitive comparison for -- the string-like type s (for example: String, -- Text, ByteString, ShowS, etc.). -- -- Note that CI s has an instance for IsString which -- together with the OverloadedStrings language extension allows -- you to write case insensitive string literals as in: -- --
--   > ("Content-Type" :: CI Text) == ("CONTENT-TYPE" :: CI Text)
--   True
--   
data CI s -- | Make the given string-like value case insensitive. mk :: FoldCase s => s -> CI s -- | Retrieve the original string-like value. original :: CI s -> s -- | Retrieve the case folded string-like value. (Also see -- foldCase). foldedCase :: CI s -> s -- | Transform the original string-like value but keep it case insensitive. map :: FoldCase s2 => (s1 -> s2) -> (CI s1 -> CI s2) -- | Class of string-like types that support folding cases. -- -- Note that the instances for Char, String, ShowS -- and the ByteString types do not perform fully correct -- Unicode-aware case folding, they simply toLower their -- characters! This is of course more than suitable for ASCII encoded -- strings. -- -- The instances for the Text types use toCaseFold which -- performs a better Unicode-aware case fold which is more suitable for -- case insensitive string comparisons. class FoldCase s foldCase :: FoldCase s => s -> s instance Typeable1 CI instance FoldCase (CI s) instance FoldCase ShowS instance FoldCase Text instance FoldCase Text instance FoldCase ByteString instance FoldCase ByteString instance FoldCase String instance FoldCase Char instance Show s => Show (CI s) instance (Read s, FoldCase s) => Read (CI s) instance Ord s => Ord (CI s) instance Eq s => Eq (CI s) instance Monoid s => Monoid (CI s) instance (IsString s, FoldCase s) => IsString (CI s)