I'm trying to use shapeless to derive a Generic for a type member defined in a trait, but am not having luck. I have made as simple of a reproduction ...
I'm trying to use shapeless to derive a Generic for a type member defined in a trait, but am not having luck. I have made as simple of a reproduction ...
I have a linq which a simple where statement and a simple select. If i return the result as .ToList() everything works fine. If I change it to .ToData ...
I love Scala's abstract type members, which is a great feature. For example, consider this simple example, as entered into the Scala REPL: scala> ...
I'm trying to use a type member of a class in its child, but I'm failing. In particular, I can't understand why this code does not compile: I've al ...
As we know we must perpend typename before using a Type Member of a Template Type Parameter because without it the compiler doesn't know whether we ar ...
Why does the following type equivalence hold but when type member T is assigned via method parameter A then type equivalence does not hold Intui ...
I have this program: the line told me error:Type mismatch,expected C.T,actual:2 so why can't I write it seems the same as and what's th ...
I'm running into an issue where I am working with several Traits that use dependent typing, but when I try to combine the Traits in my business logic, ...
I'm trying to resolve an implicit then use the type stored in it to resolve a second implicit. Here is the code: Calling it like this: Compilin ...
I am learning Scala and I was trying to create a type class to solve the "Every animal eats food, but the type of food depends on the animal" problem. ...
I have the following problem with hierarchy of traits in Scala code: First of all, I have a basic trait MyTrait[A] with such definition: It is th ...
I wrote the following simple example and expected it to be compiled fine: ideone demo But the compiler prints the following error message: I do ...
Scala has a nice feature to infer type parameter inside the pattern match. It also checks pattern match exhaustiveness. For example: Is it possibl ...
Suppose that I have some trait Foo, for example: I want to enforce at compile time that all inputs passed to baz have been previously produced by b ...
Lets say I've a trait with a type A that is a subclass of Any and a method called nextState that has that same type as a parameter. This trait is t ...
I am reading Foundations of path dependent types. On the first page, on the right column it is written: Our motivation is twofold. First, we belie ...
I know there is an xpath like api to get fields out of a JObject in Json4s However it feels a bit cumbersome and I'm not a fan of symbolic like api ...
I can have a field referring to an abstract type member in Scala, e.g. but it seems that I cannot do the same thing for a constructor parameter: ...
Sorry for the confusing title. I am attempting to write some Request and Response classes for validation and parsing purposes. I'd like to have some ...
Is it possible to resolve an implicit parameter for a type B if an implicit is defined for its super type A? Here is an example : I have an Enumer ...