[Haskell-cafe] Data structure containing elements which are instances of the same type class

Joey Adams joeyadams3.14159 at gmail.com
Tue Aug 7 20:13:09 CEST 2012


On Tue, Aug 7, 2012 at 2:03 PM, Daniel Trstenjak
<daniel.trstenjak at gmail.com> wrote:
> Data structure containing elements which are instances of the same type class

Are you looking for existential quantification [1]?

    data SomeFoo = forall a. Foo a => a

 [1]: http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#existential-quantification



More information about the Haskell-Cafe mailing list