
22 Oct
2010
22 Oct
'10
7:20 a.m.
On 22 October 2010 12:03, Dan Doel
data Mu f = In { out :: f (Mu f) }
instance Show (f (Mu f)) => Show (Mu f) where show = show . out
Is that an example of a value recursive dictionary?
Assuming the Show (f (Mu f)) instance uses the (Mu f) one, AFAIK this should indeed build a loopy dictionary. I think this extension was motivated by "Scrap your Boilerplate with Class" - see section 5 of http://research.microsoft.com/en-us/um/people/simonpj/papers/hmap/gmap3.pdf. Cheers, Max