mirror of
https://github.com/github/semantic.git
synced 2025-01-07 07:58:12 +03:00
Produce non-ASCII characters and longer byte strings earlier.
This commit is contained in:
parent
6c54412778
commit
6e35a32566
@ -126,15 +126,9 @@ instance Listable Source where
|
|||||||
newtype ListableByteString = ListableByteString { unListableByteString :: B.ByteString }
|
newtype ListableByteString = ListableByteString { unListableByteString :: B.ByteString }
|
||||||
|
|
||||||
instance Listable ListableByteString where
|
instance Listable ListableByteString where
|
||||||
tiers = (ListableByteString . encodeUtf8 . T.pack) `mapT` setsOf (toTiers characters)
|
tiers = (ListableByteString . encodeUtf8 . T.pack) `mapT` strings
|
||||||
where characters
|
where strings = foldr ((\\//) . listsOf . toTiers) []
|
||||||
= ['a'..'z']
|
[ ['a'..'z'] <> ['A'..'Z'] <> ['0'..'9']
|
||||||
+| ['A'..'Z']
|
, [' '..'/'] <> [':'..'@'] <> ['['..'`'] <> ['{'..'~']
|
||||||
+| ['0'..'9']
|
, [chr 0x00..chr 0x1f] <> [chr 127] -- Control characters.
|
||||||
+| [' '..'/']
|
, [chr 0xa0..chr 0x24f] ] -- Non-ASCII.
|
||||||
+| [':'..'@']
|
|
||||||
+| ['['..'`']
|
|
||||||
+| ['{'..'~']
|
|
||||||
+| [chr 0x00..chr 0x1f] -- Control characters.
|
|
||||||
+| [chr 127]
|
|
||||||
+| [chr 0xa0..chr 0x24f] -- Non-ASCII.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user