Call for Nominations: Haskell Prime language committee

2013-02-04 Thread Malcolm Wallace
Dear Haskell lovers,

The Haskell Prime process for standardisation of new versions of the Haskell 
language is at something of an impasse.  Since the Haskell 2010 Report was 
issued (at the end of 2009), there has been very little momentum to formalise 
existing extensions and generalisations, nor appetite to decide on whether any 
such extensions should be adopted as part of the core language standard.

We therefore seek nominations for new members of the Haskell Prime language 
committee; people who have the enthusiasm to take this forward, as well as some 
relevant experience.

If you think you would like to contribute, please nominate yourself by sending 
a email to

haskell-2011-commit...@haskell.org

describing who you are, and what you think the committee might hope to achieve. 
 The address above
is populated by the existing committee members, but is now (temporarily) open 
to all during the nomination period.  Nominations close in 3 weeks time, i.e. 
to be received by end of Sunday 24th February 2013.

The process for deciding a new language committee is described at

http://hackage.haskell.org/trac/haskell-prime/wiki/Committee

Regards,
Malcolm

___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: Bang patterns

2013-02-04 Thread Johan Tibell
On Sun, Feb 3, 2013 at 4:44 PM, Ben Millwood hask...@benmachine.co.uk wrote:
 I have two proposals, I suppose:
 - make bang patterns in let altogether invalid

I would prefer it to be valid. It's the syntactically most lightweight
option we have to force some thunks before using the resulting values
in a constructor that we have. Example

let !x = ...
!y = ...
in C x y

The alternative would be

let x = ...
y = ...
in x `seq` y `seq` C x y

which obscures the code much more.

My 2 cents.

-- Johan

___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


RE: Bang patterns

2013-02-04 Thread Simon Peyton-Jones
|   I have two proposals, I suppose:
|   - make bang patterns operate only on variables and wildcards
|   - make bang patterns in let altogether invalid
|  
|  Looking at this again made me realise that, as well as !_ and !varid
|  lexemes, we could also alter the decl production so that we get
|  decl - ...
|| pat rhs -- existing lazy binding production
|| '!' pat rhs -- new strict binding production
|  
|  That means that
|  let !(x, y) = e in ...
|  would still be valid, with the ! not actually being parsed as part of
|  the pattern, but would parse instead as a strict binding. 

Yes, I like this.  You could see the 
'!' pat rhs
production as cancelling the implied '~' that a let-binding usually gets (see 
the desugaring for lets in the report).

A bang really only makes sense
* At the top of a let, to cancel the implied '~'.  Like Johan I
   am very strongly in favour of using ! for this purpose.
* On a varid or '_', which otherwise match lazily
Hence Ian's proposal, which treats these two separately, makes sense.

For example, there's no point in the pattern (x, !(y,z)), because it behaves 
identically to (x, (y,z)).

We really do need to allow
f  !x  y !z = e
to mean f is strict in x and z.  There is an ambiguity here with a infix 
definition of (!), but it must be resolved in favour of the bang-pattern 
version.

I don't have a strong opinion about whether
f ! x y ! z = e
should mean the same; ie whether the space is significant.   I think it's 
probably more confusing if the space is significant (so its presence or absence 
makes a difference).

Simon



___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: Bang patterns

2013-02-04 Thread Ian Lynagh
On Mon, Feb 04, 2013 at 10:37:44PM +, Simon Peyton-Jones wrote:
 
 I don't have a strong opinion about whether
   f ! x y ! z = e
 should mean the same; ie whether the space is significant.   I think it's 
 probably more confusing if the space is significant (so its presence or 
 absence makes a difference).

I also don't feel strongly, although I lean the other way:

I don't think anyone writes f ! x when they mean f with a strict
argument x, and I don't see any particular advantage in allowing it.
In fact, I think writing that is less clear than f !x, so there is an
advantage in disallowing it.

It also means that existing code that defines a (!) operator in infix
style would continue to work, provided it puts whitespace around the !. 


Thanks
Ian


___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: Bang patterns

2013-02-04 Thread Ben Millwood

On Mon, Feb 04, 2013 at 01:21:31PM -0800, Johan Tibell wrote:

On Sun, Feb 3, 2013 at 4:44 PM, Ben Millwood hask...@benmachine.co.uk wrote:

I have two proposals, I suppose:
- make bang patterns in let altogether invalid


I would prefer it to be valid. It's the syntactically most lightweight
option we have to force some thunks before using the resulting values
in a constructor that we have. Example

   let !x = ...
   !y = ...
   in C x y

The alternative would be

   let x = ...
   y = ...
   in x `seq` y `seq` C x y

which obscures the code much more.


I'd write (C $! x) $! y. We could devise a left-associative $! to avoid 
the use of parentheses here. But my objection was only ever a mild 
unease in any case, so I'm happy to dismiss it.


Ben

___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime


Re: Bang patterns

2013-02-04 Thread Edward Kmett
If space sensitivity or () disambiguation is being used on !, could one of
these also be permitted on ~ to permit it as a valid infix term-level
operator?

That would be an amazingly valuable symbol to be able to reclaim for the
term level for equivalences, and for folks who come from other languages
where it is used like liftA2 (,) in parsing libraries, etc.

-Edward

On Mon, Feb 4, 2013 at 6:42 PM, Ian Lynagh i...@well-typed.com wrote:

 On Mon, Feb 04, 2013 at 10:37:44PM +, Simon Peyton-Jones wrote:
 
  I don't have a strong opinion about whether
f ! x y ! z = e
  should mean the same; ie whether the space is significant.   I think
 it's probably more confusing if the space is significant (so its presence
 or absence makes a difference).

 I also don't feel strongly, although I lean the other way:

 I don't think anyone writes f ! x when they mean f with a strict
 argument x, and I don't see any particular advantage in allowing it.
 In fact, I think writing that is less clear than f !x, so there is an
 advantage in disallowing it.

 It also means that existing code that defines a (!) operator in infix
 style would continue to work, provided it puts whitespace around the !.


 Thanks
 Ian


 ___
 Haskell-prime mailing list
 Haskell-prime@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-prime

___
Haskell-prime mailing list
Haskell-prime@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-prime