List syntax (was: Re: help from the community?)

Douglas Philips dgou at mac.com
Fri Feb 2 10:36:02 EST 2007


On 2007 Feb 2, at 5:46 AM, Malcolm Wallace indited:
> Since yours is the first actual flame I can remember ever being posted
> to any Haskell list, I think this counts as the beginning of the  
> end of
> civilisation as we know it.  :-)  At least, the beginning of the  
> end of
> civilised discussion.  And couldn't you guess - over lexical  
> syntax! :-)

Guess that means civilisation is as fragile as the syntax, eh? :-)

-- from: http://www.haskell.org/onlinereport/syntax-iso.html#sectB.4
impspec		-> 	 ( import1 , ... , importn [ , ] ) 	 (n>=0)
		| 	 hiding ( import1 , ... , importn [ , ] ) 	 (n>=0)
exports 	-> 	 ( export1 , ... , exportn [ , ] ) 	 (n>=0)

stmts		-> 	 stmt1 ... stmtn exp [ ; ] 	 (n>=0)
stmt		-> 	exp ;
		| 	pat <- exp ;
		| 	let decls ;
		| 	; 	(empty statement)


...


What would be the proper way to propose that:
	| ( exp1 , ... , expk )		(tuple, k>=2)
	| [ exp1 , ... , expk ]		(list, k>=1)
be amended to:
	| ( exp1 , ... , expk [ , ] )		(tuple, k>=2)
	| [ exp1 , ... , expk [ , ] ]		(list, k>=1)


	--D'gou



More information about the Haskell-prime mailing list