module CfnFlip.Aeson ( eitherDecodeFileStrictThrow , module Data.Aeson ) where import CfnFlip.Prelude import Data.Aeson eitherDecodeFileStrictThrow :: (MonadIO m, FromJSON a) => FilePath -> m a eitherDecodeFileStrictThrow :: forall (m :: * -> *) a. (MonadIO m, FromJSON a) => FilePath -> m a eitherDecodeFileStrictThrow FilePath path = do Either FilePath a result <- forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO forall a b. (a -> b) -> a -> b $ forall a. FromJSON a => FilePath -> IO (Either FilePath a) eitherDecodeFileStrict FilePath path forall a c b. (a -> c) -> (b -> c) -> Either a b -> c either forall (m :: * -> *) a. (MonadIO m, HasCallStack) => FilePath -> m a throwString forall (f :: * -> *) a. Applicative f => a -> f a pure Either FilePath a result