From 4dd7dba771d12dafc88a5acc7c364a4a9cc62ab5 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 17 May 2016 18:42:37 -0700 Subject: [PATCH] fix ghc pattern match warning (#323) --- hledger/Hledger/Cli/Utils.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hledger/Hledger/Cli/Utils.hs b/hledger/Hledger/Cli/Utils.hs index d0c9e72cc..fbc7dfeac 100644 --- a/hledger/Hledger/Cli/Utils.hs +++ b/hledger/Hledger/Cli/Utils.hs @@ -75,10 +75,10 @@ withJournalDo opts cmd = do -- | Apply the pivot transformation on a journal, if option is present. pivotByOpts :: CliOpts -> Journal -> Journal -pivotByOpts opts - | Just tag <- maybeTag = pivot tag - | Nothing <- maybeTag = id - where maybeTag = maybestringopt "pivot" . rawopts_ $ opts +pivotByOpts opts = + case maybestringopt "pivot" . rawopts_ $ opts of + Just tag -> pivot tag + Nothing -> id -- | Apply the pivot transformation by given tag on a journal. pivot :: String -> Journal -> Journal