Skip to content

Commit

Permalink
fix: nats support GHC 7
Browse files Browse the repository at this point in the history
I don't remember editing this section.
  • Loading branch information
ncaq committed Jan 16, 2023
1 parent 0b354e8 commit dfd5085
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ evalWriterT :: (Monad m, Monoid w) => CpsW.WriterT w m a -> m a
evalWriterT = fmap fst . CpsW.runWriterT
#endif

#if MIN_VERSION_base(4,8,0)
nats = pure 0 `mplus` ((1 +) <$> nats)
#else
nats = return 0 `mplus` liftM (1 +) nats
#endif

odds = return 1 `mplus` liftM (2+) odds

Expand Down

0 comments on commit dfd5085

Please sign in to comment.