Simplify?#6
Conversation
Package lower bounds should depend on first three numbers (which determine the minimal API set) and upper bounds should be strict and depent on first two numbers (which determine breaking changes).
|
Oh, and it also fixes the "problem" I started with, namely the fact |
|
@lucasvreis Since this is almost a rewrite, could you add some tests (that mirrors usage in Ema) using Ideally, tests as separate PR which gets merged to |
|
@srid I had a look at hspec and my impression was that we're not supposed to run IO actions inside tests... I only saw functions for running IO before or after each test. Perhaps you can try it in emanote? I think it's short enough to understand what it's doing (or at least a fun puzzle to work out 🙃). It's the same mechanism used in |
|
Why not use |
Okay, I'll review it latter. |
|
My god, I let this PR slip! Will take a look soonish, @estradilua |
Sorry for almost rewriting the whole thing, but I was trying to fix a small issue in ema and started wondering why
lvarcould not use the same trickChan/TChandoes to implement the broadcasting instead of doing theListenerIdbookkeeping.The idea is defining
LVarasthe
TVarwill always point to an emptyTMVar, but when the first value gets modified, this emptyTMVaris filled (with()) and theTVaris modified to point to a new emptyTMVar.At this point, the functions listening to the
LVarwere waiting for the firstTMVarto be filled, and when this happens they can proceed to read the new value.