diff --git a/OpenGLRaw.cabal b/OpenGLRaw.cabal
--- a/OpenGLRaw.cabal
+++ b/OpenGLRaw.cabal
@@ -1,5 +1,5 @@
 name: OpenGLRaw
-version: 2.3.0.0
+version: 2.4.0.0
 synopsis: A raw binding for the OpenGL graphics system
 description:
   OpenGLRaw is a raw Haskell binding for the OpenGL 4.5 graphics system and
@@ -20,6 +20,7 @@
   and <http://www.opengl.org/registry/>.
 homepage: http://www.haskell.org/haskellwiki/Opengl
 bug-reports: https://github.com/haskell-opengl/OpenGLRaw/issues
+copyright: Copyright (C) 2009-2015 Sven Panne
 license: BSD3
 license-file: LICENSE
 author: Sven Panne
@@ -574,7 +575,9 @@
     cbits/HsOpenGLRaw.c
   hs-source-dirs: src
   include-dirs: include
-  build-depends: base >= 3 && < 5
+  build-depends:
+    base         >= 4   && < 5,
+    transformers >= 0.2 && < 0.5
   default-language: Haskell2010
   ghc-options: -Wall
   other-extensions: CPP
diff --git a/RegistryProcessor/RegistryProcessor.cabal b/RegistryProcessor/RegistryProcessor.cabal
--- a/RegistryProcessor/RegistryProcessor.cabal
+++ b/RegistryProcessor/RegistryProcessor.cabal
@@ -21,7 +21,12 @@
 executable RegistryProcessor
   main-is: Main.hs
   other-modules: DeclarationParser ManPages MangledRegistry Registry
-  build-depends: base >= 3 && < 5, containers >= 0.5 && < 0.6, hxt >= 9.3, directory, filepath
+  build-depends:
+    base       >= 4   && < 5,
+    containers >= 0.3 && < 0.6,
+    hxt        >= 9.3 && < 9.4,
+    directory  >= 1.0 && < 1.3,
+    filepath   >= 1.0 && < 1.4
   hs-source-dirs: src
   default-language: Haskell2010
   ghc-options: -Wall
diff --git a/RegistryProcessor/src/Main.hs b/RegistryProcessor/src/Main.hs
--- a/RegistryProcessor/src/Main.hs
+++ b/RegistryProcessor/src/Main.hs
@@ -63,10 +63,9 @@
     SI.hPutStrLn h ") where"
     SI.hPutStrLn h ""
     SI.hPutStrLn h "-- Make the foreign imports happy."
-    SI.hPutStrLn h "import Data.Int"
-    SI.hPutStrLn h "import Data.Word"
     SI.hPutStrLn h "import Foreign.C.Types"
     SI.hPutStrLn h ""
+    SI.hPutStrLn h "import Control.Monad.IO.Class ( MonadIO(..) )"
     SI.hPutStrLn h "import Foreign.Marshal.Error ( throwIf )"
     SI.hPutStrLn h "import Foreign.Ptr ( Ptr, FunPtr, nullFunPtr )"
     SI.hPutStrLn h "import System.IO.Unsafe ( unsafePerformIO )"
@@ -314,8 +313,9 @@
   showString man .
 
   showString (name ++ "\n") .
-  showString ("  :: " ++ signature True) .
-  showString (name ++ " = " ++ dyn_name ++ " " ++ ptr_name ++ "\n\n") .
+  showString ("  :: MonadIO m\n") .
+  showString ("  => " ++ signature True) .
+  showString (name ++ args ++ " = liftIO $ " ++ dyn_name ++ " " ++ ptr_name ++ args ++ "\n\n") .
 
   showString ("foreign import CALLCONV \"dynamic\" " ++ dyn_name ++ "\n" ++
               "  :: FunPtr (" ++ compactSignature ++ ")\n" ++
@@ -343,11 +343,14 @@
                 [_] ->  "-- | Manual page for "  ++ links
                 _   ->  "-- | Manual pages for " ++ links
         renderURL (u, l) = "<" ++ u ++ " " ++ l ++ ">"
+        args = concat [" v" ++ show i | i <- [1 .. length (paramTypes c)]]
 
 showSignatureElement :: Bool -> Bool -> SignatureElement -> String
 showSignatureElement withComment isResult sigElem = el ++ comment
-  where el | isResult  = "IO " ++ showsPrec 11 sigElem ""
+  where el | isResult  = monad ++ " " ++ showsPrec 11 sigElem ""
            | otherwise = show sigElem
+        monad | withComment = "m"
+              | otherwise = "IO"
         comment | withComment = showComment name sigElem
                 | otherwise   = ""
         name | isResult  = ""
diff --git a/src/Graphics/Rendering/OpenGL/Raw/Functions.hs b/src/Graphics/Rendering/OpenGL/Raw/Functions.hs
# file too large to diff: src/Graphics/Rendering/OpenGL/Raw/Functions.hs
diff --git a/src/Graphics/Rendering/OpenGL/Raw/GetProcAddress.hs b/src/Graphics/Rendering/OpenGL/Raw/GetProcAddress.hs
--- a/src/Graphics/Rendering/OpenGL/Raw/GetProcAddress.hs
+++ b/src/Graphics/Rendering/OpenGL/Raw/GetProcAddress.hs
@@ -28,6 +28,7 @@
 ) where
 
 import Control.Monad ( foldM )
