serokell-util 0.3.1 → 0.4.0
raw patch · 3 files changed
+8/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Serokell.Util.OptParse: fromParsec :: Parsec String () a -> ReadM a
+ Serokell.Util.OptParse: fromParsec :: Parsec Text () a -> ReadM a
Files
serokell-util.cabal view
@@ -1,5 +1,5 @@ name: serokell-util-version: 0.3.1+version: 0.4.0 synopsis: General-purpose functions by Serokell homepage: https://github.com/serokell/serokell-util license: MIT
src/Serokell/Util/OptParse.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE NoImplicitPrelude #-} -- | Some useful helper for optparse-applicative library @@ -9,6 +10,8 @@ , fromParsec ) where +import Universum+ import Data.String (IsString (fromString)) import Options.Applicative (ArgumentFields, Mod, OptionFields, Parser, ReadM, argument, eitherReader, option, str)@@ -26,5 +29,6 @@ strOption :: IsString s => Mod OptionFields s -> Parser s strOption = option fromStr -fromParsec :: Parsec String () a -> ReadM a-fromParsec parser = eitherReader $ either (Left . show) Right . parse parser "<CLI options>"+fromParsec :: Parsec Text () a -> ReadM a+fromParsec parser =+ eitherReader $ first show . parse parser "<CLI options>" . toText
src/Serokell/Util/Trace.hs view
@@ -31,6 +31,7 @@ -- Accepts formatter as first parameter, and then multiple arguments to print. -- -- Examples:+-- -- >>> traceIdF F.ords 1 -- 1st -- 1