Comments (6)
I think this is now ready to continue!
from bow.
Maybe also Traverse?
from bow.
Sounds good to me. Actually, I've needed Traverse on Trampoline more than a couple of times. Are you taking this as well?
from bow.
Yes! :)
from bow.
In order to add any typeclass instance to Trampoline
we first need to add support for the higher kinded types simulation. Since this forces Trampoline
to be a final class, the current enum case as a subclass approach won't work. We need to change to a wrapped enum approach as done in Free
.
For the cases Done
and Defer
, the change is straightforward. For FlatMap
no so much, because the subclassing mechanism was used to hide its type parameter A
.
My proposed solution is to use Coyoneda
. If you have closer look you'll see that FlatMap
has the same data than Coyoneda<ForTrampoline, Trampoline<B>>
, but Coyoneda
hides the A
parameter for us.
Here (trampolineTypeclasses branch) I implemented this approach successfully. However, the branch is based on #623 since I prefer the way Coyoneda
is handled there (with polymorphic functions instead of casts). If that PR is finally not approved in a short time, I will of course rewrite the branch to work with the current Coyoneda
implementation, I'm not trying to put pressure on you to approve the other PR.
Until we decide on which approach to follow, I'll keep this on hold.
from bow.
Closed by #636
from bow.
Related Issues (20)
- Zipper API Reference
- ["Bug"] Optics docs cannot be loaded HOT 1
- ["Request"] or combinator for Prisms HOT 1
- ["Request"] Add extract and embed properties to Prism HOT 1
- ["Request"] Improve binding with function builders HOT 3
- ["Request"] Tree data type HOT 3
- ["Bug"] I lost `BowGeneric` Modules HOT 4
- Documentation for simulated rank-n polymorphism (aka documentation on FunctionK) HOT 4
- ["Request"] Add conversion from Foldable to ArrayK HOT 1
- ["Bug"] Free foldMap is not stack safe HOT 2
- ["Request"] Pair type HOT 1
- ["Request"] Simulation for derive (generic programming) HOT 4
- ["Request"] StackSafeMonad HOT 1
- ["Request"] New syntax for partial application HOT 6
- Question: How to connect Lens which has optional value? HOT 2
- Question: How to convert ReaderT to different F? HOT 4
- Question: Easier flatMap api for ReaderT? HOT 2
- Migrate from Rx to Combine
- Project status HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bow.