[Haskell-cafe] Re: Field names
Jonathan Cast
jonathanccast at fastmail.fm
Wed Sep 10 11:57:27 EDT 2008
On Wed, 2008-09-10 at 11:54 -0400, Brandon S. Allbery KF8NH wrote:
> On 2008 Sep 10, at 8:53, Bulat Ziganshin wrote:
> > Wednesday, September 10, 2008, 4:07:41 PM, you wrote:
> >> Do you have any reference for that use of infixing
> >> constructors by start their name with ':'? That's
> >> interesting, and I didn't know about it.
> >
> > really? ;)
> >
> > sum (x:xs) = x + sum xs
> > sum [] = 0
>
>
> I think that only counts as the origin of the idea; isn't :-prefixed
> infix constructors a ghc-ism?
>
> http://www.haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#infix-tycons
That link is for type constructors, not data constructors; for data
constructors, go to
http://haskell.org/onlinereport/lexemes.html
and search for `Operator symbols'. (The Haskell 98 Report seems to not
have internal anchor tags for hot-linking, unfortunately).
jcc
More information about the Haskell-Cafe
mailing list