This says more about your understanding of Haskell than anything else, really.
The GP's example is not a _global_ variable, by the way.
Global variables are not really available in Haskell, except if you use unsafePerformIO:
import System.IO.Unsafe
{-# NOINLINE global #-}
global :: IORef Int
global = unsafePerformIO $ newIORef 0