In Scala 2, you can of course use use wildcard or existential types as type arguments. However, this means that you do not always have a name for a ty ...
In Scala 2, you can of course use use wildcard or existential types as type arguments. However, this means that you do not always have a name for a ty ...
Recently I implemented a type hierarchy similar to Exception. The gist of it is this: class (Typeable a) => Hierarchy a where toHierarchy :: a ...
I am unsure how pattern matching knows whether a StatusReply is a success or error. In general, I am not certain how pattern matching chooses which ...
I have a trait definition that wraps side effects when instantiated like this: Where my Param is a case class which itself takes type parameters li ...
Consider the following implementation sketch: The problem: Having the case class containing a field of an existential type is it possible to imple ...
context: this is using scala-3 final case class TableSchema[T[_[_]] <: Table]( /* ... */ ) ...
So I have a protocol with roughly this structure: and I have an enum like this: And then I have an object using Swift's new 5.7 syntax that hold ...
I have a protocol for simple http client: Now, I'm trying to use this protocol as a type that will be used by clients (e.g. some MyThingRepository ...
Normally in the discussion of things like some, they are referring to return types. This question is specifically about using any or some in argument ...
I recently converted some of my code which originally used Type-Erasure to use the new Swift 5.7 any existential. However, I'm getting some issues whe ...
In GHCi, the kind of FUN is displayed like this: At first, I thought this was a roundabout way of saying but it turns out Template Haskell has a ...
I hope this makes sense. I'm trying to write a function that takes an object where each key equals a function and returns a function who's rest argum ...
I have the following simplified program that works fine: {-# LANGUAGE Rank2Types #-} module Temp where import Control.Monad.ST import Control.Monad ...
edit: I have followed up with a more specific question. Thank you answerers here, and I think the followup question does a better job of explaining so ...
Here is a simple example: This gives the compilation error: Where does this (some other) come from? Is it a compiler bug caused by a clear rule ...
I'm trying to understand how to find protocol method's implementation. I know that Swift uses an Existential Container for fixed-size storage in Stac ...
I am trying and failing to get something like this to work in Scala 3: type TupleK[K[*], V[*], A] = (K[A], V[A]) final class MapK[K[*], V[*]] priva ...
I am researching about existential types in Scala 2.12.x. For that I'm testing the following code: I don't expect this to work at runtime because o ...
Using the generics-sop library, I have the following function: f :: (Applicative m) => (forall b. m (ref b)) -> m (NP I '[ref x1, ref x2]) f ac ...
I bumped into an interesting form of lifetime sub-typing, which I think is valid, but the compiler is skeptical of. Consider the following function, ...