10 questions
0
votes
0
answers
42
views
Deadlock issue when scheduling task computations (F#, .NET TPL)
I am in the process of building an effect system DSL with F# inspired by ZIO and Cats Effect.
I have my effect type defined as a DU of opcodes, a fiber type, a channel type for message passing, etc. I ...
1
vote
1
answer
262
views
Kotlin Arrow EffectScope.shift() implementation throws exception?
When looking at arrows documentation about functional error handling one of the reason listed to avoid throwing exceptions is performance cost (referencing The hidden performance costs of ...
1
vote
1
answer
161
views
How to modify the type of a Reader effect in Haskell Polysemy?
The Reader effect provides a local method which modifies the value to be read within a local scope:
local :: Member (Reader i) r => (i -> i) -> Sem r a -> Sem r a
The function passed to ...
2
votes
0
answers
103
views
Interpret a `Sem (x ': r) a` into a `Sem (y ': r) b`?
I'm trying to put together the machinery to write something like secret-sharing (e.g.) using algebraic effects. More specifically I'd like to be able to write the protocol in terms of the actions of ...
0
votes
2
answers
230
views
Using pooledMapConcurrentlyN in polysemy
I'm currently playing around with Polysemy, rewriting a small toy project of mine to get used to it. I'm stumbling upon a piece of code that uses pooledMapConcurrentlyN, so basically a parallel ...
4
votes
1
answer
77
views
Encode effect in terms of another with freer extensible effects
I have been playing around with “freer monads” and extensible effects, implemented in the freer-effects package, and I’ve run into a problem that seems feasible but I’m having trouble solving.
I’ve ...
15
votes
1
answer
851
views
How do I compose 'freer' effects in haskell?
I'm attempting to rewrite a simple interpreter from a transformers-based monad stack to effects based on freer, but I'm running up against a difficulty communicating my intent to GHC's type system.
I ...
3
votes
1
answer
325
views
MonadPlus instance for Control.Eff when Exc is member
In monad transformers, we have
instance (Monad m, Monoid e) => MonadPlus (ExceptT e m)
In extensible effects, there is no such thing as
instance (Monoid e) => MonadPlus (Eff (Exc e :> r))
I'...
1
vote
3
answers
367
views
Methods for side-effects in purely functional programming languages
At the moment I'm aware of the following methods to integrate side-effects into purely functional programming languages:
effect systems
continuations
unique types
monads
Monads are often cited to be ...
15
votes
2
answers
5k
views
What is a type and effect system?
The Wikipedia article on Effect system is currently just a short stub and I've been wondering for a while as to what is an effect system.
Are there any languages that have an effect system in ...