X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=blobdiff_plain;f=Network%2FHTTP%2FLucu%2FUtils.hs;h=51025248c5455f46f31ac938ffc3e376ede1b5d5;hp=a488aafbb64161feee9e67404c05f29a065236ec;hb=6126eb9;hpb=558205096e7f51da7018458d173584ac31808082 diff --git a/Network/HTTP/Lucu/Utils.hs b/Network/HTTP/Lucu/Utils.hs index a488aaf..5102524 100644 --- a/Network/HTTP/Lucu/Utils.hs +++ b/Network/HTTP/Lucu/Utils.hs @@ -1,6 +1,5 @@ {-# LANGUAGE - BangPatterns - , OverloadedStrings + OverloadedStrings , UnicodeSyntax #-} -- |Utility functions used internally in the Lucu httpd. These @@ -32,6 +31,7 @@ import Prelude.Unicode -- |> splitBy (== ':') "ab:c:def" -- > ==> ["ab", "c", "def"] splitBy ∷ (a → Bool) → [a] → [[a]] +{-# INLINEABLE splitBy #-} splitBy isSep src = case break isSep src of (last , [] ) → [last]