From: [identity profile] huzhepidarasa.livejournal.com
Correct me if I'm wrong but Eff looks exactly like the IO monad. Naturally it composes with itself. But it's too coarse.
Edited Date: 2016-08-18 01:32 pm (UTC)

Date: 2016-08-18 01:38 pm (UTC)
From: [identity profile] pbl.livejournal.com
More like IO with refinement on top of it, innit? But there are other encodings of effects that do not involve monads and, according to rumour, are composable (for some values thereof). I believe F* featured something like that, they even had Div or somesuch for divergence.

Date: 2016-08-18 02:26 pm (UTC)
From: [identity profile] huzhepidarasa.livejournal.com
Yes, parameterized by list (set?) of effects that occurred. I think this should be possible in Haskell too, with some existing or plausible extension. Need to think about it.

Date: 2016-08-18 03:23 pm (UTC)
From: [identity profile] pbl.livejournal.com
DataKinds and friends should be enough methinks, at least for a rough approximation of this. Is type inference for this decidable, though? Type checking should be.
From: [identity profile] kika.livejournal.com
Yes, it does. But it is parametrized with either an open or closed row of effects and thus Eff (console::CONSOLE) doesn't compose with Eff (fs::FS). By opening and closing the row and adding and removing effects I can control the composability. This is also not fine-grained enough (esp. with the "inflation of effects" when everybody and their grandmother invents new type of effect which implicitly may include others) but it's much, MUCH, more fine-grained than IO() which is just "some IO" who knows what it does.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

May 2025

S M T W T F S
    1 2 3
456 7 8 9 10
11 121314151617
181920 21 222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 24th, 2025 11:17 pm
Powered by Dreamwidth Studios