snaplet-tasks 0.1.1 → 0.1.2
raw patch · 2 files changed
+9/−5 lines, 2 files
Files
snaplet-tasks.cabal view
@@ -7,7 +7,7 @@ -- The package version. See the Haskell package versioning policy -- (http://www.haskell.org/haskellwiki/Package_versioning_policy) for -- standards guiding when and how versions should be incremented.-Version: 0.1.1+Version: 0.1.2 -- A short (one-line) description of the package. Synopsis: Snaplet for Snap Framework enabling developers to administrative tasks akin to Rake tasks from Ruby On Rails framework.@@ -20,6 +20,7 @@ -- The file containing the license text. License-file: LICENSE+ -- The package author(s). Author: Kamil Ciemniewski
src/Snap/Snaplet/Tasks/Internal.hs view
@@ -20,10 +20,13 @@ -- tries to compile them into task. taskFromCommandLine :: IO (Maybe Task) taskFromCommandLine = do- taskArgs <- return . tail . dropWhile ((/=) "T") =<< getArgs- case null taskArgs of- True -> return Nothing- False -> return $ Just $ taskForArgs taskArgs+ _args <- return . dropWhile ((/=) "T") =<< getArgs+ case _args of+ [] -> return Nothing+ xs -> + case null $ tail xs of+ True -> return Nothing+ False -> return $ Just $ taskForArgs xs where taskForArgs :: [String] -> Task taskForArgs args = Task