enable LambdaCase and convert around 10% of places that could use it

Needs ghc 7.6.1, so minimum base version increased slightly. All builds
are well above this version of ghc, and debian oldstable is as well.

Code that could use lambdacase can be found by running:
git grep -B 1 'case ' | less
and searching in less for "<-"

This commit was sponsored by andrea rota.
This commit is contained in:
Joey Hess 2017-11-15 16:55:38 -04:00
parent 5e6c3ba30c
commit 187b3e7780
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
13 changed files with 119 additions and 166 deletions

View file

@ -133,12 +133,10 @@ mkLargeFilesParser = do
#ifdef WITH_MAGICMIME
magicmime <- liftIO $ catchMaybeIO $ do
m <- magicOpen [MagicMimeType]
liftIO $ do
md <- getEnv "GIT_ANNEX_DIR"
case md of
Nothing -> magicLoadDefault m
Just d -> magicLoad m
(d </> "magic" </> "magic.mgc")
liftIO $ getEnv "GIT_ANNEX_DIR" >>= \case
Nothing -> magicLoadDefault m
Just d -> magicLoad m
(d </> "magic" </> "magic.mgc")
return m
#endif
let parse = parseToken $ commonTokens