This file is indexed.

/usr/share/doc/libghc-text-icu-doc/html/Data-Text-ICU-Collate.html is in libghc-text-icu-doc 0.7.0.1-4build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Data.Text.ICU.Collate</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Data-Text-ICU-Collate.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Data-Text-ICU-Collate.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">text-icu-0.7.0.1: Bindings to the ICU library</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Copyright</th><td>(c) 2010 Bryan O'Sullivan</td></tr><tr><th>License</th><td>BSD-style</td></tr><tr><th>Maintainer</th><td>bos@serpentine.com</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Portability</th><td>GHC</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Data.Text.ICU.Collate</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Unicode collation API</a></li><li><a href="#g:2">Functions</a><ul><li><a href="#g:3">Utility functions</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>String collation functions for Unicode, implemented as bindings to
 the International Components for Unicode (ICU) libraries.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:MCollator">MCollator</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Attribute">Attribute</a><ul class="subs"><li>= <a href="#v:French">French</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li>| <a href="#v:AlternateHandling">AlternateHandling</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></li><li>| <a href="#v:CaseFirst">CaseFirst</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a>)</li><li>| <a href="#v:CaseLevel">CaseLevel</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li>| <a href="#v:NormalizationMode">NormalizationMode</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li>| <a href="#v:Strength">Strength</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></li><li>| <a href="#v:HiraganaQuaternaryMode">HiraganaQuaternaryMode</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li><li>| <a href="#v:Numeric">Numeric</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:AlternateHandling">AlternateHandling</a><ul class="subs"><li>= <a href="#v:NonIgnorable">NonIgnorable</a></li><li>| <a href="#v:Shifted">Shifted</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:CaseFirst">CaseFirst</a><ul class="subs"><li>= <a href="#v:UpperFirst">UpperFirst</a></li><li>| <a href="#v:LowerFirst">LowerFirst</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Strength">Strength</a><ul class="subs"><li>= <a href="#v:Primary">Primary</a></li><li>| <a href="#v:Secondary">Secondary</a></li><li>| <a href="#v:Tertiary">Tertiary</a></li><li>| <a href="#v:Quaternary">Quaternary</a></li><li>| <a href="#v:Identical">Identical</a></li></ul></li><li class="src short"><a href="#v:open">open</a> :: <a href="Data-Text-ICU-Types.html#t:LocaleName">LocaleName</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></li><li class="src short"><a href="#v:collate">collate</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:collateIter">collateIter</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="Data-Text-ICU.html#t:CharIterator">CharIterator</a> -&gt; <a href="Data-Text-ICU.html#t:CharIterator">CharIterator</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ordering">Ordering</a></li><li class="src short"><a href="#v:getAttribute">getAttribute</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a></li><li class="src short"><a href="#v:setAttribute">setAttribute</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:sortKey">sortKey</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></li><li class="src short"><a href="#v:clone">clone</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></li><li class="src short"><a href="#v:freeze">freeze</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU.html#t:Collator">Collator</a></li></ul></div><div id="interface"><h1 id="g:1">Unicode collation API</h1><div class="doc empty">&nbsp;</div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:MCollator" class="def">MCollator</a> <a href="src/Data-Text-ICU-Collate-Internal.html#MCollator" class="link">Source</a></p><div class="doc"><p>String collator type.</p></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Attribute" class="def">Attribute</a> <a href="src/Data-Text-ICU-Collate.html#Attribute" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:French" class="def">French</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Direction of secondary weights, used in French.  <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>,
 results in secondary weights being considered backwards,
 while <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code> treats secondary weights in the order in
 which they appear.</p></td></tr><tr><td class="src"><a name="v:AlternateHandling" class="def">AlternateHandling</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></td><td class="doc"><p>For handling variable elements.  <code><a href="Data-Text-ICU-Collate.html#v:NonIgnorable">NonIgnorable</a></code> is
 default.</p></td></tr><tr><td class="src"><a name="v:CaseFirst" class="def">CaseFirst</a> (<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a>)</td><td class="doc"><p>Control the ordering of upper and lower case letters.
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Maybe.html#v:Nothing">Nothing</a></code> (the default) orders upper and lower case
 letters in accordance to their tertiary weights.</p></td></tr><tr><td class="src"><a name="v:CaseLevel" class="def">CaseLevel</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Controls whether an extra case level (positioned
 before the third level) is generated or not.  When
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code> (default), case level is not generated; when
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>, the case level is generated. Contents of the
 case level are affected by the value of the <code><a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a></code>
 attribute. A simple way to ignore accent differences in
 a string is to set the strength to <code><a href="Data-Text-ICU-Collate.html#v:Primary">Primary</a></code> and enable
 case level.</p></td></tr><tr><td class="src"><a name="v:NormalizationMode" class="def">NormalizationMode</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Controls whether the normalization check and necessary
 normalizations are performed. When <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:False">False</a></code> (default) no
 normalization check is performed. The correctness of the
 result is guaranteed only if the input data is in
 so-called <code>FCD</code> form (see users manual for more info).
 When <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>, an incremental check is performed to see
 whether the input data is in <code>FCD</code> form. If the data is
 not in <code>FCD</code> form, incremental <code>NFD</code> normalization is
 performed.</p></td></tr><tr><td class="src"><a name="v:Strength" class="def">Strength</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:HiraganaQuaternaryMode" class="def">HiraganaQuaternaryMode</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>When turned on, this attribute positions Hiragana
 before all non-ignorables on quaternary level. This is a
 sneaky way to produce JIS sort order.</p></td></tr><tr><td class="src"><a name="v:Numeric" class="def">Numeric</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>When enabled, this attribute generates a collation key
 for the numeric value of substrings of digits.  This is
 a way to get '100' to sort <em>after</em> '2'.</p></td></tr></table></div><div class="subs instances"><p id="control.i:Attribute" class="caption collapser" onclick="toggleSection('i:Attribute')">Instances</p><div id="section.i:Attribute" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a></span> <a href="src/Data-Text-ICU-Collate.html#line-145" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a></span> <a href="src/Data-Text-ICU-Collate.html#line-145" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a></span> <a href="src/Data-Text-ICU-Collate.html#line-147" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:AlternateHandling" class="def">AlternateHandling</a> <a href="src/Data-Text-ICU-Collate.html#AlternateHandling" class="link">Source</a></p><div class="doc"><p>Control the handling of variable weight elements.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:NonIgnorable" class="def">NonIgnorable</a></td><td class="doc"><p>Treat all codepoints with non-ignorable primary
 weights in the same way.</p></td></tr><tr><td class="src"><a name="v:Shifted" class="def">Shifted</a></td><td class="doc"><p>Cause codepoints with primary weights that are
 equal to or below the variable top value to be
 ignored on primary level and moved to the
 quaternary level.</p></td></tr></table></div><div class="subs instances"><p id="control.i:AlternateHandling" class="caption collapser" onclick="toggleSection('i:AlternateHandling')">Instances</p><div id="section.i:AlternateHandling" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Bounded">Bounded</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></span> <a href="src/Data-Text-ICU-Collate.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Enum">Enum</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></span> <a href="src/Data-Text-ICU-Collate.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></span> <a href="src/Data-Text-ICU-Collate.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></span> <a href="src/Data-Text-ICU-Collate.html#line-72" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Text-ICU-Collate.html#t:AlternateHandling">AlternateHandling</a></span> <a href="src/Data-Text-ICU-Collate.html#line-74" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:CaseFirst" class="def">CaseFirst</a> <a href="src/Data-Text-ICU-Collate.html#CaseFirst" class="link">Source</a></p><div class="doc"><p>Control the ordering of upper and lower case letters.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:UpperFirst" class="def">UpperFirst</a></td><td class="doc"><p>Force upper case letters to sort before
 lower case.</p></td></tr><tr><td class="src"><a name="v:LowerFirst" class="def">LowerFirst</a></td><td class="doc"><p>Force lower case letters to sort before
 upper case.</p></td></tr></table></div><div class="subs instances"><p id="control.i:CaseFirst" class="caption collapser" onclick="toggleSection('i:CaseFirst')">Instances</p><div id="section.i:CaseFirst" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Bounded">Bounded</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a></span> <a href="src/Data-Text-ICU-Collate.html#line-82" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Enum">Enum</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a></span> <a href="src/Data-Text-ICU-Collate.html#line-82" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a></span> <a href="src/Data-Text-ICU-Collate.html#line-82" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a></span> <a href="src/Data-Text-ICU-Collate.html#line-82" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Text-ICU-Collate.html#t:CaseFirst">CaseFirst</a></span> <a href="src/Data-Text-ICU-Collate.html#line-84" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Strength" class="def">Strength</a> <a href="src/Data-Text-ICU-Collate.html#Strength" class="link">Source</a></p><div class="doc"><p>The strength attribute. The usual strength for most locales (except
 Japanese) is tertiary. Quaternary strength is useful when combined with
 shifted setting for alternate handling attribute and for JIS x 4061
 collation, when it is used to distinguish between Katakana and Hiragana
 (this is achieved by setting <code><a href="Data-Text-ICU-Collate.html#v:HiraganaQuaternaryMode">HiraganaQuaternaryMode</a></code> mode to
 <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Bool.html#v:True">True</a></code>). Otherwise, quaternary level is affected only by the number of
 non ignorable code points in the string. Identical strength is rarely
 useful, as it amounts to codepoints of the <code>NFD</code> form of the string.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Primary" class="def">Primary</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Secondary" class="def">Secondary</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Tertiary" class="def">Tertiary</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Quaternary" class="def">Quaternary</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Identical" class="def">Identical</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Strength" class="caption collapser" onclick="toggleSection('i:Strength')">Instances</p><div id="section.i:Strength" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Bounded">Bounded</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></span> <a href="src/Data-Text-ICU-Collate.html#line-100" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Prelude.html#t:Enum">Enum</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></span> <a href="src/Data-Text-ICU-Collate.html#line-100" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Eq.html#t:Eq">Eq</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></span> <a href="src/Data-Text-ICU-Collate.html#line-100" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Text-Show.html#t:Show">Show</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></span> <a href="src/Data-Text-ICU-Collate.html#line-100" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src clearfix"><span class="inst-left"><a href="file:///usr/share/doc/ghc-doc/html/libraries/deepseq-1.4.1.1/Control-DeepSeq.html#t:NFData">NFData</a> <a href="Data-Text-ICU-Collate.html#t:Strength">Strength</a></span> <a href="src/Data-Text-ICU-Collate.html#line-102" class="link">Source</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><h1 id="g:2">Functions</h1><div class="top"><p class="src"><a name="v:open" class="def">open</a> <a href="src/Data-Text-ICU-Collate.html#open" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="Data-Text-ICU-Types.html#t:LocaleName">LocaleName</a></td><td class="doc"><p>The locale containing the required collation rules.</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Open a <code><a href="Data-Text-ICU.html#t:Collator">Collator</a></code> for comparing strings.</p></div></div><div class="top"><p class="src"><a name="v:collate" class="def">collate</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="src/Data-Text-ICU-Collate.html#collate" class="link">Source</a></p><div class="doc"><p>Compare two strings.</p></div></div><div class="top"><p class="src"><a name="v:collateIter" class="def">collateIter</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="Data-Text-ICU.html#t:CharIterator">CharIterator</a> -&gt; <a href="Data-Text-ICU.html#t:CharIterator">CharIterator</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="src/Data-Text-ICU-Collate.html#collateIter" class="link">Source</a></p><div class="doc"><p>Compare two <code><a href="Data-Text-ICU.html#t:CharIterator">CharIterator</a></code>s.</p><p>If either iterator was constructed from a <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code>, it does not need
 to be copied or converted internally, so this function can be quite
 cheap.</p></div></div><h2 id="g:3">Utility functions</h2><div class="top"><p class="src"><a name="v:getAttribute" class="def">getAttribute</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a> <a href="src/Data-Text-ICU-Collate.html#getAttribute" class="link">Source</a></p><div class="doc"><p>Get the value of an <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code> attribute.</p><p>It is safe to provide a dummy argument to an <code><a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a></code> constructor when
 using this function, so the following will work:</p><pre>getAttribute mcol (NormalizationMode undefined)</pre></div></div><div class="top"><p class="src"><a name="v:setAttribute" class="def">setAttribute</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="Data-Text-ICU-Collate.html#t:Attribute">Attribute</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> () <a href="src/Data-Text-ICU-Collate.html#setAttribute" class="link">Source</a></p><div class="doc"><p>Set the value of an <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code> attribute.</p></div></div><div class="top"><p class="src"><a name="v:sortKey" class="def">sortKey</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a> <a href="src/Data-Text-ICU-Collate.html#sortKey" class="link">Source</a></p><div class="doc"><p>Create a key for sorting the <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code> using the given <code><a href="Data-Text-ICU.html#t:Collator">Collator</a></code>.
 The result of comparing two <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/bytestring-0.10.6.0/Data-ByteString.html#t:ByteString">ByteString</a></code>s that have been
 transformed with <code><a href="Data-Text-ICU-Collate.html#v:sortKey">sortKey</a></code> will be the same as the result of
 <code><a href="Data-Text-ICU-Collate.html#v:collate">collate</a></code> on the two untransformed <code><a href="file:///usr/share/doc/libghc-text-doc/html/Data-Text.html#t:Text">Text</a></code>s.</p></div></div><div class="top"><p class="src"><a name="v:clone" class="def">clone</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> <a href="src/Data-Text-ICU-Collate.html#clone" class="link">Source</a></p><div class="doc"><p>Make a copy of a mutable <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code>.
 Subsequent changes to the input <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code> will not affect the state of
 the returned <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code>.</p></div></div><div class="top"><p class="src"><a name="v:freeze" class="def">freeze</a> :: <a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.8.2.0/System-IO.html#t:IO">IO</a> <a href="Data-Text-ICU.html#t:Collator">Collator</a> <a href="src/Data-Text-ICU-Collate.html#freeze" class="link">Source</a></p><div class="doc"><p>Make a safe copy of a mutable <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code> for use in pure code.
 Subsequent changes to the <code><a href="Data-Text-ICU-Collate.html#t:MCollator">MCollator</a></code> will not affect the state of
 the returned <code><a href="Data-Text-ICU.html#t:Collator">Collator</a></code>.</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.16.1</p></div></body></html>