-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Normalization insensitive string comparison -- -- The module Data.Unicode.NormalizationInsensitive provides the -- NI type constructor which can be parameterized by a string-like -- type like: String, ByteString, Text, etc.. -- Comparisons of values of the resulting type will be insensitive to -- normalization. This is very similar in spirit to the -- case-insensitive package, and is in fact based on the same -- code. @package normalization-insensitive @version 2.0 -- | Provides an unsafe way to create a normalization insensitive -- string-like value. module Data.Unicode.NormalizationInsensitive.Unsafe -- | Constructs a NI from an already normalized string-like value. -- The given string is used both as the original as well as the -- normalized. -- -- This function is unsafe since the compiler can't guarantee that the -- provided string is normalized. unsafeMk :: s -> NI s -- | This module is intended to be imported qualified. May I suggest: -- --
-- import Data.Unicode.NormalizationInsensitive ( NI ) -- import qualified Data.Unicode.NormalizationInsensitive as NI --module Data.Unicode.NormalizationInsensitive -- | A NI s provides Normalization Insensitive -- comparison for the string-like type s (for example: -- String, Text, ByteString, etc.). -- -- Note that NI s has an instance for IsString which -- together with the OverloadedStrings language extension allows -- you to write normalization insensitive string literals as in: -- --
-- > ("\12399\12441" :: NI Text) == ("\12400" :: NI Text)
-- True
--
data NI s
-- | Make the given string-like value normalization insensitive.
mk :: Normalizable s => s -> NI s
-- | Retrieve the original string-like value.
original :: NI s -> s
-- | Transform the original string-like value but keep it normalized.
map :: Normalizable s2 => (s1 -> s2) -> (NI s1 -> NI s2)
-- | Class of string-like types that support normalization.
class Normalizable s
normalize :: Normalizable s => s -> s