core-program 0.5.0.2 → 0.5.0.3
raw patch · 2 files changed
+4/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- core-program.cabal +1/−1
- lib/Core/Program/Arguments.hs +3/−7
core-program.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack name: core-program-version: 0.5.0.2+version: 0.5.0.3 synopsis: Opinionated Haskell Interoperability description: A library to help build command-line programs, both tools and longer-running daemons.
lib/Core/Program/Arguments.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE StrictData #-}@@ -49,7 +50,7 @@ ) where import Data.Hashable (Hashable)-import qualified Data.List as List+import Data.List qualified as List import Data.Maybe (fromMaybe) import Data.String (IsString (..)) import Prettyprinter (@@ -360,12 +361,7 @@ case config of Blank -> Blank Simple options -> Simple (options ++ [option])- Complex commands -> Complex (List.foldl' f [] commands)- where- f :: [Commands] -> Commands -> [Commands]- f acc command = case command of- Global options -> Global (options ++ [option]) : acc- c@(Command _ _ _) -> c : acc+ Complex commands -> Complex (commands ++ [Global [option]]) {- | Individual parameters read in off the command-line can either have a value