For TH look also at
http://www.mail-archive.com/haskell-cafe@haskell.org/msg13057.html
2011/10/27 Magicloud Magiclouds
> On Thu, Oct 27, 2011 at 1:57 AM, Brent Yorgey
> wrote:
> > On Wed, Oct 26, 2011 at 09:10:23PM +0400, MigMit wrote:
> >> Can't be done. Even if this particular module doesn't
On Thu, Oct 27, 2011 at 1:57 AM, Brent Yorgey wrote:
> On Wed, Oct 26, 2011 at 09:10:23PM +0400, MigMit wrote:
>> Can't be done. Even if this particular module doesn't contain
>> "instance Class Type", it's quite possible that the said instance
>> would be defined in another module, about which th
On Thu, Oct 27, 2011 at 7:04 AM, Evan Laforge wrote:
>> No, this lists all the instances of a class. OP asked for the classes
>> of which a given type is an instace.
>>
>> Presumably it is possible, since Haddock does it! In the
>> documentation generated for a type it lists classes of which the
> No, this lists all the instances of a class. OP asked for the classes
> of which a given type is an instace.
>
> Presumably it is possible, since Haddock does it! In the
> documentation generated for a type it lists classes of which the type
> is an instance. So you might want to look at how H
On Wed, Oct 26, 2011 at 09:10:23PM +0400, MigMit wrote:
> Can't be done. Even if this particular module doesn't contain
> "instance Class Type", it's quite possible that the said instance
> would be defined in another module, about which this one knows
> nothing about.
That doesn't mean it can't b
On Wed, Oct 26, 2011 at 09:15:41AM -0700, Nathan Howell wrote:
> On Wed, Oct 26, 2011 at 6:53 AM, Magicloud Magiclouds <
> magicloud.magiclo...@gmail.com> wrote:
>
> > But in Haskell, could I write a code to list the classes that a type
> > instanced?
> > TemplateHaskell as well.
> >
>
> It's p
Can't be done. Even if this particular module doesn't contain "instance Class
Type", it's quite possible that the said instance would be defined in another
module, about which this one knows nothing about.
On the other hand, what would you do with that information?
Отправлено с iPad
26.10.2011
On Wed, Oct 26, 2011 at 6:53 AM, Magicloud Magiclouds <
magicloud.magiclo...@gmail.com> wrote:
> But in Haskell, could I write a code to list the classes that a type
> instanced?
> TemplateHaskell as well.
>
It's possible with TemplateHaskell. Look at classInstances and the ClassI
data construc
Magicloud Magiclouds wrote:
> If this was in ruby or other languages that support reflection, it
> won't be a question.
> But in Haskell, could I write a code to list the classes that a type
> instanced?
In regular Haskell, type information is completely lost after
compilation, so you can't
Hi,
If this was in ruby or other languages that support reflection, it
won't be a question.
But in Haskell, could I write a code to list the classes that a type
instanced?
TemplateHaskell as well.
--
竹密岂妨流水过
山高哪阻野云飞
___
Haskell-Cafe mailing list
H
10 matches
Mail list logo