Welcome! Got a question? Do you have -Ypartial-unification turned on? Other FAQs: http://typelevel.org/cats/faq.html
TheWebSocket.send()
method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value ofbufferedAmount
by the number of bytes needed to contain the data. If the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically.
Sync[F].delay
Hi there!
I'm trying to adapt Discipline's testing approach, but I'm experiencing issues with comparing values in effectful context F[_]
like IO[_]
.
The source of the problem is in discipline package in cats laws - there is an implicit converter from IsEq[A]
to Prop
, requiring an Eq[A]
and a prettifier A => Pretty
.
When A
is actually an IO[A]
, it means that to use Pretty
I have to reevaluate the effects I've already evaluated with Eq
or memoize them. I suppose I can come up with my own converter to Prop
which runs all effects and remembers their values at the beginning, but maybe I'm missing something and someone here can point me in the right direction.
PartialOrder also enables >, >=, <, and <= operators, but these are tricky to use because if you’re not careful you could end up using the built-in comparison operators.
http://eed3si9n.com/herding-cats/PartialOrder.html
ApplicativeError
raiseError[F[_]](e: E)
given ApplicativeError[F, E]
Hmm. I didn’t see any cases of that problem in my usage.
On a related note: if you’re wirting tests and you need an ApplicativeError
or MonadError
, do you just jump to using IO
(or, in my situation, StateT[IO, MyState, ?]
because I need MonadState
and MonadError
)? Or something less powerful than IO
? Try
?
Either
is a pretty easy one