Skip to content

[#120] expose target type in type check functions

Maxim Koltsov requested to merge maksbotan/#120-polymorphic-type-check into master

Description

Problem: `typeCheckValue` and a couple of related functions return
`Typed.Value t` wrapped in an existentially-quantified wrapper. However
these functions also accept something like `Notes t`, from which they
derive the actual desired type of the value being type-checked. This
seems like an unneccessary complication.

Solution: drop existential wrappers and make these function get the type
via TypeApplications.

Related issue(s)

Resolves #120 (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 Maxim Koltsov

Merge request reports