existential-type
Folding over a polymorphic list in Haskell
I have a collection of records spread across a number of types in a large Haskell application that reference each other. All of the types involved implement a common typeclass. The typeclass contains[详细]
2023-04-12 17:17 分类:问答Can someone explain to be what is going on here? existential universal quantifications
I have to program (C++) and find the true value of the following. I am uncertian as to what it exactly means.[详细]
2023-04-12 16:13 分类:问答Can I statically reject different instantiations of an existential type?
First attempt It\'s difficult to make this question pithy, but to provide a minimal example, suppose I have this type:[详细]
2023-04-08 09:36 分类:问答Using Java wildcards
I want to 开发者_JAVA百科implement some kind of component system in Java. There is an interface, called Form[详细]
2023-04-06 16:45 分类:问答A "truly" generic function in Haskell
Suppose I have a compound data type - data M o = M (String,o) Now, I can define a function that works for ALL M irrespective of o. For example -[详细]
2023-03-29 12:16 分类:问答Scala: existential types for a Map
I want to use a map of varying types on an unknown A: val map: Map[Foo[A开发者_如何学C], Bar[A]] = ...[详细]
2023-03-27 21:14 分类:问答How do you explicitly specify a parameterized type for an existential type in Scala?
In Pro开发者_JAVA技巧gramming in Scala, the following example is given to show how to reference a Java class with wildcards.The method javaSet2ScalaSet takes a type T.Typically, you can always explici[详细]
2023-03-20 16:59 分类:问答Existential types and pattern matching in Scala
I\'m trying to do something roughly like the following: trait MyData trait MyId trait MyDataType[T <: MyData] {[详细]
2023-03-17 15:02 分类:问答existential types
(UPDATE: simplified the code and also show why it should work) How can I fix this code?: case class Sub[B <: Seq[_] : Manifest](b: B) {[详细]
2023-03-11 11:04 分类:问答State monad in OCaml
I was trying to implement the state monad in OCaml (as an exercise). My implementation looks like this:[详细]
2023-03-02 13:21 分类:问答