Skip to content

Commit 4ec30f0

Browse files
authored
Merge pull request #3 from pepeiborra/patch-1
Add INLINABLE pragmas
2 parents eecbdd0 + e983ea2 commit 4ec30f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Text/Fuzzy.hs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ data (T.TextualMonoid s) => Fuzzy t s =
3535
-- >>> match "hsk" ("Haskell",1995) "<" ">" fst False
3636
-- Just ("<h>a<s><k>ell",5)
3737
--
38+
{-# INLINABLE match #-}
3839
match :: (T.TextualMonoid s)
3940
=> s -- ^ Pattern.
4041
-> t -- ^ The value containing the text to search in.
@@ -70,6 +71,7 @@ match pattern t pre post extract caseSensitive =
7071
--
7172
-- >>> filter "ML" [("Standard ML", 1990),("OCaml",1996),("Scala",2003)] "<" ">" fst False
7273
-- [Fuzzy {original = ("Standard ML",1990), rendered = "standard <m><l>", score = 4},Fuzzy {original = ("OCaml",1996), rendered = "oca<m><l>", score = 4}]
74+
{-# INLINABLE filter #-}
7375
filter :: (T.TextualMonoid s)
7476
=> s -- ^ Pattern.
7577
-> [t] -- ^ The list of values containing the text to search in.
@@ -88,6 +90,7 @@ filter pattern ts pre post extract caseSen =
8890
--
8991
-- >>> simpleFilter "vm" ["vim", "emacs", "virtual machine"]
9092
-- ["vim","virtual machine"]
93+
{-# INLINABLE simpleFilter #-}
9194
simpleFilter :: (T.TextualMonoid s)
9295
=> s -- ^ Pattern to look for.
9396
-> [s] -- ^ List of texts to check.

0 commit comments

Comments
 (0)