Hi,
thanks for all the great feedback.
> Your GADT encodes an existential datatype. The closest attempt to encode
> existential types in (something like) SYB that I know of is in Section 5.3 of
> Alexey's PhD thesis [1]. Having said that, he uses the spine view, which
> makes the generic view
On Sun, May 16, 2010 at 2:34 AM, Tom Hawkins wrote:
>> I got the GADT
>>
>> data DataBox where
>> DataBox :: (Show d, Eq d, Data d) => d -> DataBox
>>
> [snip]
>>
>> but I can't figure out how to implement gunfold for DataBox.
>>
>> The error message is
>>
>> Text/XML/Generic.hs:274:23:
>> A
Hi Oscar,
On Sat, May 15, 2010 at 22:19, Oscar Finnsson wrote:
>
> (...)
>
> I guess my questions are:
>
> 1. Is it possible to combine GADTs with Scrap your Boilerplate?
>
Your GADT encodes an existential datatype. The closest attempt to encode
existential types in (something like) SYB that I k
> I got the GADT
>
> data DataBox where
> DataBox :: (Show d, Eq d, Data d) => d -> DataBox
>
[snip]
>
> but I can't figure out how to implement gunfold for DataBox.
>
> The error message is
>
> Text/XML/Generic.hs:274:23:
> Ambiguous type variable `b' in the constraints:
I had a similar dif