[Haskell-cafe] Using fundeps to resolve polymorphic types to concrete types

Pablo Nogueira pablo at babel.ls.fi.upm.es
Tue Jul 29 06:28:58 EDT 2008


>> But if you have actual values rather than just unit types, note that this
>> won't work:
>>
>>  > instance DeriveType A B where
>>  >     someDestructor (SomeConstructor _ b) = b
>
> I couldn't understand the sentence "actual values rather than unit
> types". What do you have in mind?

I didn't pay attention to the |b| value returned. So what you meant
was that only a constant function will do, not a function that returns
the value |b|.
P.


More information about the Haskell-Cafe mailing list