13

I was looking through some game code written in Haskell using the GLUT library and this operator keeps popping out everywhere. The worst part is it's completely ungooglable and I can't seem to grep out the definition of it anywhere.

Could someone point out where it is defined and what does it actually do?

("dollar equals" in the title is for future Google'ability)

Don Stewart
  • 137,316
  • 36
  • 365
  • 468
Tomas
  • 704
  • 5
  • 10

1 Answers1

9

It is un-googleable, but not un-hoogleable!

In the StateVar package, the following is defined:

class HasSetter s where -- class of all writable state variables.

($=) :: s a -> a -> IO ()

Write a new value into a state variable.

So it is the 'write' operator for settable (mutable) values. Particularly as used in OpenGL.

Don Stewart
  • 137,316
  • 36
  • 365
  • 468
  • Could you also provide the query you used in Hoogle, I can't get it to find it for me? – Tomas Apr 05 '11 at 19:14
  • 2
    @Tomas: Hoogle is a program as well as a website. The site doesn't know about GLUT, but the program will if you have it installed. – Chuck Apr 05 '11 at 19:23