packages feed

crypto-enigma 0.1.1.4 → 0.1.1.5

raw patch · 4 files changed

+24/−8 lines, 4 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -8,9 +8,17 @@ * [closed milestones]; and * [issues]. +### (0.1.1.6)++Current [development version]++### [0.1.1.5]++Latest [release version], including version CLI option and improved CLI error reporting.+ ### [0.1.1.4] -Latest [release version], including fixes to documentation and CLI display bugs.+Fixes to documentation and CLI display bugs.  ### [0.1.1.3] @@ -156,6 +164,7 @@ [development version]: https://github.com/orome/crypto-enigma-hs/tree/develop [new CLI]: https://github.com/orome/crypto-enigma-hs/tree/new/cli +[0.1.1.5]: https://github.com/orome/crypto-enigma-hs/releases/tag/0.1.1.5 [0.1.1.4]: https://github.com/orome/crypto-enigma-hs/releases/tag/0.1.1.4 [0.1.1.3]: https://github.com/orome/crypto-enigma-hs/releases/tag/0.1.1.3 [0.1.1.2]: https://github.com/orome/crypto-enigma-hs/releases/tag/0.1.1.2
Crypto/Enigma.hs view
@@ -335,7 +335,7 @@ configEnigma' :: String -> String -> String -> String -> Either EnigmaError EnigmaConfig configEnigma' rots winds plug rngs = do         unless (and $ (==(length components')) <$> [length winds', length rngs'])-                (Left $ BadNumbers)+                (Left $ BadNumbers (length components') (length winds') (length rngs'))         unless (rngs == (filter (`elem` "0123456789.") rngs))                 (Left $ BadRings rngs)         unless (and $ [(>=1),(<=26)] <*> rngs')@@ -369,7 +369,7 @@         components' = reverse $ splitOn "-" $ rots ++ "-" ++ plug  -- Errors for use in configEnigma'-data EnigmaError = BadNumbers+data EnigmaError = BadNumbers Int Int Int                  | BadRings String                  | BadWindows String                  | BadPlugs String@@ -379,7 +379,9 @@                  | MiscError String  instance Show EnigmaError where-        show BadNumbers = "Numbers of windows, ring settings, and components don't match"+        show (BadNumbers nc nw nr) = "Bad configuration: numbers of rotors (" ++ (show nc) +++                                     "), windows letters (" ++ (show nw) +++                                     "), and rings (" ++ (show nr) ++ ") must match"         show (BadRings s) = "Bad ring settings: " ++ s         show (BadWindows s) = "Bad windows: " ++ s         show (BadPlugs s) = "Bad plugboard: " ++ s
cli/enigma.hs view
@@ -4,6 +4,7 @@ import Options.Applicative                              -- http://hackage.haskell.org/package/optparse-applicative import Options.Applicative.Help.Pretty  (string)        -- Necessary to format help text -- https://github.com/pcapriotti/optparse-applicative/issues/90#issuecomment-49868254 import System.Console.ANSI+import Data.Version (showVersion)  import Data.Monoid                      ((<>))          -- REV: For GHC 8.0 through 8.2 import Control.Concurrent               (threadDelay)@@ -11,6 +12,7 @@  import Crypto.Enigma import Crypto.Enigma.Display+import Paths_crypto_enigma (version)   @@ -98,8 +100,10 @@                 header (cliName_ ++ ": "++ cmd ++" command") <>                 footerDoc (Just $ string $ unlines ["Argument notes:\n", argsFoot, "Examples:\n", examplesFoot])) +versionOpt = infoOption (showVersion version) (long "version" <> short 'v' <> help "Show package version")  + -- Command line script =======================================================  @@ -127,7 +131,7 @@         cmd -> putStrLn $ "Unmatched command: " ++ (show cmd)   where     optsParser :: ParserInfo Options-    optsParser = info (helper <*> commandO)+    optsParser = info (helper <*> versionOpt <*> commandO)                       (fullDesc <> progDesc topDesc <> header cliName_ <> footerDoc (Just $ string topFoot))      -- Like 'configEnigma' but without stack trace and with check for 4 words in a single string
crypto-enigma.cabal view
@@ -3,7 +3,7 @@ -- PVP summary:         +-+------- breaking API changes --                      | | +----- non-breaking API additions --                      | | | +--- code changes with no API change-version:                0.1.1.4+version:                0.1.1.5 synopsis:               An Enigma machine simulator with display.  description:            The crypto-enigma package is an Enigma machine simulator                         with rich display and machine state details.@@ -45,7 +45,7 @@         type:           git         location:       git://github.com/orome/crypto-enigma-hs.git         branch:         hackage-        tag:            0.1.1.4+        tag:            0.1.1.5  library     -- default-extensions: Safe@@ -65,7 +65,8 @@     hs-source-dirs:     ., cli     other-modules:      Crypto.Enigma,                         Crypto.Enigma.Display,-                        Crypto.Enigma.Utils+                        Crypto.Enigma.Utils,+                        Paths_crypto_enigma     build-depends:      base >=4.8.1.0 && <=4.12.0.0,                         containers >=0.5.5.1,                         split >=0.2.2,