[Haskell-cafe] "--" comments

michael rice nowgate at yahoo.com
Fri Dec 11 23:37:54 EST 2009

Cool! Didn't know that, and the Haskell syntax I looked up made no mention of it.



--- On Fri, 12/11/09, Daniel Peebles <pumpkingod at gmail.com> wrote:

From: Daniel Peebles <pumpkingod at gmail.com>
Subject: Re: [Haskell-cafe] "--" comments
To: "michael rice" <nowgate at yahoo.com>
Cc: haskell-cafe at haskell.org
Date: Friday, December 11, 2009, 11:33 PM

let (--*) = (+) in 5 --* 6===> 11

The comment is introduced by -- followed by a non-symbol (because if followed by a symbol, it might be an operator)

Hope this helps!


On Fri, Dec 11, 2009 at 11:30 PM, michael rice <nowgate at yahoo.com> wrote:

I'm just noticing that "--" comments don't seem to work properly when the first character following them is a '*'.


--*I like asterisks
--*I like asterisks
--*I like asterisks
--*I like asterisks

double x = x+x

Prelude> :l double

[1 of 1] Compiling Main             ( double.hs, interpreted )

double.hs:1:0: parse error on input `--*'
Failed, modules loaded: none.


Haskell-Cafe mailing list

Haskell-Cafe at haskell.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091211/65d4146f/attachment.html

More information about the Haskell-Cafe mailing list