diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-04-13 19:50:50 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2021-04-14 08:41:32 -0400 |
commit | 78369f354faf4667d576d9762c6a85dd753fc6da (patch) | |
tree | f0980e72efb2898386b84dfb33c2a46763cf9843 /utils/check-exact/run.sh | |
parent | e63cdccabe0bfbd73a475c669404b9604cf859f5 (diff) | |
download | haskell-wip/T16646-take-two.tar.gz |
Redesign the type of magicDictwip/T16646-take-two
This gives a more precise type signature to `magicDict` as proposed in #16646.
In addition to making it more type safe:
* This allows the `magicDict` constant-folding rule to apply to classes with
multiple type arguments, such as `Typeable @k a`. This means that
`withTypeable` can now be implemented in terms of `magicDict`.
* Moreover, since the constant-folding rule no longer needs to case on the
structure of the expression passed as an argument to `magicDict`, it no
longer cares about the presence or absence of `Tick`s. In effect, this
obsoletes the fix for #19667.
The new `T16646` test case demonstrates the new version of `magicDict` in
action, both in terms of `base` functions defined in terms of `magicDict`
as well as in terms of functions from the `reflection` and `singletons`
libraries.
This fixes #16646. By adding more tests for `magicDict`, this also
fixes #19673 as a side effect.
Diffstat (limited to 'utils/check-exact/run.sh')
0 files changed, 0 insertions, 0 deletions