Re: Wanted: unified annotation syntax, was: Re: strict Haskell dialect

2006-02-10 Thread isaac jones
On Thu, 2006-02-02 at 09:29 +0100, Johannes Waldmann wrote: > John Meacham wrote: > > > module $hat.Foo(..) where ... > > Before we invent more ad-hoc notation for annotations > (we already have deriving, {-# .. #-}, {-! .. -!} (DrIFT) ) > can we replace all (or most) of this with a unified annot

Re[2]: [Haskell-cafe] extending bang proposal Re: strict Haskell dialect

2006-02-06 Thread Bulat Ziganshin
Hello Robert, Monday, February 06, 2006, 8:40:11 PM, you wrote: foo :: !Int -> !Int >> btw, it's just implemented in the GHC HEAD >> RD> Actually, I think strict _patterns_ are implemented. You are talking RD> about strict _type annotations_, which is rather different. yes, i was wrong

Re: [Haskell-cafe] extending bang proposal Re: strict Haskell dialect

2006-02-06 Thread Robert Dockins
On Feb 6, 2006, at 9:19 AM, Bulat Ziganshin wrote: Hello Ketil, Monday, February 06, 2006, 4:06:35 PM, you wrote: foo :: !Int -> !Int KM> (Is the second ! actually meaningful?) yes! it means that the function is strict in its result - i.e. can't return undefined value when strict argume

extending bang proposal Re: strict Haskell dialect

2006-02-06 Thread Bulat Ziganshin
Hello Ketil, Monday, February 06, 2006, 4:06:35 PM, you wrote: >> foo :: !Int -> !Int KM> (Is the second ! actually meaningful?) yes! it means that the function is strict in its result - i.e. can't return undefined value when strict arguments are given. this sort of knowledge should help a comp

Re: [Haskell-cafe] Re[2]: strict Haskell dialect

2006-02-04 Thread Jan-Willem Maessen
On Feb 3, 2006, at 8:16 PM, Brian Hulley wrote: Jan-Willem Maessen wrote: I pointed out some problems with strict Haskell in a recent talk, but I think it'd be worth underscoring them here in this forum. Is the text of this talk or points raised in it available online anywhere? There i

Re[2]: strict Haskell dialect

2006-02-04 Thread Bulat Ziganshin
Hello Tomasz, Saturday, February 04, 2006, 12:39:38 PM, you wrote: >> > make a strict Haskell dialect. TZ> I am with you. If Haskell switches to strictness, as i said, strict _dialect_ is interesting for optimization, moving from other languages and making strict variants of dat

Re: strict Haskell dialect

2006-02-04 Thread Ben Rudiak-Gould
Wolfgang Jeltsch wrote: Since laziness often allows you to solve problems so elegantly, I'm really scared of the idea of a "Strict Haskell"! :-( Is laziness really so "unreal" that real-world programmers have to see it as an enemy which they have to fight against? Non-strictness gives you so

Re: strict Haskell dialect

2006-02-04 Thread Ben Rudiak-Gould
Chris Kuklewicz wrote: Weak uses seq to achieve WHNF for it's argument newtype Weak a = WeakCon {runWeak :: a} mkWeak x = seq x (WeakCon x) unsafeMkWeak x = WeakCon x This doesn't actually do what you think it does. mkWeak and unsafeMkWeak are the same function. mkWeak 123 = seq 123 (W

Re: strict Haskell dialect

2006-02-04 Thread Tomasz Zielonka
On Thu, Feb 02, 2006 at 11:46:56PM +0100, Wolfgang Jeltsch wrote: > Am Mittwoch, 1. Februar 2006 11:49 schrieb Bulat Ziganshin: > > [...] > > > i had one idea, what is somewhat corresponding to his discussion: > > > > make a strict Haskell dialect. implement it by t

Re: [Haskell-cafe] Re[2]: strict Haskell dialect

2006-02-03 Thread John Meacham
On Fri, Feb 03, 2006 at 07:33:12PM -, Brian Hulley wrote: > One question is how to get some kind of "do" notation that would work well > in a strict setting. > The existing "do" notation makes use of lazyness in so far as the second > arg of >> is only evaluated when needed. Perhaps a new ke

Re: Wanted: unified annotation syntax, was: Re: strict Haskell dialect

2006-02-03 Thread Dinko Tenev
I'll second that. I'll just throw in that not all pragmas ({-# ... #-}) are really annotations, because they do not necessarily pertain to one particular entity each. Some could be attached -- e.g. DEPRECATED, INLINE / NOINLINE, SPECIALIZE. Others, however, couldn't -- say, rewrite rules -- and

Re[2]: strict Haskell dialect

2006-02-03 Thread Bulat Ziganshin
Hello Wolfgang, Friday, February 03, 2006, 1:46:56 AM, you wrote: >> i had one idea, what is somewhat corresponding to this discussion: >> >> make a strict Haskell dialect. implement it by translating all >> expressions of form "f x" into "f $! x" and

Re: strict Haskell dialect

2006-02-02 Thread Wolfgang Jeltsch
Am Mittwoch, 1. Februar 2006 11:49 schrieb Bulat Ziganshin: > [...] > i had one idea, what is somewhat corresponding to his discussion: > > make a strict Haskell dialect. implement it by translating all > expressions of form "f x" into "f $! x" and then goi

Re[2]: strict Haskell dialect

2006-02-02 Thread Bulat Ziganshin
Hello John, Thursday, February 02, 2006, 4:24:06 AM, you wrote: >> It can, but so far it's really ugly to apply transformations to entire >> modules. A little syntactic sugar could be good there. JM> module $hat.Foo(..) where JM> ... JM> could mean pass the entire module through the 'hat' funct

Wanted: unified annotation syntax, was: Re: strict Haskell dialect

2006-02-02 Thread Johannes Waldmann
John Meacham wrote: > module $hat.Foo(..) where ... Before we invent more ad-hoc notation for annotations (we already have deriving, {-# .. #-}, {-! .. -!} (DrIFT) ) can we replace all (or most) of this with a unified annotation syntax, e. g. Java uses "@" notation which is basically allowed at a

Re: strict Haskell dialect

2006-02-01 Thread John Meacham
On Wed, Feb 01, 2006 at 03:44:37PM +, Philippa Cowderoy wrote: > It can, but so far it's really ugly to apply transformations to entire > modules. A little syntactic sugar could be good there. module $hat.Foo(..) where ... could mean pass the entire module through the 'hat' function of TH. t

Re: strict Haskell dialect

2006-02-01 Thread Philippa Cowderoy
On Wed, 1 Feb 2006, Creighton Hogg wrote: > I apologize in advance if I say something silly, but > wouldn't such a language transformation be a use for > Template Haskell? Superficially, it seems like you should > be able to do that. > It can, but so far it's really ugly to apply transformat

Re: strict Haskell dialect

2006-02-01 Thread Creighton Hogg
gt; I don't think this is true. I think there would just be a whole lot of a > JM> different type of space leak. Lazy by default is more in the spirit of > JM> haskell. > > i had one idea, what is somewhat corresponding to his discussion: > > make a strict Haskell dialect.

strict Haskell dialect

2006-02-01 Thread Bulat Ziganshin
different type of space leak. Lazy by default is more in the spirit of JM> haskell. i had one idea, what is somewhat corresponding to his discussion: make a strict Haskell dialect. implement it by translating all expressions of form "f x" into "f $! x" and then going to th