On Sun, 2009-07-19 at 23:07 +0100, Thomas Schilling wrote:
2009/7/19 Max Bolingbroke batterseapo...@hotmail.com
Dear Cafe,
For fun, I spent a few hours yesterday implement support for this
syntax in GHC, originally propsed by Koen Claessen:
[k, =, v, | (k, v) - [(foo, 1), (bar,
Except that it's ugly compared to the proposed extension. With the
extension you can put things in the same, right place:
renderGhcOptions opts =
ghcOptExtraPre opts
-- source search path
++ [ -i | not (null (ghcOptSearchPath opts)) ]
++ [ -i, dir | dir - ghcOptSearchPath opts
Hello Neil,
Tuesday, July 21, 2009, 1:26:55 PM, you wrote:
++ [ -i | not (null (ghcOptSearchPath opts)) ]
++ [ -i, dir | dir - ghcOptSearchPath opts ]
Following the discussions, I now support this extension too - I keep
seeing more and more places in my code where it would be very
I'm not convinced ugly is a good reason to add more complexity to
the language syntax. I am not aware of a good metric to measure the
costs/beneficts of new syntactic constructs. Part of the costs are
the number of tools that need to be adapted and the extend of their
loss of utility if they are
Bulat Ziganshin wrote:
Hello Neil,
Tuesday, July 21, 2009, 1:26:55 PM, you wrote:
++ [ -i | not (null (ghcOptSearchPath opts)) ]
++ [ -i, dir | dir - ghcOptSearchPath opts ]
Following the discussions, I now support this extension too - I keep
seeing more and more places in my code
On Tue, Jul 21, 2009 at 12:29:18PM -0700, Dan Weston wrote:
This would mean that
[ | c ] = concat $ do { c; return [] }
The right is legal Haskell and gives []. The left is (not yet)
legal. Should it be?
Please, please, do not allow that.
People wanting [] should write [].
Thanks!
--
I think the tuple sections are a great idea! It also makes tuple types
and constructors more alike:
x :: (,) String Double
x = (,) Pi 3.14159
I can also see some uses in writing pointfree code. I would definitely
want this in a future GHC (or any other Haskell compiler/interpreter)
release.
I'm
On Mon, Jul 20, 2009 at 1:27 PM, Roel van Dijkvandijk.r...@gmail.com wrote:
I think the tuple sections are a great idea! It also makes tuple types
and constructors more alike:
x :: (,) String Double
x = (,) Pi 3.14159
I just realised this is already in GHC :-) But does you patch also add
the
Roel van Dijk wrote:
On Mon, Jul 20, 2009 at 1:27 PM, Roel van
Dijkvandijk.r...@gmail.com wrote:
I think the tuple sections are a great idea! It also makes tuple
types and constructors more alike:
x :: (,) String Double
x = (,) Pi 3.14159
I just realised this is already in GHC :-) But
I am also wondering what the following would/should mean:
(1, , ( , 2), ) 'a' 'b' 'c'
I would expect it to be a type error, since I think the following is the
only sane type the tuple can have (assuming numeric literals :: Int):
(1, , ( , 2), ) :: a - b - (Int, a, c - (c, Int), b)
2009/7/20 Roel van Dijk vandijk.r...@gmail.com:
I just realised this is already in GHC :-) But does you patch also add
the equivalent for tuple type annotations?
x :: (String, ) Double
x = (Pi, ) 3.14159
It doesn't, and indeed it would only work in the special case where
your only missing
Excerpts from Max Bolingbroke's message of Sun Jul 19 16:58:08 +0200 2009:
Dear Cafe,
For fun, I spent a few hours yesterday implement support for this
syntax in GHC, originally propsed by Koen Claessen:
[...]
P.S. I also implemented tuple sections
2009/7/21 Roel van Dijk vandijk.r...@gmail.com:
I am also wondering what the following would/should mean:
(1, , ( , 2), ) 'a' 'b' 'c'
I would expect it to be a type error, since I think the following is the
only sane type the tuple can have (assuming numeric literals :: Int):
(1, , ( , 2),
Dear Cafe,
For fun, I spent a few hours yesterday implement support for this
syntax in GHC, originally propsed by Koen Claessen:
[k, =, v, | (k, v) - [(foo, 1), (bar, 2)]
[foo, =, 1, , bar, =, 2, ]
This is a generalisation of list comprehensions that allows several
items to be concatenated
Hi Max,
For fun, I spent a few hours yesterday implement support for this
syntax in GHC, originally propsed by Koen Claessen:
[k, =, v, | (k, v) - [(foo, 1), (bar, 2)]
[foo, =, 1, , bar, =, 2, ]
This is a generalisation of list comprehensions that allows several
items to be
I vote for tuple sections. Very nice!
I don't really see immediate places where I would use the list
comprehension improvement so I guess I don't vote for that.
2009/7/19 Neil Mitchell ndmitch...@gmail.com:
Hi Max,
For fun, I spent a few hours yesterday implement support for this
syntax in
I really like tuple sections and I've wanted them for years. I never use
comprehensions though, so I abstain from the other vote.
--
Robin
On Sun, 19 Jul 2009 08:18:48 -0700
Thomas Hartman tphya...@gmail.com wrote:
I vote for tuple sections. Very nice!
I don't really see immediate places
2009/7/19 Max Bolingbroke batterseapo...@hotmail.com
Dear Cafe,
For fun, I spent a few hours yesterday implement support for this
syntax in GHC, originally propsed by Koen Claessen:
[k, =, v, | (k, v) - [(foo, 1), (bar, 2)]
[foo, =, 1, , bar, =, 2, ]
Given that this can easily be
18 matches
Mail list logo