On 2006-02-04 at 21:15GMT Brian Hulley wrote:
Stefan Holdermans wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Brian wrote:
I think the mystery surrounding :: and : might have been that
originally people thought type annotations would hardly ever be
needed whereas list cons
On Sat, Feb 04, 2006 at 07:02:52PM -0500, [EMAIL PROTECTED] wrote:
G'day all.
Hello!
Quoting Tomasz Zielonka [EMAIL PROTECTED]:
Probably it was anticipated that right associative version will
be more useful. You can use it to create a chain of transformations,
similar to a chain of
On Sun, Feb 05, 2006 at 02:27:45AM +, Ben Rudiak-Gould wrote:
No one has mentioned yet that it's easy to change the associativity of $
within a module in Haskell 98:
import Prelude hiding (($))
infixl 0 $
f$x = f x
or, for the purists,
import Prelude hiding
Jon Fairbairn wrote:
Brian Hulley wrote:
snip
Not exactly alone; I've felt it was wrong ever since we
argued about it for the first version of Haskell. : for
typing is closer to common mathematical notation.
But it's far too late to change it now.
- it's just syntax after all
Well I'm
Tomasz Zielonka wrote:
The only problem I see right now is related to change locality. If I
have a chain like this:
f x y .
g x $
z
and I want to add some transformation between g and z I have to
change one line and insert another
f x y .
g x .
h x y $
z
With
Quoting Paul Hudak [EMAIL PROTECTED]:
Actually, one of the main reasons that we chose (:) is that that's what
Miranda used. So, at the time at least, it was not entirely clear what
the de facto universal inter-language standard was.
Phil Wadler argued for the ML convention at the time,
John Hughes wrote:
Quoting Paul Hudak [EMAIL PROTECTED]:
Actually, one of the main reasons that we chose (:) is that that's what
Miranda used. So, at the time at least, it was not entirely clear what
the de facto universal inter-language standard was.
Phil Wadler argued for the ML
Lennart Augustsson wrote:
I now think :: for type signatures was a bad mistake.
I don't use lists very much. They are not the right data structure
for many things. So : is not as common as :: in my code.
I checked a small sample of code, about 2 lines of Haskell.
It has about 1000
John Hughes wrote:
What, no list comprehensions??
No. I think the do notation is good enough.
I'd disagree--sequencing is special, and lists represent it directly.
Don't forget, also, that lists are also much more prevalent in beginners'
code--and nice notation for beginners helps get
On Sun, Feb 05, 2006 at 10:45:50AM -0500, Lennart Augustsson wrote:
I don't really see what's so much better about writing
[x1,x2,x3,x4,x5] than x1:x2:x3:x4:x5:[].
When I've explained lists to beginners I've just found it
annoying and hard to explain why there are two ways of
writing lists.
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 01:14:42PM -, Brian Hulley wrote:
How about:
f x y
. g x
$ z
then you only need to add the line
. h x y
But then you have a problem when you when you want to add something
at the beginning ;-) With right-assoc $ adding
Bulat Ziganshin wrote:
LA In my opinion all the special syntactic sugar for lists should go
LA away. I don't think lists are special enough to motivate it.
i have proposal (not for Haskell', of course) of using : and []
syntax for general notion of traversable collections:
Minor point,
On Sun, Feb 05, 2006 at 04:36:44PM -, Brian Hulley wrote:
Just in case you are interested, in the preprocessor I'm writing, I would
write these examples as:
(.) #
f x y
g x
h x y
$ z
and
a = #[
Brian Hulley wrote:
Brian Hulley wrote:
Robin Green wrote:
snip
So simply make strictness the default and have laziness annotations
(for arguments), instead of making laziness the default and having
strictness annotations.
Where would you put these laziness annotations?
If you put them in
On 2006-02-05, Brian Hulley [EMAIL PROTECTED] wrote:
Jon Fairbairn wrote:
Brian Hulley wrote:
snip
Not exactly alone; I've felt it was wrong ever since we
argued about it for the first version of Haskell. : for
typing is closer to common mathematical notation.
But it's far too late to
Hello Brian,
Saturday, February 04, 2006, 4:50:44 AM, you 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
keyword
On Sun, Feb 05, 2006 at 05:18:55PM -, Brian Hulley wrote:
I must admit I'm a bit confused as to why the strictness annotations in
Haskell (and Clean) are only allowed in data declarations and not function
declarations
Clean does allow strictness annotations in function types.
Best
On Sun, Feb 05, 2006 at 01:10:24PM -, Brian Hulley wrote:
2) Use , instead of ; in the block syntax so that all brace blocks can
be replaced by layout if desired (including record blocks)
Wouldn't it be better to use ; instead of , also for record syntax?
Best regards
Tomasz
--
I am
Bulat Ziganshin wrote:
Hello Brian,
Saturday, February 04, 2006, 4:50:44 AM, you 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.
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 01:10:24PM -, Brian Hulley wrote:
2) Use , instead of ; in the block syntax so that all brace
blocks can be replaced by layout if desired (including record blocks)
Wouldn't it be better to use ; instead of , also for record syntax?
I
Paul Hudak wrote:
Minor point, perhaps, but I should mention that : is not special syntax
-- it is a perfectly valid infix constructor.
But Haskell 98 does treat it specially: you can't import Prelude hiding
((:)), or rebind it locally, or refer to it as Prelude.:. In fact I've
always
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 01:14:42PM -, Brian Hulley wrote:
How about:
f x y
. g x
$ z
But then you have a problem when you when you want to add something
at the beginning ;-)
How about:
id
. f x y
. g x
$ z
-- Ben
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 05:18:55PM -, Brian Hulley wrote:
I must admit I'm a bit confused as to why the strictness annotations
in Haskell (and Clean) are only allowed in data declarations and not
function declarations
Clean does allow strictness annotations in
On Sun, Feb 05, 2006 at 06:58:15PM +, Ben Rudiak-Gould wrote:
Tomasz Zielonka wrote:
But then you have a problem when you when you want to add something
at the beginning ;-)
How about:
id
. f x y
. g x
$ z
Yes, I've thought about it. You are using a neutral element
On Fri, Feb 03, 2006 at 07:55:30AM +0100, Gracjan Polak wrote:
Hi,
I would be iterested in seeing what you have done. And maybe helping
in getting it to work.
I did not find the examples :) Many links seem to be broken on HDirect
page.
Hi. I have finished. It took some more
Ben Rudiak-Gould wrote:
Paul Hudak wrote:
Minor point, perhaps, but I should mention that : is not special
syntax -- it is a perfectly valid infix constructor.
snip
... but no more confusing than the fact that [f x | x - xs] is
not the same as (map f xs).
Can you explain why? On page 258
Brian Hulley wrote:
Ben Rudiak-Gould wrote:
Paul Hudak wrote:
Minor point, perhaps, but I should mention that : is not special
syntax -- it is a perfectly valid infix constructor.
snip
... but no more confusing than the fact that [f x | x - xs] is
not the same as (map f xs).
Can you
On Sun, 2006-02-05 at 13:49 +0100, Tomasz Zielonka wrote:
. . .
and I want to add some transformation between g and z I have to
change one line and insert another
f x y .
g x .
h x y $
z
With right-associative $ it would be only one line-add. Probably not a
very
On Feb 5, 2006, at 2:02 PM, Brian Hulley wrote:
...
I wonder if current compilation technology for lazy Haskell (or
Clean) has reached the theoretical limits on what is possible for
the compiler to optimize away, or if it is just that optimization
has not received so much attention as
Tomasz Zielonka wrote:
On Sun, Feb 05, 2006 at 04:36:44PM -, Brian Hulley wrote:
Just in case you are interested, in the preprocessor I'm writing,
I would write these examples as:
(.) #
f x y
g x
h x y
$ z
and
a =
Ben Rudiak-Gould wrote:
Paul Hudak wrote:
Minor point, perhaps, but I should mention that : is not special
syntax -- it is a perfectly valid infix constructor.
But Haskell 98 does treat it specially: you can't import Prelude hiding
((:)), or rebind it locally, or refer to it as Prelude.:. In
Chris Kuklewicz wrote:
Brian Hulley wrote:
Ben Rudiak-Gould wrote:
... but no more confusing than the fact that [f x | x - xs] is
not the same as (map f xs).
Can you explain why? On page 258 of Paul Hudak's book The Haskell
School of Expression he states that do x- xs; return (f x) is
On Sun, Feb 05, 2006 at 06:50:57PM +, Ben Rudiak-Gould wrote:
Paul Hudak wrote:
Minor point, perhaps, but I should mention that : is not special syntax
-- it is a perfectly valid infix constructor.
But Haskell 98 does treat it specially: you can't import Prelude hiding
((:)), or
On 05/02/06, Lennart Augustsson [EMAIL PROTECTED] wrote:
John Hughes wrote:
What, no list comprehensions??
No. I think the do notation is good enough.
I'd disagree--sequencing is special, and lists represent it directly.
Don't forget, also, that lists are also much more prevalent in
On 05/02/06, Jan-Willem Maessen [EMAIL PROTECTED] wrote:
On Feb 5, 2006, at 2:02 PM, Brian Hulley wrote:
...
I wonder if current compilation technology for lazy Haskell (or
Clean) has reached the theoretical limits on what is possible for
the compiler to optimize away, or if it is just
Cale Gibbard wrote:
That said, I'd *really* like to see monad comprehensions come back,
since they align better with the view that monads are container types,
dual to the view that monads are computations, which is supported by
the do-syntax. This view is actually much easier to teach (in my
On Sun, Feb 05, 2006 at 05:18:55PM -, Brian Hulley wrote:
I must admit I'm a bit confused as to why the strictness annotations in
Haskell (and Clean) are only allowed in data declarations and not function
declarations, since it seems a bit random to have to guess which args can
be
37 matches
Mail list logo