
7 Jan
2008
7 Jan
'08
8:40 a.m.
Hi, all! I guess what I am about to ask is currently impossible, but as you haskellers always manage to amaze me and there is plenty of new features in GHC I am not familiar with here it goes. Given two type classes A t and B t, I'd like to derive different A t instances depending exactly on whether t is an instance of B. In other words, is it possible to define a class (actually a type-level function) IsB t f such that: IsB t HTrue <=> (B t) exists IsB t HFalse <=> otherwise? If not, is this wish intrisically pointless? Thanks in advance. Cheers, Jorge M. Pelizzoni ICMC - Universidade de São Paulo
6344
Age (days ago)
6344
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jorge Marques Pelizzoni