kevin 0.1.5 → 0.1.5.1
raw patch · 2 files changed
+4/−2 lines, 2 files
Files
- Kevin/Util/Tablump.hs +2/−0
- kevin.cabal +2/−2
Kevin/Util/Tablump.hs view
@@ -16,11 +16,13 @@ fromRight (Left x) = error $ "fromRight on Left " ++ show x fromRight (Right a) = a +{-# NOINLINE regexReplace #-} regexReplace :: Regex -> ([String] -> String) -> String -> String regexReplace find replace = fix (\f str -> case fromRight . unsafePerformIO $ regexec find str of Just (bef, _, af, matches) -> concat [bef, replace matches, f af] Nothing -> str) +{-# NOINLINE regexen #-} regexen :: [(Regex, [String] -> String)] regexen = let ($$) = (,) in map (first (fromRight . unsafePerformIO . compile defaultCompOpt defaultExecOpt)) . reverse $ [ "&b\t" $$ const "\2",
kevin.cabal view
@@ -1,5 +1,5 @@ Name: kevin-Version: 0.1.5+Version: 0.1.5.1 Synopsis: a dAmn ↔ IRC proxy Description: a dAmn ↔ IRC proxy License: GPL@@ -20,4 +20,4 @@ Other-Modules: Kevin, Kevin.Protocol, Kevin.Base, Kevin.Util.Logger, Kevin.IRC.Protocol, Kevin.Damn.Protocol, Kevin.Util.Entity, Kevin.Util.Tablump, Kevin.Damn.Packet, Kevin.Damn.Protocol.Send, Kevin.IRC.Protocol.Send, Kevin.IRC.Packet, Kevin.Settings, Kevin.Types, Kevin.Util.Token extensions: CPP, DeriveDataTypeable, ExistentialQuantification, OverloadedStrings, ScopedTypeVariables, TemplateHaskell ghc-options: -Wall -fno-warn-unused-do-bind -threaded- cpp-options: -DVERSION="0.1.5"+ cpp-options: -DVERSION="0.1.5.1"