@@ -303,12 +303,13 @@ decodeHelper_ :: FromJSON a
303303 -> IO (Either ParseException ([Warning], a))
304304decodeHelper_ src = do
305305 x <- try $ runResourceT $ runStateT (runConduit $ src .| runReaderT parse []) (ParseState Map.empty [])
306− return $ case x of
306+ case x of
307307 Left e
308− | Just pe <- fromException e -> Left pe
309− | Just ye <- fromException e -> Left $ InvalidYaml $ Just (ye :: YamlException)
310− | otherwise -> Left $ OtherParseException e
311− Right (y, st) -> either
308+ | Just pe <- fromException e -> return $ Left pe
309+ | Just ye <- fromException e -> return $ Left $ InvalidYaml $ Just (ye :: YamlException)
310+ | Just sae <- fromException e -> throwIO (sae :: SomeAsyncException)
311+ | otherwise -> return $ Left $ OtherParseException e
312+ Right (y, st) -> return $ either
312313 (Left . AesonException)
313314 Right
314315 ((,) (parseStateWarnings st) <$> parseEither parseJSON y)