@@ -20,7 +20,7 @@ import Data.Maybe
20
20
-- OtherLetter :: GeneralCategory
21
21
-- ```
22
22
--
23
- -- 'Eq' instance:
23
+ -- `Eq` instance:
24
24
--
25
25
-- ```
26
26
-- >>> UppercaseLetter == UppercaseLetter
@@ -29,28 +29,28 @@ import Data.Maybe
29
29
-- False
30
30
-- ```
31
31
--
32
- -- ' Ord' instance:
32
+ -- ` Ord` instance:
33
33
--
34
34
-- ```
35
35
-- >>> NonSpacingMark <= MathSymbol
36
36
-- True
37
37
-- ```
38
38
--
39
- -- ' Enum' instance:
39
+ -- ` Enum` instance (TODO: this is not implemented yet) :
40
40
--
41
41
-- ```
42
42
-- >>> enumFromTo ModifierLetter SpacingCombiningMark
43
43
-- [ModifierLetter,OtherLetter,NonSpacingMark,SpacingCombiningMark]
44
44
-- ```
45
45
--
46
- -- ' Show' instance:
46
+ -- ` Show` instance:
47
47
--
48
48
-- ```
49
49
-- >>> show EnclosingMark
50
50
-- "EnclosingMark"
51
51
-- ```
52
52
--
53
- -- ' Bounded' instance:
53
+ -- ` Bounded` instance:
54
54
--
55
55
-- ```
56
56
-- >>> bottom :: GeneralCategory
@@ -258,30 +258,27 @@ instance boundedGeneralCategory :: Bounded GeneralCategory where
258
258
bottom = UppercaseLetter
259
259
top = NotAssigned
260
260
261
- -- | The Unicode general category of the character. This relies on the
262
- -- 'Enum' instance of 'GeneralCategory', which must remain in the
263
- -- same order as the categories are presented in the Unicode
264
- -- standard.
261
+ -- | The Unicode general category of the character.
265
262
--
266
263
-- #### __Examples__
267
264
--
268
265
-- Basic usage:
269
266
--
270
267
-- ```
271
268
-- >>> generalCategory 'a'
272
- -- LowercaseLetter
269
+ -- Just LowercaseLetter
273
270
-- >>> generalCategory 'A'
274
- -- UppercaseLetter
271
+ -- Just UppercaseLetter
275
272
-- >>> generalCategory '0'
276
- -- DecimalNumber
273
+ -- Just DecimalNumber
277
274
-- >>> generalCategory '%'
278
- -- OtherPunctuation
275
+ -- Just OtherPunctuation
279
276
-- >>> generalCategory '♥'
280
- -- OtherSymbol
277
+ -- Just OtherSymbol
281
278
-- >>> generalCategory '\31'
282
- -- Control
279
+ -- Just Control
283
280
-- >>> generalCategory ' '
284
- -- Space
281
+ -- Just Space
285
282
-- ```
286
283
generalCategory :: Char -> Maybe GeneralCategory
287
284
generalCategory = map unicodeCatToGeneralCat <<< uGencat <<< toCharCode
@@ -368,8 +365,8 @@ isOctDigit c = let diff = (toCharCode c - toCharCode '0')
368
365
-- i.e. `0..9, A..F, a..f`.
369
366
isHexDigit :: Char -> Boolean
370
367
isHexDigit c = isDigit c
371
- || let diff = (toCharCode c - toCharCode ' A' ) in diff <= 5 && diff >= 0
372
- || let diff = (toCharCode c - toCharCode ' a' ) in diff <= 5 && diff >= 0
368
+ || ( let diff = (toCharCode c - toCharCode ' A' ) in diff <= 5 && diff >= 0 )
369
+ || ( let diff = (toCharCode c - toCharCode ' a' ) in diff <= 5 && diff >= 0 )
373
370
374
371
-- | Selects Unicode punctuation characters, including various kinds
375
372
-- of connectors, brackets and quotes.
0 commit comments