[Haskell-beginners] Haskell wants the type, but I only know the class.
aditya siram
aditya.siram at gmail.com
Thu Nov 3 20:24:09 CET 2011
I think this is the exact use case that the new ConstraintKinds extension
was meant to address (http://hackage.haskell.org/trac/ghc/wiki/Status/Oct11).
But we have to wait for 7.4.
-deech
On Thu, Nov 3, 2011 at 1:08 PM, Amy de Buitléir <amy at nualeargais.ie> wrote:
> Thank you, David and Antoine.
>
> I was planning to have files containing different types of objects, but
> where
> all of the types are instances of a particular class. Since the class
> definition
> ensures that whatever the types are, they implement the methods that I
> need, I
> hoped to be able to manipulate the files using those methods, without
> having to
> find out the class programmatically.
>
> Clearly I need to rethink this. I'm looking into existentially quantified
> data
> constructors now, maybe that will help.
>
>
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20111103/4b385828/attachment.htm>
More information about the Beginners
mailing list