on master help sign in
Revert to 6ca2debc36ba
ccd53c0Bryan O'Sullivan
Data/Text/Internal/Fusion/CaseMapping.hs+4
@@ -11,6 +11,7 @@ import Data.Char
11import Data.Text.Internal.Fusion.Types
11import Data.Text.Internal.Fusion.Types
12
12
13upperMapping :: forall s. Char -> s -> Step (CC s) Char
13upperMapping :: forall s. Char -> s -> Step (CC s) Char
14+{-# INLINE upperMapping #-}
14-- LATIN SMALL LETTER SHARP S
15-- LATIN SMALL LETTER SHARP S
15upperMapping '\x00df' s = Yield '\x0053' (CC s '\x0053' '\x0000')
16upperMapping '\x00df' s = Yield '\x0053' (CC s '\x0053' '\x0000')
16-- LATIN SMALL LIGATURE FF
17-- LATIN SMALL LIGATURE FF
@@ -217,10 +218,12 @@ upperMapping '\x1fc7' s = Yield '\x0397' (CC s '\x0342' '\x0399')
217upperMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0399')
218upperMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0399')
218upperMapping c s = Yield (toUpper c) (CC s '\0' '\0')
219upperMapping c s = Yield (toUpper c) (CC s '\0' '\0')
219lowerMapping :: forall s. Char -> s -> Step (CC s) Char
220lowerMapping :: forall s. Char -> s -> Step (CC s) Char
221+{-# INLINE lowerMapping #-}
220-- LATIN CAPITAL LETTER I WITH DOT ABOVE
222-- LATIN CAPITAL LETTER I WITH DOT ABOVE
221lowerMapping '\x0130' s = Yield '\x0069' (CC s '\x0307' '\x0000')
223lowerMapping '\x0130' s = Yield '\x0069' (CC s '\x0307' '\x0000')
222lowerMapping c s = Yield (toLower c) (CC s '\0' '\0')
224lowerMapping c s = Yield (toLower c) (CC s '\0' '\0')
223titleMapping :: forall s. Char -> s -> Step (CC s) Char
225titleMapping :: forall s. Char -> s -> Step (CC s) Char
226+{-# INLINE titleMapping #-}
224-- LATIN SMALL LETTER SHARP S
227-- LATIN SMALL LETTER SHARP S
225titleMapping '\x00df' s = Yield '\x0053' (CC s '\x0073' '\x0000')
228titleMapping '\x00df' s = Yield '\x0053' (CC s '\x0073' '\x0000')
226-- LATIN SMALL LIGATURE FF
229-- LATIN SMALL LIGATURE FF
@@ -319,6 +322,7 @@ titleMapping '\x1fc7' s = Yield '\x0397' (CC s '\x0342' '\x0345')
319titleMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0345')
322titleMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0345')
320titleMapping c s = Yield (toTitle c) (CC s '\0' '\0')
323titleMapping c s = Yield (toTitle c) (CC s '\0' '\0')
321foldMapping :: forall s. Char -> s -> Step (CC s) Char
324foldMapping :: forall s. Char -> s -> Step (CC s) Char
325+{-# INLINE foldMapping #-}
322-- MICRO SIGN
326-- MICRO SIGN
323foldMapping '\x00b5' s = Yield '\x03bc' (CC s '\x0000' '\x0000')
327foldMapping '\x00b5' s = Yield '\x03bc' (CC s '\x0000' '\x0000')
324-- LATIN SMALL LETTER SHARP S
328-- LATIN SMALL LETTER SHARP S
scripts/CaseFolding.hs+2−1
@@ -36,7 +36,8 @@ parseCF name = parse entries name <$> readFile name
36mapCF :: CaseFolding -> [String]
36mapCF :: CaseFolding -> [String]
37mapCF (CF _ ms) = typ ++ (map nice . filter p $ ms) ++ [last]
37mapCF (CF _ ms) = typ ++ (map nice . filter p $ ms) ++ [last]
38 where
38 where
39− typ = ["foldMapping :: forall s. Char -> s -> Step (CC s) Char"]
39+ typ = ["foldMapping :: forall s. Char -> s -> Step (CC s) Char"
40+ ,"{-# INLINE foldMapping #-}"]
40 last = "foldMapping c s = Yield (toLower c) (CC s '\\0' '\\0')"
41 last = "foldMapping c s = Yield (toLower c) (CC s '\\0' '\\0')"
41 nice c = "-- " ++ name c ++ "\n" ++
42 nice c = "-- " ++ name c ++ "\n" ++
42 "foldMapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
43 "foldMapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
scripts/SpecialCasing.hs+2−1
@@ -42,7 +42,8 @@ mapSC :: String -> (Case -> String) -> (Char -> Char) -> SpecialCasing
42mapSC which access twiddle (SC _ ms) =
42mapSC which access twiddle (SC _ ms) =
43 typ ++ (map nice . filter p $ ms) ++ [last]
43 typ ++ (map nice . filter p $ ms) ++ [last]
44 where
44 where
45− typ = [which ++ "Mapping :: forall s. Char -> s -> Step (CC s) Char"]
45+ typ = [which ++ "Mapping :: forall s. Char -> s -> Step (CC s) Char"
46+ ,"{-# INLINE " ++ which ++ "Mapping #-}"]
46 last = which ++ "Mapping c s = Yield (to" ++ ucFirst which ++ " c) (CC s '\\0' '\\0')"
47 last = which ++ "Mapping c s = Yield (to" ++ ucFirst which ++ " c) (CC s '\\0' '\\0')"
47 nice c = "-- " ++ name c ++ "\n" ++
48 nice c = "-- " ++ name c ++ "\n" ++
48 which ++ "Mapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
49 which ++ "Mapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"