From 741f43bc657f51dc3457027bdc9172eb1115e125 Mon Sep 17 00:00:00 2001 From: Anton-Latukha Date: Fri, 8 Jan 2021 21:26:54 +0200 Subject: [PATCH] load Control.Monad.Fail if GHC < 8.8 --- src/Nix/Fresh/Stable.hs | 3 +++ src/Nix/Scope/Basic.hs | 3 +++ src/Nix/Thunk/Basic.hs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/src/Nix/Fresh/Stable.hs b/src/Nix/Fresh/Stable.hs index f2eeb68f4..86bac4654 100644 --- a/src/Nix/Fresh/Stable.hs +++ b/src/Nix/Fresh/Stable.hs @@ -14,7 +14,10 @@ import Nix.Effects import Nix.Render import Nix.Thunk import Nix.Thunk.StableId +#if __GLASGOW_HASKELL__ < 880 +import Prelude hiding (fail) import Control.Monad.Fail +#endif import Control.Monad.Reader import Control.Monad.State.Strict import Control.Monad.Ref diff --git a/src/Nix/Scope/Basic.hs b/src/Nix/Scope/Basic.hs index 900efe624..bf19ac6f9 100644 --- a/src/Nix/Scope/Basic.hs +++ b/src/Nix/Scope/Basic.hs @@ -19,7 +19,10 @@ module Nix.Scope.Basic where import Control.Applicative import Control.Monad.Exception +#if __GLASGOW_HASKELL__ < 880 +import Prelude hiding (fail) import Control.Monad.Fail +#endif import Control.Monad.Reader import Control.Monad.State import Control.Monad.Catch diff --git a/src/Nix/Thunk/Basic.hs b/src/Nix/Thunk/Basic.hs index bdef87d96..bda2624db 100644 --- a/src/Nix/Thunk/Basic.hs +++ b/src/Nix/Thunk/Basic.hs @@ -18,7 +18,10 @@ module Nix.Thunk.Basic (ThunkT (..), runThunkT, NThunkF (..), Deferred (..)) whe import Control.Exception hiding ( catch ) import Control.Monad.Catch +#if __GLASGOW_HASKELL__ < 880 +import Prelude hiding (fail) import Control.Monad.Fail +#endif import Control.Monad.Reader import Control.Monad.State