M Main.hs => Main.hs +3 -3
@@ 8,7 8,7 @@ import Control.Concurrent.STM
import Data.Foldable (forM_, mapM_, toList)
import Data.Traversable (forM, mapM)
import System.Environment (getArgs)
-import Control.Error (readZ, syncIO, runEitherT, readMay, MaybeT(..), hoistMaybe)
+import Control.Error (readZ, syncIO, runExceptT, MaybeT(..), hoistMaybe)
import Data.Time (UTCTime, addUTCTime, diffUTCTime, getCurrentTime)
import Network (PortID(PortNumber))
import System.Random (Random(randomR), getStdRandom)
@@ 1241,7 1241,7 @@ parseCommand txt room nick componentJid
(parseJID =<< fmap (\r -> bareTxt r <> fromString "/" <> to) room)
) <*> pure msg
| Just stime <- stripCIPrefix (fromString "/debounce ") txt,
- Just time <- readMay (textToString stime) = Just $ Debounce time
+ Just time <- readMay stime = Just $ Debounce time
| citxt == fromString "/join" = Just JoinInvited
| citxt == fromString "join" = Just JoinInvitedWrong
| citxt == fromString "/leave" = Just Leave
@@ 1739,7 1739,7 @@ main = do
forever $ do
log "" "runComponent STARTING"
- (log "runComponent ENDED" <=< (runEitherT . syncIO)) $
+ (log "runComponent ENDED" <=< (runExceptT . syncIO)) $
runComponent (Server componentJid host (PortNumber $ fromIntegral (read port :: Int))) (fromString secret)
(component db (fromString backendHost) toRoomPresences toRejoinManager toJoinPartDebouncer sendToComponent processDirectMessageRouteConfig componentJid [registrationJid] (map fromString conferences))
_ -> log "ERROR" "Bad arguments"
M Makefile => Makefile +2 -2
@@ 1,5 1,5 @@
-GHCFLAGS=-Wall -fno-warn-name-shadowing -XHaskell2010 -O2
-HLINTFLAGS=-XHaskell98 -XCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8
+GHCFLAGS=-Wall -Wno-tabs -fno-warn-name-shadowing -XHaskell2010 -O2
+HLINTFLAGS=-XHaskell2010 -XCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8
VERSION=0.6
.PHONY: all shell clean doc install
M Util.hs => Util.hs +1 -1
@@ 17,7 17,7 @@ import qualified Data.Attoparsec.Text as Atto
log :: (Show a, MonadIO m) => String -> a -> m ()
log tag x = liftIO $ do
time <- getCurrentTime
- putStr (show time ++ s" " ++ fromString tag ++ s" :: ") >> print x >> putStrLn mempty
+ putStr (tshow time ++ s" " ++ fromString tag ++ s" :: ") >> print x >> putStrLn mempty
s :: (IsString a) => String -> a
s = fromString
M cheogram.cabal => cheogram.cabal +2 -2
@@ 25,7 25,7 @@ executable cheogram
build-depends:
base == 4.*,
- basic-prelude <= 0.3.5.0,
+ basic-prelude,
attoparsec,
base58-bytestring,
base64-bytestring,
@@ 33,7 33,7 @@ executable cheogram
case-insensitive,
containers,
cryptonite,
- errors < 2.0.0,
+ errors,
monad-loops,
monads-tf,
network,