[Haskell-cafe] Mixing internal functions and datatypes with externally available ones

DPX-Infinity dpx.infinity at gmail.com
Sun Dec 27 07:51:22 EST 2009


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?


More information about the Haskell-Cafe mailing list