Hi Konstantin, Here is yet another possible approach:
Perhaps you really meant what you wrote in your definition of firstFunction - namely, that it needs to be polymorphic, so that it can convert to _any_ type that is an instance of SecondClass. In that case, you might want to add another method to SecondClass: class SecondClass a where secondConstructor :: Double -> a secondFunction :: a -> Double instance SecondClass SecondData where secondConstructor = SecondData secondFunction (SecondData d) = d Now you can say: instance FirstClass FirstData where firstFunction (FirstData d) = secondConstructor d In short, it all depends on what exactly you are trying to do. Hope this helps, Yitz _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe