mirror of
https://github.com/ChrisPenner/json-to-haskell.git
synced 2024-08-18 00:30:22 +03:00
Remove redundant do
This change prevents an hlint warning about a redundant do generated for the case when parseJSON is invalid.
This commit is contained in:
parent
97f1101592
commit
39114f2989
@ -127,7 +127,7 @@ writeFromJSONInstance name struct = do
|
|||||||
line $ do
|
line $ do
|
||||||
tell $ "pure $ " <> name
|
tell $ "pure $ " <> name
|
||||||
when (not . HM.null $ struct) $ tell "{..}"
|
when (not . HM.null $ struct) $ tell "{..}"
|
||||||
line $ tell $ "parseJSON invalid = do"
|
line $ tell $ "parseJSON invalid ="
|
||||||
indented $ do
|
indented $ do
|
||||||
line . tell $ "prependFailure \"parsing " <> name <> " failed, \""
|
line . tell $ "prependFailure \"parsing " <> name <> " failed, \""
|
||||||
indented . line . tell $ "(typeMismatch \"Object\" invalid)"
|
indented . line . tell $ "(typeMismatch \"Object\" invalid)"
|
||||||
|
Loading…
Reference in New Issue
Block a user