given: sealed trait Data final case class Foo() extends Data final case class Bar() extends Data final case class TimestampedData[A <: Data](data ...
given: sealed trait Data final case class Foo() extends Data final case class Bar() extends Data final case class TimestampedData[A <: Data](data ...
The following code works with Scala 2.13 (see https://stackoverflow.com/a/59996748/2750966): In Scala 3 I get the following Compile Exception: I ...
I don't understand the relantioship between parsing tree and derivation. The parsing tree is invariant with respect to the derivation, but does this m ...
I have a data set where I have a unique proposal ID, application year & financial statement year. One proposal ID shall have one application year( ...
I'm getting started with generic programming in Scala and I'm trying to design a flexible buildable schema type (a generic description of ADTs) that c ...
I want to define equality for some type that can be part of other objects or collections using cats/kitten. I don't want to have to define the equalit ...
I am trying to DRY up my code a little bit. I am using Circe to do some decoding. I have several classes and all of them have the form of: I would ...
Is there a clean way to access the default values of a case class fields when performing type class derivation in Scala 3 using Mirrors? For example: ...
The Problem is I don´t know how to derivate numbers.. How can I derivate this here: 00111 ∈ L(G) And here I have to give a derivation three: 00001 ...
I have an abstract graph (A in the example). And it has inner-class InnerA which is used for one of the functions. I want to derive a new class (e.g. ...
I am trying to modify this standard example to print values with the types. And I am stuck with p.MirroredElemTypes. I haven't found any API to traver ...
Can someone explain me what the difference between these two approaches for typeclass instance derivation (specifically for Option[A])? 1. ...
I have the following case class: It works with auto derivation. But I could not solve it to have a semiautomatic derivation. Here is my Test case ...
Suppose I've been working with some JSON like this: By decoding it into a Scala case class like this: case class Item(id: Long, name: String) Th ...
Is that possible to make semiauto decoders consider default values for case class fields? The following code will fail with: Left(DecodingFailure(A ...
Suppose I have a ADT in Scala: I want to encode values of this type into the JSON that looks like the following: Which luckily is exactly the e ...
I'm paraphrasing a question from the circe Gitter channel here. Suppose I've got a Scala sealed trait hierarchy (or ADT) like this: …and I want to ...
I've got a typeclass and want to provide semi-automatic and automatic derivation to users. I have a working implementation based on Magnolia and it wo ...
I've looked everywhere and can't find anything that explains the actual derivation of backprop for residual layers. Here's my best attempt and where I ...
Tried to search the web but found nothing so far so here my question: I want to index model-information via attributes on the different members. To d ...