Skip to content

[#690] Modify the 'cloneX' macro to only use 'dup's

Pinto Pasquale requested to merge pasqu4le/#690-better-clonex into master

Description

Problem: The current implementation of 'cloneX' is based on a recursive typeclass definition that uses 'dip's in its recursive step to prove constraints to the compiler. This is however very inefficient, because a combination of 'dup's would be enough otherwise.

Solution: modify the 'CloneX' type signature and family, to allow for 'dip's to be removed from its definition.

Related issue(s)

Resolves #690 (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