Re: Newbie: Difference between $= and <- operators?

Jeff Heard <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
the $= only works for OpenGL state variables, whereas <- won't work
for them.  The difference is that $= is implemented by every member of
the SettableStateVar class differently, so that there may be extra
functionality going on under the hood.  The <- operator on the other
hand always has the same meaning (relatively speaking -- it's possible
to override this), in that it is a substitude for

a <- someAction

is the same as

someAction >>= \a -> {- the rest of the do expression -}

-- Jeff

2009/3/20 Mark Spezzano <[email protected]>:
> Hi,
>
>
>
> What is the difference between the $= operator and the <- operator
>
>
>
> Both seem to read “assign to” but surely there is a difference.
>
>
>
> What should I use when?
>
>
>
> I want to create an animation that reads some coordinate (state-ful) data.
>
>
>
> Should I use $= or <- ?
>
>
>
> Cheers,
>
>
>
> Mark Spezzano
>
>
>
> No virus found in this outgoing message.
> Checked by AVG.
> Version: 7.5.557 / Virus Database: 270.11.20/2012 - Release Date: 19/03/2009
> 12:26 PM
>
> _______________________________________________
> HOpenGL mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/hopengl
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.