Skip to content

Commit 6284e32

Browse files
committed
agda-stdlib-utils/AllNonAsciiChars: use List1.head instead of List.head
1 parent 104125c commit 6284e32

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

AllNonAsciiChars.hs

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
module Main where
66

7-
import qualified Data.List as L (sortBy, group, sort)
7+
import qualified Data.List as List (sortBy, sort)
8+
import qualified Data.List.NonEmpty as List1 (group, head)
89
import Data.Char (isAscii, ord)
910
import Data.Function (on)
1011
import Numeric (showHex)
@@ -27,9 +28,9 @@ main = do
2728
nonAsciiChars <-
2829
filter (not . isAscii) . T.unpack . T.concat <$> mapM readUTF8File agdaFiles
2930
let table :: [(Char, Int)]
30-
table = L.sortBy (flip compare `on` snd) $
31-
map (\cs -> (head cs, length cs)) $
32-
L.group $ L.sort $ nonAsciiChars
31+
table = List.sortBy (flip compare `on` snd) $
32+
map (\cs -> (List1.head cs, length cs)) $
33+
List1.group $ List.sort $ nonAsciiChars
3334

3435
let codePoint :: Char -> T.Text
3536
codePoint c = T.pack $ showHex (ord c) ""

0 commit comments

Comments
 (0)