On Wed, 2008-09-10 at 21:32 -0300, Mauricio wrote:
> Do you have any reference for that use of infixing
> constructors by start their name with ':'?
> (...)
>
> > (...) for data constructors, go to
> >
> > http://haskell.org/onlinereport/lexemes.html
> >
> > and search for `O
On 11 Sep 2008, at 3:54 am, Brandon S. Allbery KF8NH wrote:
I think that only counts as the origin of the idea; isn't :-prefixed
infix constructors a ghc-ism?
Haskell 98 report, page 10:
"An operator symbol starting with a colon is a constructor".
(I seem to have four copies of the report on
Do you have any reference for that use of infixing
constructors by start their name with ':'?
(...)
> (...) for data constructors, go to
>
> http://haskell.org/onlinereport/lexemes.html
>
> and search for `Operator symbols'. (...)
Here it is:
“Operator symbols are formed from o
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
> >> interest
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
Hello Mauricio,
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
--
Best regards,
Bulat
(...)
* Since a data constructor can be an infix operator (either spelled with
backticks or a symbolic name beginning with ':' ) we can also write our
patterns with infix notation.
(...)
(Slightly off-topic?)
Do you have any reference for that use of infixing
constructors by start their na
Justin Bailey wrote:
2008/9/8 Daryoush Mehrtash <[EMAIL PROTECTED]>
> Thanks.
>
> Pattern matching and memory management in Haskell (or may be GHC
> implementation of it) is somewhat of a mystery to me. Are there
> any references that explains the underlying implementation?
Be careful what you
2008/9/8 Daryoush Mehrtash <[EMAIL PROTECTED]>
>
> Thanks.
>
> Pattern matching and memory management in Haskell (or may be GHC
> implementation of it) is somewhat of a mystery to me. Are there any
> references that explains the underlying implementation?
>
> Daryoush
Be careful what you ask fo
Thanks.
Pattern matching and memory management in Haskell (or may be GHC
implementation of it) is somewhat of a mystery to me. Are there any
references that explains the underlying implementation?
Daryoush
On Mon, Sep 8, 2008 at 6:37 PM, Mauricio <[EMAIL PROTECTED]> wrote:
>
> abs (Pt {poi
abs (Pt {pointx = x, pointy = y}) = sqrt (x*x + y+y)
Why is it pointx=x and not x=pointx?
Your intuition is probably telling you that this
is something like:
abs (point) = sqrt (x*x+y*y)
where {x=pointx point ; y=pointy point}
Actually, it's an example of pattern matching:
abs (Pt
11 matches
Mail list logo