Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-30 Thread Joachim Breitner
Hi, Am Mittwoch, den 29.08.2012, 17:16 +0100 schrieb Thomas Schilling: Syntactically, I'd prefer something that looks more like a function. With a pragma it's difficult to see what expression it actually affects. For example, we already have the special functions lazy and inline. Since

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-30 Thread Thomas Schilling
On 30 August 2012 09:34, Joachim Breitner breit...@kit.edu wrote: but from a first glance it seems that you are not using that part of GHC in your project, right? No, I don't think I can make use of your work directly. Lambdachine uses GHC up until the CorePrep phase (the last phase before

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-29 Thread Joachim Breitner
Hi, Am Dienstag, den 28.08.2012, 18:16 -0400 schrieb Carter Schonwald: On Tuesday, August 28, 2012, Yves Parès wrote: Monad? Simple strictness anotation is enough in that case: upd_noupd n = let l = myenum' 0 n h =

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-29 Thread Facundo Domínguez
macros: upd_noupd n = let# l = myenum' 0 n in last l + length l What's the strength of the {-# NOUPDATE #-} approach? Regards, Facundo Date: Wed, 29 Aug 2012 10:20:21 +0200 From: Joachim Breitner breit...@kit.edu Subject: Re: [Haskell-cafe] A first glimps

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-29 Thread Joachim Breitner
Hi Facundo, Am Mittwoch, den 29.08.2012, 10:26 -0300 schrieb Facundo Domínguez: upd_noupd n = let l = myenum' 0 n in last l + length l This could be rewritten as upd_noupd n = let l n = myenum' 0 n in last (l n) +

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-29 Thread timothyhobbs
: Joachim Breitner breit...@kit.edu Datum: 29. 8. 2012 Předmět: Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma Hi Facundo, Am Mittwoch, den 29.08.2012, 10:26 -0300 schrieb Facundo Domínguez: upd_noupd n = let l = myenum' 0 n in last l + length l This could be rewritten

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-29 Thread Thomas Schilling
On 29 August 2012 15:21, Joachim Breitner breit...@kit.edu wrote: Hi Facundo, Am Mittwoch, den 29.08.2012, 10:26 -0300 schrieb Facundo Domínguez: upd_noupd n = let l = myenum' 0 n in last l + length l This could be rewritten as

[Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-28 Thread Joachim Breitner
Dear GHC users, I am experimenting with ways to /prevent/ sharing in Haskell, e.g. to avoid space leaks or to speed up evaluation. A first attempt was to duplicate closures on the heap to preserve the original one, see http://arxiv.org/abs/1207.2017 for a detailed description and information on

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-28 Thread Carter Schonwald
Hey Joachim, isn't this an example where the exact same issue could be solved via some suitable use of a monad for ordering those two computations on l? cheers -Carter On Tue, Aug 28, 2012 at 12:44 PM, Joachim Breitner breit...@kit.edu wrote: Dear GHC users, I am experimenting with ways to

Re: [Haskell-cafe] A first glimps on the {-# NOUPDATE #-} pragma

2012-08-28 Thread Carter Schonwald
You got me there. Excellent point On Tuesday, August 28, 2012, Yves Parès wrote: Monad? Simple strictness anotation is enough in that case: upd_noupd n = let l = myenum' 0 n h = head l in h `seq` last l + h Le mardi 28 août 2012 22:39:09