Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Copy record with mutations? (Andrew n marshall)
   2.  install from Hachage (Luca Ciciriello)


----------------------------------------------------------------------

Message: 1
Date: Thu, 21 Apr 2011 17:37:01 -0700
From: Andrew n marshall <[email protected]>
Subject: Re: [Haskell-beginners] Copy record with mutations?
To: Chadda? Fouch? <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8; format=flowed


Thanks for the follow-up.

While I'm still getting used to reading/writing the numerous new 
operators/infix notations,  I've started looking into the Data.Accessor 
package.  Is this similar in scope to the lenses you're referring to?




On 4/14/11 11:14 AM, Chadda? Fouch? wrote:
> On Wed, Apr 13, 2011 at 5:22 PM, Andrew n marshall
> <[email protected]>  wrote:
>> Is there a syntax or function to copy a record, but with select fields
>> populated with new values?
>> For example, extending LYAH's Car
>>
>> let stang67 = Car {company="Ford", model="Mustang", year=1967}
>> let stang68 = stang67 `mutate` Car {year=1968}
>>
> The classic solution is simply :
>
>> let stang68 = stang67  {year=1968}
> but that is not very convenient (not at all in fact) when for instance
> you have several nested records or you want to base the "new" value of
> a field on its "old" value. Thus was invented the concept of
> "functional references" or "lenses" which extend this mechanism by a
> more complete and convenient protocol to copy a record with
> modification on some of its field.
> See
>
> http://hackage.haskell.org/package/fclabels
>
> http://www.cis.upenn.edu/~bcpierce/papers/newlenses-popl.pdf
>
> There are plenty of lenses packages on Hackage, I don't know which are
> more used, maybe some that uses them could help here ?
>




------------------------------

Message: 2
Date: Fri, 22 Apr 2011 09:32:52 +0100
From: Luca Ciciriello <[email protected]>
Subject: [Haskell-beginners] install from Hachage
To: <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"


Hi All.
I have to programmatically build and install a HachageDB package.
I've found some examples using "Distribution.Simple.SetupWrapper" but this 
module is no longer available in Cabal 1.10.x
Is there something equivalent I can use?
 
Thanks in advance for any answer.
 
Luca.                                     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20110422/14df1097/attachment-0001.htm>

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 34, Issue 35
*****************************************

Reply via email to