Skip to content

[TM-273] Avoid unnecessary typechecking parameter in Integrational

Diogo Castro requested to merge diogo/tm-273-typed-integrational into master

Description

Problem: typechecking is expensive and slows down tests, so we want to avoid it whenever possible.

Integrational.tTransfer is an example of where unnecessary typechecking could be avoided. It takes a well-typed value, discards all typing information by using untypeValue, and then passes it to Runtime.transfer which typechecks it again.

Solution: Runtime.transfer accepts a TxData, which only accepts untyped values, and later typechecks them on-the-fly. We should change it to also accept already well-typed values.

It should still accept untyped values as well - this is necessary for when Runtime.transfer is called from the CLI with an untyped value read from stdin.

Related issue(s)

Resolves part of [TM-273]

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 Diogo Castro

Merge request reports