File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
test/Unicode/Char/Identifiers
unicode-data/lib/Unicode/Char/General Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,27 @@ main = defaultMain
2222 [ benchNF " isAllowedInIdentifier" Security. isAllowedInIdentifier
2323 ]
2424 , bgroup " Identifier Types"
25- [ benchNF " identifierTypes" (fmap fromEnum . Security. identifierTypes)
25+ [ benchNF " identifierTypes" (fmap fromEnum . Security. identifierTypes)
2626 ]
2727 , bgroup " Confusables"
2828 [ bgroup' " confusablePrototype"
29- [ Bench " CString" ( \ c -> Ptr ( Confusables. confusablePrototype c))
29+ [ Bench " CString" confusablePrototype
3030 , Bench " String" Security. confusablePrototype
3131 ]
3232 -- , benchNF "prototype" Security.prototype
3333 , bgroup' " intentionalConfusables"
34- [ Bench " CString" ( \ c -> Ptr ( Confusables. intentionalConfusables c))
34+ [ Bench " CString" intentionalConfusables
3535 , Bench " String" Security. intentionalConfusables
3636 ]
3737 , benchNF " isIntentionallyConfusable" Security. intentionalConfusables
3838 ]
3939 ]
4040 ]
4141 where
42+ -- [NOTE] Cannot use point-free because of unlifted types
43+ confusablePrototype c = Ptr (Confusables. confusablePrototype c)
44+ intentionalConfusables c = Ptr (Confusables. intentionalConfusables c)
45+
4246 bgroup' groupTitle bs = bgroup groupTitle
4347 [ benchNF' groupTitle title f
4448 | Bench title f <- bs
Original file line number Diff line number Diff line change @@ -58,6 +58,6 @@ spec = do
5858 -- [TODO] more invariants
5959 traverse_ check (enumFromTo minBound maxBound )
6060 it " Identifier status is consistent with identifier types" do
61- let checkChar c = all (== isAllowedInIdentifier c)
62- (isIdentifierTypeAllowed <$> identifierTypes c)
61+ let checkChar c = all (( == isAllowedInIdentifier c) . isIdentifierTypeAllowed )
62+ (identifierTypes c)
6363 traverse_ (`shouldSatisfy` checkChar) (enumFromTo minBound maxBound )
Original file line number Diff line number Diff line change 1- {-# LANGUAGE PatternSynonyms #-}
2- {-# LANGUAGE ViewPatterns #-}
3- {-# LANGUAGE DeriveGeneric #-}
4-
51-- |
62-- Module : Unicode.Char.General.Blocks
73-- Copyright : (c) 2020 Composewell Technologies and Contributors
You can’t perform that action at this time.
0 commit comments