blank-canvas is a Haskell port of the HTML5 Canvas API. Tutorials and examples for the HTML5 Canvas should be trivial to port to this library. blank-canvas works by providing a web service that displays the users' Haskell commands inside a browser.

Example

Compile the program on the left, access http://localhost:3000/, see the picture on the right.

import Graphics.Blank

main = blankCanvas 3000 $ \ context -> do
        send context $ do
                moveTo(50,50)
                lineTo(200,100)
                lineWidth 10
                strokeStyle "red"
                stroke()

Downloading

cabal install blank-canvas

Documentation

Haddock: http://hackage.haskell.org/package/blank-canvas
There is also a slide set about blank-canvas.

Examples

Squares

Tic Tac Toe