Can't comprehend "unknown OpenGL extension entry" error triggered by Haskell OpenGL program
===

I wrote the following program on Windows XP using GHC 7.4.1 (Haskell Platform 2012.2.0.0):

    mkVertexShader :: IO Bool
    mkVertexShader = do
      shader <- glCreateShader gl_VERTEX_SHADER
      withCString vertexShader $ \ptr -> glShaderSource shader 1 (castPtr ptr) nullPtr
      glCompileShader shader
      status <- with 0 $ \ptr -> do
          glGetShaderiv shader gl_COMPILE_STATUS ptr
          peek ptr
      return $ status == fromIntegral gl_FALSE

When run, the program aborts with 

    *** Exception: user error (unknown OpenGL extension entry glCreateShader, check for OpenGL 3.1)

I'm not sure what this error means, or how to address it. Can anyone help/