lambdabot-core 5.1.0.2 → 5.1.0.4
raw patch · 8 files changed
+22/−10 lines, 8 files
Files
- lambdabot-core.cabal +2/−2
- src/Lambdabot/Config/Core.hs +5/−1
- src/Lambdabot/IRC.hs +2/−2
- src/Lambdabot/Module.hs +1/−1
- src/Lambdabot/Monad.hs +1/−1
- src/Lambdabot/Plugin/Core/OfflineRC.hs +2/−2
- src/Lambdabot/Util.hs +8/−0
- src/Lambdabot/Util/Serial.hs +1/−1
lambdabot-core.cabal view
@@ -1,5 +1,5 @@ name: lambdabot-core-version: 5.1.0.2+version: 5.1.0.4 license: GPL license-file: LICENSE@@ -19,7 +19,7 @@ build-type: Simple cabal-version: >= 1.8-tested-with: GHC == 7.8.4, GHC == 7.10.3+tested-with: GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.1 extra-source-files: AUTHORS.md COMMENTARY.md
src/Lambdabot/Config/Core.hs view
@@ -58,4 +58,8 @@ defaultIrcHandler :: SomeException -> IO () defaultIrcHandler = errorM . ("Main: caught (and ignoring) "++) . show -config "uncaughtExceptionHandler" [t| SomeException -> IO () |] [| defaultIrcHandler |]+type DIH = SomeException -> IO ()+-- work around a TemplateHaskell bug in ghc-8.6.1+-- see https://ghc.haskell.org/trac/ghc/ticket/15815++config "uncaughtExceptionHandler" [t| DIH |] [| defaultIrcHandler |]
src/Lambdabot/IRC.hs view
@@ -1,6 +1,6 @@ -- -- | The IRC module processes the IRC protocol and provides a nice API for sending--- and recieving IRC messages with an IRC server.+-- and receiving IRC messages with an IRC server. -- module Lambdabot.IRC ( IrcMessage(..)@@ -76,7 +76,7 @@ setTopic chan topic = mkMessage (nTag chan) "TOPIC" [nName chan, ':' : topic] -- | 'privmsg' creates a private message to the person designated.-privmsg :: Nick -- ^ Who should recieve the message (nick)+privmsg :: Nick -- ^ Who should receive the message (nick) -> String -- ^ What is the message? -> IrcMessage -- ^ Constructed message privmsg who msg = if action then mk [nName who, ':':(chr 0x1):("ACTION " ++ clean_msg ++ ((chr 0x1):[]))]
src/Lambdabot/Module.hs view
@@ -52,7 +52,7 @@ -- unloaded. By default, modules are not sticky. moduleSticky :: !Bool, - -- | The commands the module listenes to.+ -- | The commands the module listens to. moduleCmds :: !(ModuleT st LB [Cmd.Command (ModuleT st LB)]), -- | Initialize the module. The default implementation does nothing.
src/Lambdabot/Monad.hs view
@@ -272,7 +272,7 @@ -- Lambdabot. It provides a mapping between the String server "tags" and -- functions which are able to handle sending messages. ----- When a message is recieved, the chat module is expected to call+-- When a message is received, the chat module is expected to call -- `Lambdabot.Main.received'. This is not ideal. registerServer :: String -> Server st -> ModuleT st LB ()
src/Lambdabot/Plugin/Core/OfflineRC.hs view
@@ -35,8 +35,8 @@ lb . modify $ \s -> s { ircPrivilegedUsers = S.insert (Nick "offlinerc" "null") (ircPrivilegedUsers s) }- - void . fork $ do+ -- note: moduleInit is invoked with exceptions masked+ void . forkUnmasked $ do waitForInit lockRC cmds <- getConfig onStartupCmds
src/Lambdabot/Util.hs view
@@ -1,6 +1,8 @@ -- Copyright (c) 2006 Don Stewart - http://www.cse.unsw.edu.au/~dons -- GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html) +{-# LANGUAGE FlexibleContexts #-}+ -- | String and other utilities module Lambdabot.Util ( strip,@@ -14,6 +16,7 @@ arePrefixesOf, io,+ forkUnmasked, random, randomFailureMsg,@@ -24,6 +27,8 @@ import Data.Char import Data.List import Data.Random+import Control.Concurrent.Lifted+import Control.Monad.Trans.Control import Lambdabot.Config import Lambdabot.Config.Core @@ -96,6 +101,9 @@ io :: MonadIO m => IO a -> m a io = liftIO {-# INLINE io #-}++forkUnmasked :: MonadBaseControl IO m => m () -> m ThreadId+forkUnmasked m = forkWithUnmask $ \unmask -> unmask m arePrefixesWithSpaceOf :: [String] -> String -> Bool arePrefixesWithSpaceOf = arePrefixesOf . map (++ " ")
src/Lambdabot/Util/Serial.hs view
@@ -72,7 +72,7 @@ -- | Serializes a 'Map' type if both the key and the value are instances -- of Read and Show. The serialization is done by converting the map to -- and from lists. Results are saved line-wise, for better editing and--- revison control.+-- revision control. -- mapSerial :: (Ord k, Show k, Show v, Read k, Read v) => Serial (Map k v) mapSerial = Serial {