From 39114f29897a30e745a28b3d6ff0c99a731ab262 Mon Sep 17 00:00:00 2001 From: Tristan Cacqueray Date: Wed, 10 Feb 2021 23:21:24 +0000 Subject: [PATCH] Remove redundant do This change prevents an hlint warning about a redundant do generated for the case when parseJSON is invalid. --- src/JsonToHaskell/Internal/Printer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonToHaskell/Internal/Printer.hs b/src/JsonToHaskell/Internal/Printer.hs index 2cd63ed..c243f4d 100644 --- a/src/JsonToHaskell/Internal/Printer.hs +++ b/src/JsonToHaskell/Internal/Printer.hs @@ -127,7 +127,7 @@ writeFromJSONInstance name struct = do line $ do tell $ "pure $ " <> name when (not . HM.null $ struct) $ tell "{..}" - line $ tell $ "parseJSON invalid = do" + line $ tell $ "parseJSON invalid =" indented $ do line . tell $ "prependFailure \"parsing " <> name <> " failed, \"" indented . line . tell $ "(typeMismatch \"Object\" invalid)"