1 patch for repository http://code.ouroborus.net/gloss/gloss-head:

Sun Jan 22 18:36:14 PST 2012  Thomas.DuBuisson@gmail.com
  * AllowEventCallbacksToBeIOActions

New patches:

[AllowEventCallbacksToBeIOActions
Thomas.DuBuisson@gmail.com**20120123023614
 Ignore-this: 174dfa598d26cda626cad101efbddcde
] hunk ./gloss/Graphics/Gloss/Interface/IO/Game.hs 26
         -> Int                          -- ^ Number of simulation steps to take for each second of real time.
         -> world                        -- ^ The initial world.
         -> (world -> IO Picture)        -- ^ An action to convert the world a picture.
-        -> (Event -> world -> world)    -- ^ A function to handle input events.
+        -> (Event -> world -> IO world) -- ^ A function to handle input events.
         -> (Float -> world -> IO world) -- ^ A function to step the world one iteration.
                                         --   It is passed the period of time (in seconds) needing to be advanced.
         -> IO ()
hunk ./gloss/Graphics/Gloss/Interface/Pure/Game.hs 41
         display backColor simResolution
         worldStart 
         (return . worldToPicture)
-        (\event world -> worldHandleEvent event world)
+        (\event world -> return $ worldHandleEvent event world)
         (\time  world -> return $ worldAdvance     time  world)
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 41
 	-> Int				-- ^ Number of simulation steps to take for each second of real time.
 	-> world 			-- ^ The initial world.
 	-> (world -> IO Picture)	-- ^ A function to convert the world to a picture.
-	-> (Event -> world -> world)	-- ^ A function to handle input events.
+	-> (Event -> world -> IO world)	-- ^ A function to handle input events.
 	-> (Float -> world -> IO world)	-- ^ A function to step the world one iteration.
 					--   It is passed the period of time (in seconds) needing to be advanced.
 	-> IO ()
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 109
 callback_keyMouse 
 	:: IORef world	 		-- ^ ref to world state
 	-> IORef ViewPort
-	-> (Event -> world -> world)	-- ^ fn to handle input events
+	-> (Event -> world -> IO world)	-- ^ fn to handle input events
 	-> Callback
 
 callback_keyMouse worldRef viewRef eventFn
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 119
 handle_keyMouse 
 	:: IORef a
 	-> t
-	-> (Event -> a -> a)
+	-> (Event -> a -> IO a)
 	-> KeyboardMouseCallback
 
 handle_keyMouse worldRef _ eventFn backendRef key keyState keyMods pos
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 123
- = do	pos' <- convertPoint backendRef pos
-	worldRef `modifyIORef` \world -> eventFn (EventKey key keyState keyMods pos') world
-
+ = do	pos'   <- convertPoint backendRef pos
+	world  <- readIORef worldRef
+        world' <- eventFn (EventKey key keyState keyMods pos') world
+        writeIORef worldRef world'
 
 -- | Callback for Motion events.
 callback_motion
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 131
 	:: IORef world	 		-- ^ ref to world state
-	-> (Event -> world -> world)	-- ^ fn to handle input events
+	-> (Event -> world -> IO world)	-- ^ fn to handle input events
 	-> Callback
 
 callback_motion worldRef eventFn
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 140
 
 handle_motion 
 	:: IORef a
-	-> (Event -> a -> a)
+	-> (Event -> a -> IO a)
 	-> MotionCallback
 
 handle_motion worldRef eventFn backendRef pos
hunk ./gloss/Graphics/Gloss/Internals/Interface/Game.hs 145
  = do pos' <- convertPoint backendRef pos
-      worldRef `modifyIORef` \world -> eventFn (EventMotion pos') world
+      world  <- readIORef worldRef
+      world' <- eventFn (EventMotion pos') world
+      writeIORef worldRef world'
 
 
 convertPoint ::

Context:

