Skip to content

Commit

Permalink
Merge pull request #461 from ethereum/pretty-expr
Browse files Browse the repository at this point in the history
Small nit in pretty printing writes
  • Loading branch information
msooseth authored Feb 26, 2024
2 parents 7a8a48d + 11d713b commit 5d75bb8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/EVM/Format.hs
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,10 @@ formatExpr = go
, indent 2 $ formatExpr slot
, "val:"
, indent 2 $ formatExpr val
, "store:"
, indent 2 $ formatExpr prev
]
, ")"
, formatExpr prev
]
AbstractStore a idx ->
"(AbstractStore " <> formatExpr a <> " " <> T.pack (show idx) <> ")"
Expand All @@ -714,9 +715,10 @@ formatExpr = go
, "size: " <> formatExpr size
, "src:"
, indent 2 $ formatExpr src
, "dst:"
, indent 2 $ formatExpr dst
]
, ")"
, formatExpr dst
]
WriteWord idx val buf -> T.unlines
[ "(WriteWord"
Expand All @@ -725,18 +727,19 @@ formatExpr = go
, indent 2 $ formatExpr idx
, "val:"
, indent 2 $ formatExpr val
, "buf:"
, indent 2 $ formatExpr buf
]
, ")"
, formatExpr buf
]
WriteByte idx val buf -> T.unlines
[ "(WriteByte"
, indent 2 $ T.unlines
[ "idx: " <> formatExpr idx
, "val: " <> formatExpr val
, "buf: " <> formatExpr buf
]
, ")"
, formatExpr buf
]
ConcreteBuf bs -> case bs of
"" -> "(ConcreteBuf \"\")"
Expand Down

0 comments on commit 5d75bb8

Please sign in to comment.