From d163b56a524fecc9fa052e63863bc67e73211d0f Mon Sep 17 00:00:00 2001 From: David Fox Date: Mon, 4 Jul 2022 14:18:40 -0700 Subject: [PATCH] Omit method Monad.fail when base>4.12 --- src/Data/Tree/Forest.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Data/Tree/Forest.hs b/src/Data/Tree/Forest.hs index 33e83c9..eacb577 100644 --- a/src/Data/Tree/Forest.hs +++ b/src/Data/Tree/Forest.hs @@ -622,8 +622,10 @@ instance (Applicative f, Monad f, Traversable f) => Monad (Forest f s) where where runForest (Forest tt) = tt {-# INLINE (>>=) #-} +#if !MIN_VERSION_base(4,12,0) fail = Forest . fail {-# INLINE fail #-} +#endif #if __GLASGOW_HASKELL__ >= 800