[Haskell-cafe] Re: Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread ChrisK
the standard way to do that is use an existential wrapper: (This needs -fglasgow-exts or some flags) module Main where class Interface x where withName :: x - String data A = A String instance Interface A where withName (A string) = Interface A with ++ string ++ data B = B

Re: [Haskell-cafe] Re: Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread Jason Dusek
ChrisK [EMAIL PROTECTED] wrote: the standard way to do that is use an existential wrapper: Does this relate to the basket of fruit problem in object oriented languages? You created the existential wrapper to allow a multimorphic list type? -- _jsn

[Haskell-cafe] Re: Dynamically find out instances of classes (pluginsystem for haskell)

2007-11-22 Thread ChrisK
Jason Dusek wrote: ChrisK [EMAIL PROTECTED] wrote: the standard way to do that is use an existential wrapper: Does this relate to the basket of fruit problem in object oriented languages? You created the existential wrapper to allow a multimorphic list type? When you access the