Skip to content

[#425] Replace usage of `unMorleyLogs` with `pickMorleyLogs`

Alyona Antonova requested to merge alyoanton9/#425-replace-unMorleyLogs into master

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

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Alyona Antonova

Merge request reports