Copyright | (c) 2011-2013 Bas van Dijk (c) 2016 Patrick Pelletier |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Patrick Pelletier <code@funwithsoftware.org> |
Safe Haskell | Trustworthy |
Language | Haskell98 |
This module is intended to be imported qualified. May I suggest:
import Data.Unicode.NormalizationInsensitive ( NI ) import qualified Data.Unicode.NormalizationInsensitive as NI
- data NI s
- mk :: Normalizable s => s -> NI s
- original :: NI s -> s
- map :: Normalizable s2 => (s1 -> s2) -> NI s1 -> NI s2
- class Normalizable s where
Documentation
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
Eq s => Eq (NI s) Source # | |
Data s => Data (NI s) Source # | |
Ord s => Ord (NI s) Source # | |
(Read s, Normalizable s) => Read (NI s) Source # | |
Show s => Show (NI s) Source # | |
(IsString s, Normalizable s) => IsString (NI s) Source # | |
(Monoid s, Normalizable s) => Monoid (NI s) Source # | |
NFData s => NFData (NI s) Source # | |
Hashable s => Hashable (NI s) Source # | |
Normalizable (NI s) Source # | |
mk :: Normalizable s => s -> NI s Source #
Make the given string-like value normalization insensitive.
map :: Normalizable s2 => (s1 -> s2) -> NI s1 -> NI s2 Source #
Transform the original string-like value but keep it normalized.
class Normalizable s where Source #
Class of string-like types that support normalization.
Normalizable String Source # | |
Normalizable ByteString Source # | Note that |
Normalizable ByteString Source # | Note that |
Normalizable Text Source # | |
Normalizable Text Source # | |
Normalizable (NI s) Source # | |