Re: Strict tuples

2006-03-23 Thread Wolfgang Jeltsch
Am Mittwoch, 22. März 2006 14:19 schrieb Bulat Ziganshin: > Hello Wolfgang, > > you said WHAT you think but not said WHY? my motivation is to be able > to use myriads of already implemented algorithms on new datatypes I think, I already tried to explain why I think the way I think in an earlier m

RE: Strict tuples

2006-03-23 Thread Simon Marlow
On 23 March 2006 02:24, Ben Rudiak-Gould wrote: > Bulat Ziganshin wrote: >> Taral wrote: >>> I don't see that more optimization follows from the availability >>> of information regarding the strictness of a function result's >>> subcomponents. >> >> ghc uses unboxed tuples just for such sort of o

Re: Strict tuples

2006-03-22 Thread Ben Rudiak-Gould
Bulat Ziganshin wrote: Taral wrote: T> I don't see that more optimization follows from the availability T> of information regarding the strictness of a function result's T> subcomponents. ghc uses unboxed tuples just for such sort of optimizations. instead of returning possibly-unevaluated pair

Re: Strict tuples

2006-03-22 Thread Ben Rudiak-Gould
John Meacham wrote: ghc's strictness analyzer is pretty darn good, If something is subtle enough for the compiler not to catch it, then the programmer probably won't right off the bat either. Even the best strictness analyzer can't determine that a function is strict when it really isn't. The

RE: Strict tuples

2006-03-22 Thread John Hughes
<>From: "Simon Marlow" <[EMAIL PROTECTED]> <>After some thought, I find myself with a similar view to John. Strict <>tuples are starting to feel like real language bloat, one tiny addition <>too much. <> <>Remember, every addition we make to the core syntax is multiplied by a

Re: Strict tuples

2006-03-21 Thread Taral
On 3/18/06, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > Of course, the caller could invoke addmul using a bang patterns, as in > > let ( !s, !p ) = addmul x y > in ... > > but that's quite different to statically knowing (from the type) that > the two results of addmul will already be e

Re: Strict tuples

2006-03-21 Thread Wolfgang Jeltsch
Am Dienstag, 21. März 2006 11:28 schrieb Bulat Ziganshin: > [...] > as i said, shebang patterns allow only to specify that IMPLEMENTATION > of some function is strict. this helps only when this function are > called directly. they can't help when function is passed as parameter > or enclosed in da

Re: Strict tuples

2006-03-21 Thread John Meacham
On Tue, Mar 21, 2006 at 02:27:37PM -0500, Manuel M T Chakravarty wrote: > > strictness does not belong in the type system in general. strictness > > annotations are attached to the data components and not type components > > in data declarations because they only affect the desugaring of the > > co

Re: Strict tuples

2006-03-21 Thread Manuel M T Chakravarty
John Meacham: > On Mon, Mar 20, 2006 at 09:39:41AM -0500, Manuel M T Chakravarty wrote: > > Apart from the syntactic issues, does anybody else support the idea of > > strict tuples as proposed? I just want to know whether I am alone on > > this before putting it on the wiki. > > I have a few issu

Re: Strict tuples

2006-03-21 Thread Josef Svenningsson
On 3/21/06, Simon Marlow <[EMAIL PROTECTED]> wrote: By all means have strict tuples in a library somewhere.  They don't needto have special syntax. I have a module Data.Pair which provides pairs with different strictness properties. Perhaps it can be used as a startingpoint. Cheers,/Josef -

RE: Strict tuples

2006-03-21 Thread Simon Marlow
On 21 March 2006 03:10, John Meacham wrote: > On Mon, Mar 20, 2006 at 09:39:41AM -0500, Manuel M T Chakravarty > wrote: >> Apart from the syntactic issues, does anybody else support the idea >> of strict tuples as proposed? I just want to know whether I am >> alone on this before putting it on t

Re: Strict tuples

2006-03-20 Thread John Meacham
On Mon, Mar 20, 2006 at 09:39:41AM -0500, Manuel M T Chakravarty wrote: > Apart from the syntactic issues, does anybody else support the idea of > strict tuples as proposed? I just want to know whether I am alone on > this before putting it on the wiki. I have a few issues though, not entirely ea

Re: Strict tuples

2006-03-20 Thread Wolfgang Jeltsch
Am Sonntag, 19. März 2006 15:53 schrieb Bulat Ziganshin: > Hello Manuel, > > Sunday, March 19, 2006, 5:35:12 AM, you wrote: > > MMTC> PS: IIRC Clean supports strict tuples. > > i've proposed to allow adding strict mark to any type constructors and > type constructor parameters so that finally we ca

Re: Strict tuples

2006-03-20 Thread Sebastian Sylvan
On 3/20/06, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > Sebastian Sylvan: > > On 3/19/06, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > > > Loosely related to Ticket #76 (Bang Patterns) is the question of whether > > > we want the language to include strict tuples. It is related to b

Re: Strict tuples

2006-03-20 Thread Manuel M T Chakravarty
Sebastian Sylvan: > On 3/19/06, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > > Loosely related to Ticket #76 (Bang Patterns) is the question of whether > > we want the language to include strict tuples. It is related to bang > > patterns, because its sole motivation is to simplify enforcing

RE: Strict tuples

2006-03-20 Thread Manuel M T Chakravarty
Simon Marlow: > Not to mention overlap with sections: (!i). Even with just bang > patterns, we have some interesting parsing problems due to the overlap > with infix '!'. eg., now > > arr ! x = indexArray arr x > > will probably parse as > > arr (!x) = indexArray arr x > > which means t

Re: Strict tuples

2006-03-20 Thread Sebastian Sylvan
On 3/20/06, Sebastian Sylvan <[EMAIL PROTECTED]> wrote: > On 3/19/06, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > > Loosely related to Ticket #76 (Bang Patterns) is the question of whether > > we want the language to include strict tuples. It is related to bang > > patterns, because its so

Re: Strict tuples

2006-03-20 Thread Sebastian Sylvan
On 3/19/06, Manuel M T Chakravarty <[EMAIL PROTECTED]> wrote: > Loosely related to Ticket #76 (Bang Patterns) is the question of whether > we want the language to include strict tuples. It is related to bang > patterns, because its sole motivation is to simplify enforcing > strictness for some com

RE: Strict tuples

2006-03-20 Thread Simon Marlow
On 19 March 2006 02:35, Manuel M T Chakravarty wrote: > Loosely related to Ticket #76 (Bang Patterns) is the question of > whether we want the language to include strict tuples. It is related > to bang patterns, because its sole motivation is to simplify enforcing > strictness for some computatio

RE: Strict tuples

2006-03-20 Thread Simon Marlow
On 19 March 2006 14:53, Bulat Ziganshin wrote: > Hello Manuel, > > Sunday, March 19, 2006, 5:35:12 AM, you wrote: > > MMTC> PS: IIRC Clean supports strict tuples. > > i've proposed to allow adding strict mark to any type constructors and > type constructor parameters so that finally we can defi

Re: Strict tuples

2006-03-19 Thread Bulat Ziganshin
Hello Manuel, Sunday, March 19, 2006, 5:35:12 AM, you wrote: MMTC> PS: IIRC Clean supports strict tuples. i've proposed to allow adding strict mark to any type constructors and type constructor parameters so that finally we can define any data structure that can be defined in strict languages. i