switch to Haskell2010
authorJoey Hess <joeyh@joeyh.name>
Mon, 19 Oct 2020 15:14:01 +0000 (11:14 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 19 Oct 2020 15:26:16 +0000 (11:26 -0400)
commit2dd38b6403a33d89e3e5559428b50a8c405a0620
tree7b68b7e6a863ff50028ec15d3af9ae8345b45e39
parente4a8b7b26f6e70a1878bd9081f358449c6f5ea4f
switch to Haskell2010

When I put in Haskell98 this spring, I was under the mistaken
apprehension that ghc defaulted to that. But it actually its default
is a third mode, which is closer to Haskell2010 but with some differences.
The manual says "By default, GHC mainly aims to behave (mostly) like a
Haskell 2010 compiler"

Fixed two cases where the Haskell98 do indentation flexability let
wrongly indented code build. That is one of the places where
ghc does not behave like Haskell2010 by default.

The other place that I think I was concerned about, is GHC manual
section 19.1.1.3. Expressions and patterns. But that only seems to
affect code using bottoms, so would only affect pure functions throwing
an error, which I don't think git-annex does in many places as it's
pretty horrid style. And it would only affect rare cases like shown in
that section. If it did happen, it would mean that the error was not
thrown before specifying Haskell98, and then was. Haskell2010 behaves
the same as Haskell98.

This commit was sponsored by Denis Dzyubenko on Patreon.
Command/Upgrade.hs
Remote/GitLFS.hs
git-annex.cabal