You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to create custom "Capabilities" or Effects if possible, but in general, the kind of standards like Writer, State, etc. would Immediately be useful. Most of my real-life use cases are Logging, Save/Fetching from a data store, or making a query to an external api.
Thank you!
The text was updated successfully, but these errors were encountered:
I think this is quite easily possible with the new encodings, and context receivers. Although context receivers are only partially released. Perhaps we can write an additional document around this in the new website, I don't think this requires any new code or changes inside Arrow. So moving this to the arrow-website repo.
We could consider introducing a new module, or separate library (repo) to expose some bases interfaces / implementations later on if needed.
I.e. I think for Statecontext(Atomic<State>) is probably sufficient, and that'd be safe in concurrent environments and everything. Writer is probably just a context(Atomic<List<String>>), or a super tiny wrapper around it that combines W with (W, W) -> W.
@JvmInline
value classMyWriter(privatevalatom:Atomic<MyValue>) {
funwrite(value:MyValue): Unit= atom.update { current -> current + value }
funget(): MyValue= atom.value
}
typealiasRandomState=Atomic<SEED>(INITIAL_SEED)
context(RandomState, MyWriter, Raise<Error>)
funmyProgram(): Int {
...
}
What version are you currently using?
1.0.0
What would you like to see?
An Effect system similar like Frank, Unison Abilities, or Freer monads.
@raulraja and @nomisRev gave additional context in the slack thread about this.
I would like to be able to create custom "Capabilities" or Effects if possible, but in general, the kind of standards like Writer, State, etc. would Immediately be useful. Most of my real-life use cases are Logging, Save/Fetching from a data store, or making a query to an external api.
Thank you!
The text was updated successfully, but these errors were encountered: