Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

gloss-banana

  • Loading branch information...
commit f4c25aec4642903d84db2adb56bbb9cd87535cb9 1 parent 39647ed
@gelisam authored
Showing with 7 additions and 7 deletions.
  1. +6 −7 Main.hs
  2. +1 −0  reactive-banana-anti-tutorial.cabal
View
13 Main.hs
@@ -1,8 +1,10 @@
module Main where
+import Control.Applicative
import Data.Monoid
import Graphics.Gloss
import Graphics.Gloss.Data.Extent
+import Graphics.Gloss.Interface.FRP.ReactiveBanana
extentR, extentA, extentB, extentC :: Extent
@@ -12,13 +14,10 @@ extentB = makeExtent (-10) (-40) 65 (-65)
extentC = makeExtent (-60) (-90) 65 (-65)
main :: IO ()
-main = play (InWindow "Nice Window" (200, 200) (800, 200))
- white
- 30
- (1, 2, 3)
- render
- (const id)
- (const id)
+main = playBanana (InWindow "Nice Window" (200, 200) (800, 200))
+ white
+ 30
+ (\_ _ -> return $ pure $ circle 10)
render :: (Int, Int, Int) -> Picture
render (xA, xB, xC) = button extentR "Refresh"
View
1  reactive-banana-anti-tutorial.cabal
@@ -21,5 +21,6 @@ executable reactive-banana-anti-tutorial
-- other-extensions:
build-depends: base >=4.7 && <4.8
, gloss
+ , gloss-banana
-- hs-source-dirs:
default-language: Haskell2010
Please sign in to comment.
Something went wrong with that request. Please try again.