on master help sign in
Drop INLINE annotations for case mapping functions
7e1d59aBryan O'Sullivan
Data/Text/Internal/Fusion/CaseMapping.hs−4
@@ -11,7 +11,6 @@ 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 #-}
15-- LATIN SMALL LETTER SHARP S
14-- LATIN SMALL LETTER SHARP S
16upperMapping '\x00df' s = Yield '\x0053' (CC s '\x0053' '\x0000')
15upperMapping '\x00df' s = Yield '\x0053' (CC s '\x0053' '\x0000')
17-- LATIN SMALL LIGATURE FF
16-- LATIN SMALL LIGATURE FF
@@ -218,12 +217,10 @@ upperMapping '\x1fc7' s = Yield '\x0397' (CC s '\x0342' '\x0399')
218upperMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0399')
217upperMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0399')
219upperMapping c s = Yield (toUpper c) (CC s '\0' '\0')
218upperMapping c s = Yield (toUpper c) (CC s '\0' '\0')
220lowerMapping :: forall s. Char -> s -> Step (CC s) Char
219lowerMapping :: forall s. Char -> s -> Step (CC s) Char
221−{-# INLINE lowerMapping #-}
222-- LATIN CAPITAL LETTER I WITH DOT ABOVE
220-- LATIN CAPITAL LETTER I WITH DOT ABOVE
223lowerMapping '\x0130' s = Yield '\x0069' (CC s '\x0307' '\x0000')
221lowerMapping '\x0130' s = Yield '\x0069' (CC s '\x0307' '\x0000')
224lowerMapping c s = Yield (toLower c) (CC s '\0' '\0')
222lowerMapping c s = Yield (toLower c) (CC s '\0' '\0')
225titleMapping :: forall s. Char -> s -> Step (CC s) Char
223titleMapping :: forall s. Char -> s -> Step (CC s) Char
226−{-# INLINE titleMapping #-}
227-- LATIN SMALL LETTER SHARP S
224-- LATIN SMALL LETTER SHARP S
228titleMapping '\x00df' s = Yield '\x0053' (CC s '\x0073' '\x0000')
225titleMapping '\x00df' s = Yield '\x0053' (CC s '\x0073' '\x0000')
229-- LATIN SMALL LIGATURE FF
226-- LATIN SMALL LIGATURE FF
@@ -322,7 +319,6 @@ titleMapping '\x1fc7' s = Yield '\x0397' (CC s '\x0342' '\x0345')
322titleMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0345')
319titleMapping '\x1ff7' s = Yield '\x03a9' (CC s '\x0342' '\x0345')
323titleMapping c s = Yield (toTitle c) (CC s '\0' '\0')
320titleMapping c s = Yield (toTitle c) (CC s '\0' '\0')
324foldMapping :: forall s. Char -> s -> Step (CC s) Char
321foldMapping :: forall s. Char -> s -> Step (CC s) Char
325−{-# INLINE foldMapping #-}
326-- MICRO SIGN
322-- MICRO SIGN
327foldMapping '\x00b5' s = Yield '\x03bc' (CC s '\x0000' '\x0000')
323foldMapping '\x00b5' s = Yield '\x03bc' (CC s '\x0000' '\x0000')
328-- LATIN SMALL LETTER SHARP S
324-- LATIN SMALL LETTER SHARP S
scripts/CaseFolding.hs+1−2
@@ -36,8 +36,7 @@ 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 #-}"]
41 last = "foldMapping c s = Yield (toLower c) (CC s '\\0' '\\0')"
40 last = "foldMapping c s = Yield (toLower c) (CC s '\\0' '\\0')"
42 nice c = "-- " ++ name c ++ "\n" ++
41 nice c = "-- " ++ name c ++ "\n" ++
43 "foldMapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
42 "foldMapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
scripts/SpecialCasing.hs+1−2
@@ -42,8 +42,7 @@ 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 #-}"]
47 last = which ++ "Mapping c s = Yield (to" ++ ucFirst which ++ " c) (CC s '\\0' '\\0')"
46 last = which ++ "Mapping c s = Yield (to" ++ ucFirst which ++ " c) (CC s '\\0' '\\0')"
48 nice c = "-- " ++ name c ++ "\n" ++
47 nice c = "-- " ++ name c ++ "\n" ++
49 which ++ "Mapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"
48 which ++ "Mapping " ++ showC (code c) ++ " s = Yield " ++ x ++ " (CC s " ++ y ++ " " ++ z ++ ")"