Hello Rafal,

Sunday, September 21, 2008, 5:43:14 PM, you wrote:

>      withImageSurfaceFromPNG file $ \png -> do
>          w <- renderWith png $ imageSurfaceGetWidth png
>          h <- renderWith png $ imageSurfaceGetHeight png

this is very idiomatic Haskell, consider it as a sort of RAII. you may
even omit additional tab here:

>      withImageSurfaceFromPNG file $ \png -> do
>      w <- renderWith png $ imageSurfaceGetWidth png
>      h <- renderWith png $ imageSurfaceGetHeight png
>      ...

afair, Render is a super-IO monad so you can just lift any IO
operation to Render:

x <- liftIO$ imageSurfaceCreateFromPNG file



-- 
Best regards,
 Bulat                            mailto:[EMAIL PROTECTED]

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to