classify-frog 0.2.4.2 → 0.2.4.3
raw patch · 2 files changed
+11/−18 lines, 2 filesdep +shell-utilitydep −Cabaldep ~llvm-extradep ~synthesizer-llvm
Dependencies added: shell-utility
Dependencies removed: Cabal
Dependency ranges changed: llvm-extra, synthesizer-llvm
Files
- classify-frog.cabal +5/−5
- src/Option.hs +6/−13
classify-frog.cabal view
@@ -1,5 +1,5 @@ Name: classify-frog-Version: 0.2.4.2+Version: 0.2.4.3 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -42,7 +42,7 @@ model/diclo/hmm-supervised.csv Source-Repository this- Tag: 0.2.4.2+ Tag: 0.2.4.3 Type: darcs Location: http://hub.darcs.net/thielema/classify-frog @@ -120,7 +120,7 @@ storable-record >=0.0 && <0.1, array >=0.4 && <0.6, time >=1.5 && <1.9,- Cabal >=1.14 && <3,+ shell-utility >=0.0 && <0.1, optparse-applicative >=0.11 && <0.15, filemanip >=0.3.6 && <0.4, pathtype >=0.8 && <0.9,@@ -141,8 +141,8 @@ SignalProcessingSpecificLLVM SignalProcessingLLVM Build-Depends:- synthesizer-llvm >=0.8 && <0.9,- llvm-extra >=0.6 && <0.8,+ synthesizer-llvm >=0.8.2 && <0.9,+ llvm-extra >=0.8 && <0.9, llvm-tf >=3.0 && <3.2 Else Hs-Source-Dirs: llvm/no
src/Option.hs view
@@ -4,9 +4,9 @@ import qualified Parameters as Params import qualified HiddenMarkovModel as HMM -import qualified Distribution.Verbosity as Verbosity-import qualified Distribution.ReadE as ReadE-import Distribution.Verbosity (Verbosity)+import qualified Shell.Utility.Verbosity as Verbosity+import Shell.Utility.Verbosity (Verbosity)+import Shell.Utility.ParseArgument (parseNumber) import qualified Options.Applicative as OP @@ -39,10 +39,9 @@ optionVerbosity :: OP.ReadM Verbosity-optionVerbosity =- OP.eitherReader $ ReadE.runReadE Verbosity.flagToVerbosity+optionVerbosity = OP.eitherReader Verbosity.parse --- cf. Distribution.Simple.Utils+-- cf. Shell.Utility.Log noticeAction :: Flags -> IO () -> IO () noticeAction flags emit = when (verbosity flags >= Verbosity.normal) emit@@ -98,13 +97,7 @@ numStates :: OP.Parser Int numStates = OP.option- (OP.eitherReader $ \str ->- case reads str of- [(n, "")] ->- if n>0- then Right n- else Left "not positive"- _ -> Left "not an integer") $+ (OP.eitherReader $ parseNumber "number of states" (0<) "positive") $ OP.long "numstates" <> OP.metavar "NUMBER" <> OP.help "number of states for Hidden Markov Model" <>