Records in Haskell
wren ng thornton
wren at freegeek.org
Thu Mar 1 04:56:43 CET 2012
On 2/29/12 10:51 PM, wren ng thornton wrote:
> On 2/28/12 3:57 AM, AntC wrote:
>> wren ng thornton<wren<at> freegeek.org> writes:
>>> I'm not sure it's a good proposal, but it seems like the only way to
>>> handle this issue is to (1) introduce a new kind for
>>> semantically-oriented field names,
>> That's what SORF does: the String Kind
>>> and (2) make the Has class use that
>>> kind rather than a type-level string.
>> No proposal is using a _type_-level string. Barney's confused you.
> I was under the impression that all the working proposals were using the
> Has class, a la:
> someFunction :: Has "name" a => a -> Foo
> someFunction x = ... (name x) ...
> modulo the debate about the value-level syntax for records, and modulo
> the debate about whether Has should be exposed to users or hidden inside
> GHC. Is this no longer the case?
Ah, it seems the exact nature of the Has class is still being debated. I
suppose my concern places me in the pro-DORF (or at least anti-SORF)
camp. Carry on :)
More information about the Glasgow-haskell-users