Skip to content

Commit

Permalink
CPP out Monad.fail definition. (#961)
Browse files Browse the repository at this point in the history
As Dhall's bounds don't allow base 4.13, this doesn't actually affect
anyone running in a supported configuration (i.e., without
--allow-newer). Further note that base 4.13 (i.e., GHC 8.8) isn't
tested in CI at present.

This could well be the last GHC 8.8-related change needed to
code (bounds will definitely need to be adjusted). In this case, a
Dhall release with relaxed bounds will suffice to finish off GHC 8.8
support.

However, it's also possible that dependencies might bundle together
breaking changes with 8.8 support, in which case adaptations will
still need to be made.
  • Loading branch information
quasicomputational authored and Gabriella439 committed May 23, 2019
1 parent 699cbf9 commit d77e174
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dhall/src/Dhall/Parser/Combinators.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,10 @@ instance Monad Parser where
Parser n >>= k = Parser (n >>= unParser . k)
{-# INLINE (>>=) #-}

#if !(MIN_VERSION_base(4,13,0))
fail = Control.Monad.Fail.fail
{-# INLINE fail #-}
#endif

instance Control.Monad.Fail.MonadFail Parser where
fail = Parser . Control.Monad.Fail.fail
Expand Down

0 comments on commit d77e174

Please sign in to comment.