-- Main.hs module Main where import Graphics.GD.State import qualified Graphics.GD as GD import System.Random (newStdGen,randomRs) import Control.Monad (mapM_,liftM2) main = do g <- newStdGen let (w,h) = (400,300) (GD.savePngFile "noise.png" =<<) . newImage (w,h) $ mapM_ (uncurry setPixel) $ zip (liftM2 (,) [0..w-1] [0..h-1]) -- all the pixel coordinates $ map fromInteger $ randomRs (0,256^3-1) g -- random colors