on master help sign in
Remove CPP from Effectful.Writer as it no longer triggers the GHC bug

It was most likely https://gitlab.haskell.org/ghc/ghc/-/issues/19700, but now it no longer triggers, so let's remove the CPP.

commit70ee4f31e5b420aff9d3f2a1f34a86ee37b51dda authorAndrzej Rybczak <andrzej@rybczak.net> dateSat 26 Jun 2021, 13:03 (5 years ago) parent120ac9d
1 file changed−6
src/Effectful/Writer.hs−6
src/Effectful/Writer.hs−6
@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21-- | The 'Writer' as an effect.
32module Effectful.Writer
43 ( Writer
@@ -41,17 +40,12 @@ listen
4140 => Eff es a
4241 -> Eff es (a, w)
4342listen (Eff m) = unsafeEff $ \es -> mask $ \restore -> do
44−#if __GLASGOW_HASKELL__ >= 900
45− error $ "'listen' temporarily doesn't compile with released GHC 9.* versions"
46− ++ " due to a GHC bug. If you want to use 'listen', please use GHC 8.*"
47−#else
4843 w0 <- unsafeStateEnv (\(IdE (Writer w)) -> (w, IdE (Writer mempty))) es
4944 -- If an exception is thrown, restore e0 and keep parts of e1.
5045 a <- restore (m es) `onException`
5146 unsafeModifyEnv (\(IdE (Writer w)) -> IdE (Writer (w0 `mappend` w))) es
5247 w1 <- unsafeStateEnv (\(IdE (Writer w)) -> (w, IdE (Writer (w0 `mappend` w)))) es
5348 pure (a, w1)
54−#endif
5549
5650listens
5751 :: (Writer w :> es, Monoid w)