+import Control.Monad.IO.Class ( MonadIO(..) )
 import Foreign.C.String ( withCString, CString )
 import Foreign.Marshal.Error ( throwIf )
 import Foreign.Ptr ( FunPtr, nullFunPtr )
@@ -40,21 +41,21 @@
 
 -- | Retrieve an OpenGL function by name. Returns 'nullFunPtr' when no function
 -- with the given name was found.
-getProcAddress :: String -> IO (FunPtr a)
-getProcAddress cmd = withCString cmd hs_OpenGLRaw_getProcAddress
+getProcAddress :: MonadIO m => String -> m (FunPtr a)
+getProcAddress cmd = liftIO $ withCString cmd hs_OpenGLRaw_getProcAddress
 
 foreign import ccall unsafe "hs_OpenGLRaw_getProcAddress"
    hs_OpenGLRaw_getProcAddress :: CString -> IO (FunPtr a)
 
 -- | Retrieve an OpenGL function by name. Throws an 'userError' when no function
 -- with the given name was found.
-getProcAddressChecked :: String -> IO (FunPtr a)
-getProcAddressChecked cmd = check cmd $ getProcAddress cmd
+getProcAddressChecked :: MonadIO m => String -> m (FunPtr a)
+getProcAddressChecked cmd = liftIO $ check cmd $ getProcAddress cmd
 
 -- | Retrieve an OpenGL function by name, trying a list of name suffixes in the
 -- given order. Returns 'nullFunPtr' when no function with the given name plus
 -- any of the suffixes was found.
-getProcAddressWithSuffixes :: String -> [String] -> IO (FunPtr a)
+getProcAddressWithSuffixes :: MonadIO m => String -> [String] -> m (FunPtr a)
 getProcAddressWithSuffixes cmd = foldM gpa nullFunPtr
    where gpa p s | p == nullFunPtr = getProcAddress (cmd ++ s)
                  | otherwise       = return p
@@ -62,21 +63,23 @@
 -- | Retrieve an OpenGL function by name, trying a list of name suffixes in the
 -- given order. Throws an 'userError' when no function with the given name plus
 -- any of the suffixes was found.
-getProcAddressWithSuffixesChecked :: String -> [String] -> IO (FunPtr a)
+getProcAddressWithSuffixesChecked :: MonadIO m
+                                  => String -> [String] -> m (FunPtr a)
 getProcAddressWithSuffixesChecked cmd suffixes =
-   check cmd $ getProcAddressWithSuffixes cmd suffixes
+   liftIO $ check cmd $ getProcAddressWithSuffixes cmd suffixes
 
 -- | Retrieve an OpenGL function by name, additionally trying a list of all
 -- known vendor suffixes. Returns 'nullFunPtr' when no function with the given
 -- name plus any of the suffixes was found.
-getExtension :: String -> IO (FunPtr a)
-getExtension = flip getProcAddressWithSuffixes vendorSuffixes
+getExtension :: MonadIO m => String -> m (FunPtr a)
+getExtension cmd = liftIO $ getProcAddressWithSuffixes cmd vendorSuffixes
 
 -- | Retrieve an OpenGL function by name, additionally trying a list of all
 -- known vendor suffixes. Throws an 'userError' when no function with the given
 -- name plus any of the suffixes was found.
-getExtensionChecked :: String -> IO (FunPtr a)
-getExtensionChecked = flip getProcAddressWithSuffixesChecked vendorSuffixes
+getExtensionChecked :: MonadIO m => String -> m (FunPtr a)
+getExtensionChecked cmd =
+  liftIO $ getProcAddressWithSuffixesChecked cmd vendorSuffixes
 
 check :: String -> IO (FunPtr a) -> IO (FunPtr a)
 check = throwIfNullFunPtr . ("unknown OpenGL command " ++)
