packages feed

HangmanAscii 0.1.0.2 → 0.1.1.1

raw patch · 2 files changed

+12/−7 lines, 2 filesdep ~basedep ~containersdep ~haskeline

Dependency ranges changed: base, containers, haskeline, mtl, optparse-applicative, random

Files

HangmanAscii.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                HangmanAscii-version:             0.1.0.2+version:             0.1.1.1 synopsis:            Yet another Hangman game. description:                      Another command line implementation of the classic @@ -28,11 +28,11 @@                      , Shape                      , Database   -- other-extensions:-  build-depends:       base ==4.12.*-                     , optparse-applicative >=0.17 && <0.18-                     , random >=1.1 && <1.2-                     , haskeline >=0.7.4.3 && <0.8-                     , mtl >=2.2.2 && <2.3-                     , containers >=0.6.0.1 && <0.7+  build-depends:       base >=4.14.3 && <5+                     , optparse-applicative >=0.16.1 && <0.17+                     , random >=1.2.1.1 && <2+                     , haskeline >=0.8.2 && <0.9+                     , mtl >=2.2.2 && <3+                     , containers >=0.6.4.1 && <0.7   -- hs-source-dirs:   default-language:    Haskell2010
Main.hs view
@@ -9,12 +9,14 @@ import HangmanAscii.Database import Paths_HangmanAscii + data Args = Args   { dbfile :: String   , skill :: String    , category :: String   } + sample :: Parser Args sample = Args   <$> strOption @@ -43,14 +45,17 @@   where     opts = info (sample <**> helper) (progDesc "Hangman game") + loadWords :: String -> String -> IO [String] loadWords "" category = return $ getWords category loadWords fn _ = fmap lines $ readFile fn + getSkill :: String -> Skill getSkill "easy" = Easy getSkill "medium" = Medium getSkill "hard" = Hard+  main :: IO () main = parseArgs >>= go