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

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 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-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 the

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 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 issues

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

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 data

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

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 computations.

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 sole

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 that in

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 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 bang

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 can define

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 easy