Re[2]: [Haskell-cafe] Dealing with incoherent instances

Hello Vyacheslav, (returning to cafe) Wednesday, December 27, 2006, 6:10:30 PM, you wrote:
Ah, so the moment something is passed through a polymorphic function its type information is lost... This seems like a bug in the specification/implementation, no? This is most certainly not the desired behavior. It seems like the compiler has all the information it needs but still can't select the right instance.
sorry, but i think that it is how type class system should work in this case. look at the page for details
Are there ways to get around this problem?
existential types, for example. we need exact specification of your problem. "show me the code"
are you seen http://haskell.org/haskellwiki/OOP_vs_type_classes ?
-- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Ok, I think I solved the problem. It actually simplified my design and
made it significantly cleaner and nicer :) I won't bore people with
the code/explanation here but I'll publish an article about it on
defmacro.
Actually what I was trying to do is described in the SYB 3 paper.
Thanks,
- Slava.
On 12/27/06, Bulat Ziganshin
Hello Vyacheslav,
(returning to cafe)
Wednesday, December 27, 2006, 6:10:30 PM, you wrote:
Ah, so the moment something is passed through a polymorphic function its type information is lost... This seems like a bug in the specification/implementation, no? This is most certainly not the desired behavior. It seems like the compiler has all the information it needs but still can't select the right instance.
sorry, but i think that it is how type class system should work in this case. look at the page for details
Are there ways to get around this problem?
existential types, for example. we need exact specification of your problem. "show me the code"
are you seen http://haskell.org/haskellwiki/OOP_vs_type_classes ?
-- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com
participants (2)
-
Bulat Ziganshin
-
Vyacheslav Akhmechet