[HOpenGL] Newbie: Difference between $= and <- operators?

Jeff Heard jefferson.r.heard at gmail.com
Fri Mar 20 12:00:57 EDT 2009


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 <mark.spezzano at chariot.net.au>:
> 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
> HOpenGL at haskell.org
> http://www.haskell.org/mailman/listinfo/hopengl
>
>


More information about the HOpenGL mailing list