packages feed

Nomyx 0.3.1 → 0.3.2

raw patch · 5 files changed

+16/−4 lines, 5 filesdep ~Nomyx-Language

Dependency ranges changed: Nomyx-Language

Files

Nomyx.cabal view
@@ -1,5 +1,5 @@ name: Nomyx-version: 0.3.1+version: 0.3.2 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -20,7 +20,7 @@ extra-source-files: AUTHORS README TODO   executable Nomyx-    build-depends: Nomyx-Language ==0.3.1,+    build-depends: Nomyx-Language ==0.3.2,                    base <5,                    Cabal -any,                    DebugTraceHelpers -any,
TODO view
@@ -2,6 +2,8 @@ TODO list
 
 Bugs:
+- command line arguments are ignored if there is a save file
+- recurring event are making increasing memory size
 
 Improvements:
 - make code instructions in the active rules table clickable to access haddock documentation
src/Multi.hs view
@@ -92,7 +92,7 @@  adminSubmitRule :: SubmitRule -> PlayerNumber -> GameName -> ServerHandle -> StateT Session IO () adminSubmitRule sr@(SubmitRule _ _ code) pn gn sh = do-   tracePN pn $ "proposed " ++ (show sr)+   tracePN pn $ "admin proposed " ++ (show sr)    mrr <- liftIO $ interpretRule code sh    case mrr of       Right _ -> do
src/Web/Common.hs view
@@ -239,6 +239,15 @@       Just playAs -> return playAs       Nothing     -> return pn +getIsAdmin :: (TVar Session) -> RoutedNomyxServer Bool+getIsAdmin ts = do+   pn <- getPlayerNumber ts+   mpf <- getProfile' ts pn+   case mpf of+      Just pf -> return $ _isAdmin $ _pAdmin $ pf+      Nothing -> error "not logged in."++ fieldRequired :: NomyxError -> String -> Either NomyxError String fieldRequired a []  = Left a fieldRequired _ str = Right str
src/Web/Game.hs view
@@ -261,7 +261,8 @@ newRule ts gn = toResponse <$> do    methodM POST    s@(T.Session sh _ _) <- liftIO $ readTVarIO ts-   r <- liftRouteT $ eitherForm environment "user" (newRuleForm Nothing False)+   admin <- getIsAdmin ts+   r <- liftRouteT $ eitherForm environment "user" (newRuleForm Nothing admin)    link <- showURL MainPage    pn <- getPlayerNumber ts    case r of