Skip to content

Commit

Permalink
adding some useful stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
L0neGamer committed Jan 31, 2022
1 parent af8ac87 commit dd8fcc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ library:
- ScopedTypeVariables
- TypeOperators
- RankNTypes
- BangPatterns
ghc-options:
- -Wall

Expand Down
2 changes: 1 addition & 1 deletion src/Tablebot/Plugins/Roll/Plugin.hs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ statsCommand = Command "stats" statsCommandParser []
return $ statsCommand' (firstE : restEs)
statsCommand' :: [Expr] -> Message -> DatabaseDiscord ()
statsCommand' es m = do
mrange' <- liftIO $ timeout (oneSecond * 5) $ mapM (\e -> (,prettyShow e) <$> rangeExpr e) es
mrange' <- liftIO $ timeout (oneSecond * 5) $ mapM (\e -> rangeExpr e >>= \re -> re `seq` return (re, prettyShow e)) es
case mrange' of
Nothing -> throwBot (EvaluationException "Timed out calculating statistics" [])
(Just range') -> do
Expand Down

0 comments on commit dd8fcc8

Please sign in to comment.