@@ -124,6 +124,7 @@ import Data.Aeson
124124 (defaultOptions, genericToEncoding, ToJSON(..), FromJSON(..), Value)
125125import GHC.Generics (Generic)
126126import Control.Monad.IO.Unlift (MonadUnliftIO)
127+import qualified Control.Monad.Fail as Fail
127128#endif
128129
129130#if MIN_VERSION_base(4,9,0) && defined(CHECK_UNCHECKED)
@@ -165,7 +166,7 @@ data JSContextRef = JSContextRef {
165166type JSM = IO
166167#else
167168newtype JSM a = JSM { unJSM :: ReaderT JSContextRef IO a }
168− deriving (Functor, Applicative, Monad, MonadIO, MonadFix, MonadThrow, MonadUnliftIO)
169+ deriving (Functor, Applicative, Monad, MonadIO, MonadFix, MonadThrow, MonadUnliftIO, Fail.MonadFail)
169170
170171instance MonadCatch JSM where
171172 t `catch` c = JSM (unJSM (syncAfter t) `catch` \e -> unJSM (c e))