question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal for HKT restructuring

See original GitHub issue

Since the time we implemented HKTs we found a new encoding that doesn’t require having a central registry of URIs and that should have far better performances while allowing for more flexibility.

The encoding is implemented in:

https://github.com/mikearnaldi/hkt-new

I propose we change the current encoding to reflect the new implementation, as part of the change we will also need to remove the flexibility of choosing the variance of a type parameter namely in the current encoding we are using a config param to specify how a type parameter should be mixed, the problem with that approach is that it may generate inconsistencies, namely we do implementations on a reduced base using HKT/HKT2 and we have a generic overload that considers all the params with their respective rules but there is no guarantee that the base impl would actually work with that set of rules, namely I could implement a base using R as contravariant and having R as covariant in the target type. Also we actually never used any other setting other than S invariant, R contravariant, etc.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
mikearnaldicommented, Jan 4, 2022

A side effect of this would be that Deno will be working (without tracing and plugins) https://github.com/Effect-TS/core/issues/754 given the main issues was usage of module augmentation

2reactions
mikearnaldicommented, Oct 6, 2022

@shroomist yes we are working on a re-unification with fp-ts that has adopted this encoding for v3 which is under heavy development by @gcanti, you can follow https://github.com/gcanti/fp-ts/tree/3.0.0-new-hkt for updates. As soon as that is ready Effect will depend on fp-ts and provide fp-ts compliant instances (which is great news for the ecosystem)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Evergrande aims to win approval for restructuring proposals ...
Evergrande expects to firm up debt restructuring proposals by end-February or early-March, lawyers for the developer told a Hong Kong court, ...
Read more >
Restructuring of Hong Kong Telecom: A Case Study
The proposal was divided into two parts. The first part was the substitution of shares of HK Telecom for those of TELCO and...
Read more >
Court approves HK Airlines' HK$49b debt restructuring
At a hearing Wednesday, Justice Jonathan Harris said the court was sanctioning a so-called scheme of arrangements for Hong Kong Airlines.
Read more >
Hong Kong's Legislative Council expected to approve ...
A massive plan to restructure the Hong Kong government will be submitted ... The relevant establishment and financial proposals will also be ...
Read more >
Intention to propose Hong Kong Scheme and UK ...
Last updated : 2022-09-27 HKT (GMT+8). For the purposes of implementing the proposed restructuring of its debts and liabilities, Hong Kong Airlines Limited ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found