[prev in list] [next in list] [prev in thread] [next in thread]
List: haskell-cafe
Subject: [Haskell-cafe] Re: Syntax for modifying nested product types
From: Ferenc Wagner <wferi () afavant ! elte ! hu>
Date: 2004-04-23 21:47:11
Message-ID: 3o1xmefjts.fsf () tba ! elte ! hu
[Download RAW message or body]
Graham Klyne <GK@ninebynine.org> writes:
> At 18:18 22/04/04 -0400, Mark Carroll wrote:
>
>> I have data objects where each component is a labelled
>> field through which I access or modify it.
>
> Wading into the labelled field debate...
>
> I have found that using the labelled field update syntax
> can lead to difficulties in changing the underlying
> implementation of a type.
Yeah, interesting this topic came up exactly when I got mad
with record updates. I'd like to fill in a record from a
file which contains labels and values. I'd like to give the
gist of this operation as a list of pairs:
[("label1", label1), ("label2", label2), ...]
and abstract away the operation of updating the field. I
couldn't find a way. Basically, I couldn't write an update
function parametrized by the field name. Is it possible at
all?
--
Feri.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic