fix ghc pattern match warning (#323)

This commit is contained in:
Simon Michael 2016-05-17 18:42:37 -07:00
parent ec507955e1
commit 4dd7dba771

View File

@ -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