Skip to content

[#163] remove unnecessary TcOriginatedContracts usages

Description

Problem: TcOriginatedContracts is used to typecheck a value of type contract p. After the Babylon update this can only happen in a parameter. However, we store tcContracts in TypeCheckEnv and often blindly pass mempty or set it to error.

Solution: remove tcContracts from TypeCheckEnv and use TcOriginatedContracts only for typeCheck functions that needs it. typeCheckParameter has been added for this purpose. Additionally, unnecesary type-checking functions based on it have been removed.

Related issue(s)

Resolves #163 (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 Pinto Pasquale

Merge request reports