@@ -90,12 +90,18 @@ genNamesModule moduleName = Fold step initial done
9090 cjkCompat = 0xf0
9191 cjkUnified = 0xf1
9292 tangut = 0xf2
93+ egyptianHieroglyph = 0xf3
94+ khitan = 0xf4
95+ nushu = 0xf5
9396 hangul = 0x80
9497
9598 encodeName name
96- | BS. take 28 name == " CJK COMPATIBILITY IDEOGRAPH-" = (" " , cjkCompat, 0 , True )
97- | BS. take 22 name == " CJK UNIFIED IDEOGRAPH-" = (" " , cjkUnified, 0 , True )
98- | BS. take 17 name == " TANGUT IDEOGRAPH-" = (" " , tangut, 0 , True )
99+ | BS. take 28 name == " CJK COMPATIBILITY IDEOGRAPH-" = (" " , cjkCompat, 0 , True )
100+ | BS. take 22 name == " CJK UNIFIED IDEOGRAPH-" = (" " , cjkUnified, 0 , True )
101+ | BS. take 17 name == " TANGUT IDEOGRAPH-" = (" " , tangut, 0 , True )
102+ | BS. take 20 name == " EGYPTIAN HIEROGLYPH-" = (" " , egyptianHieroglyph, 0 , True )
103+ | BS. take 30 name == " KHITAN SMALL SCRIPT CHARACTER-" = (" " , khitan, 0 , True )
104+ | BS. take 16 name == " NUSHU CHARACTER-" = (" " , nushu, 0 , True )
99105 | BS. take 16 name == " HANGUL SYLLABLE " =
100106 let ! name' = BS. drop 16 name; ! len = BS. length name'
101107 in if len <= 12
@@ -123,6 +129,9 @@ genNamesModule moduleName = Fold step initial done
123129 , " , pattern CjkCompatibilityIdeograph"
124130 , " , pattern CjkUnifiedIdeograph"
125131 , " , pattern TangutIdeograph"
132+ , " , pattern EgyptianHieroglyph"
133+ , " , pattern KhitanSmallScript"
134+ , " , pattern NushuCharacter"
126135 , " , pattern HangulSyllable"
127136 , " ) where"
128137 , " "
@@ -159,6 +168,24 @@ genNamesModule moduleName = Fold step initial done
159168 , " pattern TangutIdeograph :: Int#"
160169 , " pattern TangutIdeograph = 0x" <> intHex tangut <> " #"
161170 , " "
171+ , " -- | Egyptian Hieroglyph. Used to test the length returned by 'name'."
172+ , " --"
173+ , " -- @since 0.5.0"
174+ , " pattern EgyptianHieroglyph :: Int#"
175+ , " pattern EgyptianHieroglyph = 0x" <> intHex egyptianHieroglyph <> " #"
176+ , " "
177+ , " -- | Khitan Small Script. Used to test the length returned by 'name'."
178+ , " --"
179+ , " -- @since 0.5.0"
180+ , " pattern KhitanSmallScript :: Int#"
181+ , " pattern KhitanSmallScript = 0x" <> intHex khitan <> " #"
182+ , " "
183+ , " -- | Nushu Character. Used to test the length returned by 'name'."
184+ , " --"
185+ , " -- @since 0.5.0"
186+ , " pattern NushuCharacter :: Int#"
187+ , " pattern NushuCharacter = 0x" <> intHex nushu <> " #"
188+ , " "
162189 , " -- | Hangul syllable. Used to test the length returned by 'name'."
163190 , " --"
164191 , " -- @since 0.3.0"
@@ -180,6 +207,15 @@ genNamesModule moduleName = Fold step initial done
180207 , " -- * If length = @'TangutIdeograph'@,"
181208 , " -- then the name is generated from the pattern “TANGUT IDEOGRAPH-*”,"
182209 , " -- where * is the hexadecimal codepoint."
210+ , " -- * If length = @'EgyptianHieroglyph'@,"
211+ , " -- then the name is generated from the pattern “EGYPTIAN HIEROGLYPH-*”,"
212+ , " -- where * is the hexadecimal codepoint."
213+ , " -- * If length = @'KhitanSmallScript'@,"
214+ , " -- then the name is generated from the pattern “KHITAN SMALL SCRIPT CHARACTER-*”,"
215+ , " -- where * is the hexadecimal codepoint."
216+ , " -- * If length = @'NushuCharacter'@,"
217+ , " -- then the name is generated from the pattern “NUSHU CHARACTER-*”,"
218+ , " -- where * is the hexadecimal codepoint."
183219 , " -- * If length ≥ @'HangulSyllable'@,"
184220 , " -- then the name is generated by prepending “HANGUL SYLLABLE ”"
185221 , " -- to the returned string."
0 commit comments