[Follow API changes in gloss-examples and add -threaded when compiling
Ben Lippmeier <benl@ouroborus.net>**20120123021212
 Ignore-this: 322e7ff9a30930cada5a1647c6bf6a59
] 
[Update release notes
Ben Lippmeier <benl@ouroborus.net>**20120123015105
 Ignore-this: 99455efa881e08e7553b808145ca313a
] 
[Exit cleanly when uncaught exceptions hit the main loop.
Thomas.DuBuisson@gmail.com**20120122205536
 Ignore-this: 6b8451e03a360e0890cc9647a4f44285
] 
[Export IO wrappers in from their own modules
Ben Lippmeier <benl@ouroborus.net>**20120123013310
 Ignore-this: d6aaabbaf8c321efd2fbdb97a3fac3b1
] 
[Further generalize the monadic varients
Thomas.DuBuisson@gmail.com**20120119042910
 Ignore-this: f9548fd6776df7e679dc338feb99e3b2
 
 The reasoning here is:
 1) World-stepping should be permitted to be IO because there might be
 outside influences on the world state (ex: a networked game).
 2) Rendering the world should be permitted to be IO because there
 might be outside information needed (texture loading, map tile retrieving, etc)
] 
[Add IO derivitives of simulate, play and animate.
Thomas.DuBuisson@gmail.com**20120119035433
 Ignore-this: 34cffe309cd1259296f20e5774af3154
] 
[Update release notes
Ben Lippmeier <benl@ouroborus.net>**20120106072543
 Ignore-this: 6e8351f8588132f72afc8eb7f0f49572
] 
[Fix bug in timing code and increase framerate cap to 100Hz
Ben Lippmeier <benl@ouroborus.net>**20120106070131
 Ignore-this: 7ff67c1a9c1763f9558868e0363ac92
] 
[Tweak circle LOD code
Ben Lippmeier <benl@ouroborus.net>**20120106061025
 Ignore-this: 49e960e8210872f717ce6c4256c1ab0d
] 
[Don't continually postRedisplay in display mode
Ben Lippmeier <benl@ouroborus.net>**20120106051912
 Ignore-this: 2ee4e0e523451c7ddb856c261c274fb1
] 
[Add fastpaths to render for scales and rotates of circles and arcs
Ben Lippmeier <benl@ouroborus.net>**20120106051409
 Ignore-this: 4a379a2ce9f21153283afc40dd43116
] 
[Take the absolute value of radius when drawing sectors
Ben Lippmeier <benl@ouroborus.net>**20120106050034
 Ignore-this: 1bfdabcd1f27243d86c699d8d52050b5
] 
[Refine docs to improve information density and make sectorWire a compound shape
Ben Lippmeier <benl@ouroborus.net>**20120106044620
 Ignore-this: 935c96925fdd3cbacbd738a15dacb51d
] 
[Update year in license files
Ben Lippmeier <benl@ouroborus.net>**20120106033644
 Ignore-this: 29d5553400f8edaff11868a7caf8243b
] 
[Bump gloss-examples and gloss-field to 1.7.0
Ben Lippmeier <benl@ouroborus.net>**20120106033531
 Ignore-this: 279cec615952e392c0fd5afdb4f6dc6b
] 
[Bump version to 1.7.0.1 and update readme
Ben Lippmeier <benl@ouroborus.net>**20120106032623
 Ignore-this: 3085006663463959f8ec797f9064934f
] 
[Refactoring and formatting to circle and arc rendering
Ben Lippmeier <benl@ouroborus.net>**20120106032543
 Ignore-this: 24fed6ccb0b2939e5afa413a27c36142
] 
[Use Arcs in the Picture data type instead of the separate arcPath function
Ben Lippmeier <benl@ouroborus.net>**20120106032133
 Ignore-this: 277a1212562d393c468ab55d127ef133
] 
[Docs and formatting
Ben Lippmeier <benl@ouroborus.net>**20120106031431
 Ignore-this: 8e373faf915830dc7e7c92c25aa21b5a
] 
[Commented out potential optimization for rotated arc/sector
Douglas Burke <dburke@cfa.harvard.edu>**20111231032503
 Ignore-this: 2e1ba4099beda1ab18d87cd79adc46d1
] 
[Add arcPath
Douglas Burke <dburke@cfa.harvard.edu>**20111231031239
 Ignore-this: 59366b6804e01305f359139ee65502f8
 
 An alternative to adding Arc/Sector constructors is to provide
 functions that create paths in these shapes, which can then be
 used as a polygon or line. Unfortunately this means that we don't
 have access to useful information such as the scale factor, which
 makes calculating an acceptable number of steps hard, so it
 is included as an argument.
] 
[Minor hlint changes
Douglas Burke <dburke@cfa.harvard.edu>**20111230212033
 Ignore-this: 341b8ae2b9dac8732175f8045b094430
] 
[Initial support for Arc, ThickArc, and Sector.
Douglas Burke <dburke@cfa.harvard.edu>**20111230183500
 Ignore-this: 9fbf2adf3aac770afc143e46a356c4fb
 
 Arc draws an arc between two angles at the given radius, and
 Sector is an Arc with lines drawn to the origin of the circle.
] 
[Removal of Control.Monad
Douglas Burke <dburke@cfa.harvard.edu>**20111230183321
 Ignore-this: 2e6ffecb3a03a91cfae32179d70748e0
] 
[Haddock updates for Graphics.Gloss.Data.Picture
Douglas Burke <dburke@cfa.harvard.edu>**20111230182918
 Ignore-this: 63049c1abaa07aa84ae02cc855bd2497
 
 Added documentation for the Picture constructor aliases
 and a few other places.
] 
[ray: tweak material parameters
Ben Lippmeier <benl@ouroborus.net>**20120102050142
 Ignore-this: d5e324c609587b91a318a8dd52782f35
] 
[ray: doc wibble
benl@ouroborus.net**20120101173235
 Ignore-this: f12cfcb2e53917b82de40b41def5ae32
] 
[ray: checkered board looks ok when tilted
benl@ouroborus.net**20120101173114
 Ignore-this: caede9d5c66a43cec48740db3af61616
] 
[ray: blackbar top and bottom to get zoom=3 on mac air
benl@ouroborus.net**20120101164406
 Ignore-this: 573488cce75cdf5a449fbe974f56cb80
] 
[ray: change default fov for a nicer picture
benl@ouroborus.net**20120101162611
 Ignore-this: 133e684f8e0831807f1b656f477536ff
] 
[ray: tweak default settings again
benl@ouroborus.net**20120101160454
 Ignore-this: 41fdee2ffad36953dfbe783798e1f91d
] 
[ray: strictify more things
benl@ouroborus.net**20120101154224
 Ignore-this: c826b49d4ca98f0e62fce61ea0a6cf97
] 
[ray: kill unboxings in trace
benl@ouroborus.net**20120101150603
 Ignore-this: cc997e7ecb9f0f0dbdb788fc57cab912
] 
[ray: allow max bounces to be set on command line
benl@ouroborus.net**20120101141037
 Ignore-this: 45677dc4947d617ff32dde108ffa36bc
] 
[ray: faster shadow check
benl@ouroborus.net**20120101135833
 Ignore-this: ebb29809addb86f33a7391f3a70a95ce
] 
[ray: make wasd keys work
Ben Lippmeier <benl@ouroborus.net>**20120101124346
 Ignore-this: ca37d64aa87bd484c5057410d242d09
] 
[ray: tweak starting values for mac air
Ben Lippmeier <benl@ouroborus.net>**20120101121506
 Ignore-this: f146bacc60a8c8e1a62e3f935d4a97b4
] 
[ray: use fullscreen mode
Ben Lippmeier <benl@ouroborus.net>**20120101121151
 Ignore-this: e79c86714cf5fbe6840a6e0c800a8c79
] 
[ray: allow translation of world
Ben Lippmeier <benl@ouroborus.net>**20120101120303
 Ignore-this: 37e1444eb8d3c4a1938c206048649fb6
] 
[gloss-field: refactor animate interface
Ben Lippmeier <benl@ouroborus.net>**20120101105103
 Ignore-this: e0274835ba22c1bbed2bf200a76db9cd
] 
[ray: tweak starting values
Ben Lippmeier <benl@ouroborus.net>**20120101103613
 Ignore-this: 6b9db1ca825a464280857fc043b0cb33
] 
[ray: tweaks and use sphere for ground instead of plane
Ben Lippmeier <benl@ouroborus.net>**20120101100652
 Ignore-this: 543814ee6560cdc35c13edb1e13a7746
] 
[ray: refactor lighting code
Ben Lippmeier <benl@ouroborus.net>**20120101092048
 Ignore-this: eeadf0486cb425b94d8e0ff6e4a386e1
] 
[examples: refactor findNearest in ray
Ben Lippmeier <benl@ouroborus.net>**20120101085057
 Ignore-this: 93899595a1c882238b4bbfdab2f6f8e7
] 
[examples: first version of ray tracer works
Ben Lippmeier <benl@ouroborus.net>**20120101072308
 Ignore-this: e08dbe347f79b0f9c7f70eddb78f784c
] 
[TAG Release 1.6.0.1
Ben Lippmeier <benl@ouroborus.net>**20111228020857
 Ignore-this: 8b11cdc5e55cbaf6ecd6dddc346eed61
] 
Patch bundle hash:
8d9bb92495ad5e006b142359ef7cee1cfd1ee70c
