[#425] Replace usage of `unMorleyLogs` with `pickMorleyLogs`
Description
unMorleyLogs
is often used in pair with reverse
, because MorleyLogs
should be reversed normally (they are stored in reversed order).
To get rid of reversing logs every time pickMorleyLogs
function was added. It picks logs in direct order and it is used instead of reverse . unMorleyLogs
combination.
However, there are 2 extra cases:
interpretExt
from Michelson.Interpret
use reversed logs, because it uses unMorleyLogs
to put something in MorleyLogs
. So that pattern matching getMorleyLogs (MorleyLogs logs) = logs
was added.
Second case is reportLogs
from debugger. It is kind of uncompleted function now and it needs to be refactored. Therefore, reverse . unMorleyLogs
and a couple of TODO
and comment were added here.
Related issue(s)
Resolves #425 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.