
27 Dec
2009
27 Dec
'09
12:51 p.m.
Hello. I'm writing a library - some kind a wrapper around SDL library, an engine. For example, I have a module Graphics.UI.SDL.XEngine.State and functions modifyState and setColor in it. These functions are using "global" variable of type IO (IORef XState). I want to use the first function in Graphics.UI.SDL.XEngine.General and Graphics.UI.SDL.XEngine.Drawing modules and I don't want this function to be accessible from a program which uses my library, but I need to make the function setColor visible from everywhere. Is there a simple way to do such thing? Or maybe I should restructure my library?