How to read this syntax?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to read this syntax?

David Place
Hi,

I am trying to read _Arrows, Robots, and Functional Reactive  
Programming_ by Hudak, et al.

http://www.haskell.org/yampa/AFPLectureNotes.pdf

In section 2.1 there are a number of equations of the form:

g’ :: SF A C
g’ = arr g
     = arr f1 >>> arr f2

and

i’ :: SF (A,C) (B,D)
i’ = arr i
    = arr (f1 . fst) &&& arr (f2 . snd)
    = (arr fst >>> arr f1) &&& (arr snd >>> arr f2)

I can't find any reference to the syntax where the function left hand  
side is just  "space."  I'd greatly appreciate any insight.


--------------------------------
David F. Place
mailto:[hidden email]

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: How to read this syntax?

Bugzilla from robdockins@fastmail.fm

On Dec 29, 2005, at 11:26 AM, David F. Place wrote:

> Hi,
>
> I am trying to read _Arrows, Robots, and Functional Reactive  
> Programming_ by Hudak, et al.
>
> http://www.haskell.org/yampa/AFPLectureNotes.pdf
>
> In section 2.1 there are a number of equations of the form:
>
> g’ :: SF A C
> g’ = arr g
>     = arr f1 >>> arr f2
>
> and
>
> i’ :: SF (A,C) (B,D)
> i’ = arr i
>    = arr (f1 . fst) &&& arr (f2 . snd)
>    = (arr fst >>> arr f1) &&& (arr snd >>> arr f2)
>
> I can't find any reference to the syntax where the function left  
> hand side is just  "space."  I'd greatly appreciate any insight.
>

I'm pretty sure the extra lines are assertions of equality.  That is,  
they are other ways of defining the same function.  That isn't legal  
Haskell syntax as written.

Rob Dockins

Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
           -- TMBG



_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe