diff -r 66cab76eb56f -r dbaf90a0fbe0 tools/confuse.hs --- a/tools/confuse.hs Sun Jan 26 00:08:49 2014 +0400 +++ b/tools/confuse.hs Sun Jan 26 00:09:50 2014 +0400 @@ -34,4 +34,8 @@ main = do ll <- liftM (filter (isHexDigit . head) . filter (not . null) . lines) $ readFile "confusables.txt" - B.writeFile "rules.txt" . B.intercalate "\n" . map convRules . Map.toList . Map.fromList . filter (\(_, b) -> length b < 6). map toPair $ ll + B.writeFile "rules.txt" . B.intercalate "\n" . map convRules . Map.toList . Map.fromList . filter notTooLong . filter fits16bit . map toPair $ ll + where + notTooLong = (>) 6 . length . snd + fits16bit (a, b) = let f = (>) 5 . B.length in all f $ a:b +