File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ .psc-ide-port
1
2
.pulp-cache /
2
3
.psci_modules /
3
4
.stack-work /
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " trybehaviors" ,
3
+ "set" : " master" ,
4
+ "source" : " https://github.com/purescript/package-sets.git" ,
5
+ "depends" : [
6
+ " drawing" ,
7
+ " behaviors" ,
8
+ " prelude"
9
+ ]
10
+ }
Original file line number Diff line number Diff line change
1
+ module FRP.Try (defaultMain ) where
2
+
3
+ import Prelude
4
+
5
+ import Control.Monad.Eff (Eff )
6
+ import Data.Foldable (for_ )
7
+ import FRP (FRP )
8
+ import FRP.Behavior (Behavior , animate )
9
+ import Graphics.Canvas (CANVAS , getCanvasElementById , getContext2D )
10
+ import Graphics.Drawing (Drawing , render )
11
+
12
+ defaultMain :: Behavior Drawing -> Eff (canvas :: CANVAS , frp :: FRP ) Unit
13
+ defaultMain b = do
14
+ canvas <- getCanvasElementById " canvas"
15
+ for_ canvas \c -> do
16
+ ctx <- getContext2D c
17
+ animate b (render ctx)
You can’t perform that action at this time.
0 commit comments