Add ranges to /codepoints

This commit is contained in:
2023-03-01 03:41:39 +01:00
parent 944edaf445
commit c7e378122d
2 changed files with 20 additions and 7 deletions
+2 -2
View File
@@ -127,8 +127,8 @@ newtype CodepointsModel = CodepointsModel
{ codepoints :: [(Word, Either String Char)]
}
mkCodepointsModel :: [Word] -> CodepointsModel
mkCodepointsModel = CodepointsModel . map go
mkCodepointsModel :: [(Word, Word)] -> CodepointsModel
mkCodepointsModel = CodepointsModel . map go . concatMap (uncurry enumFromTo)
where
go codepoint = (codepoint, toChar codepoint)