Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  FFI for more object oriented structure (Nathan H?sken)


----------------------------------------------------------------------

Message: 1
Date: Sat, 15 Dec 2012 14:23:03 +0100
From: Nathan H?sken <[email protected]>
Subject: [Haskell-beginners] FFI for more object oriented structure
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hey,

I am trying to write FFI bindings for cocos2d-html5 (with haste).
In cocos2d-x html5 one defines a main scene containing a "onEnter" 
functions which initilizes the scene.
The application is then started with:

var myApp = new cocos2dApp(MainScene);

which calls "MainScene.onEnter" in the correct moment.

Now I wonder what be the best way to map this to Haskell.
I could define

newScene :: IO () -> IO Scene

which takes the onEnter functions as argument.

I do not know, my haskell experience is not very well founded.
What do think about this approach? Can you think of a more haskellish 
approach?

Thank you!
Nathan



------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 54, Issue 22
*****************************************

Reply via email to