ghc-pkg list says a package is installed, but ghci won't load its exposed module (HDBC-ODBC)
ghc-pkg list says a package is installed, but ghci won't load its 
module (HDBC-ODBC) 
Any advice? 
hartthoma@dbnycws28816 ~/haskellInstalls/HDBC-odbc-1.0.1.0 
$ ghc-pkg list 
c:/ghc/ghc-6.6.1\package.conf: 
    Cabal-1.1.6.2, GLUT-2.1.1, HAppS-0.8.4, HDBC-1.0.1, 
    HDBC-odbc-1.0.1.0, HUnit-1.1.1, HaXml-1.13.2, OpenGL-2.2.1, 
    QuickCheck-1.0.1, Win32-2.1.1, base-2.1.1, cgi-3001.1.1, 
fgl-5.4.1, 
    filepath-1.0, (ghc-6.6.1), haskell-src-1.0.1, haskell98-1.0, 
    html-1.0.1, mtl-1.0.1, network-2.0.1, parsec-2.0, regex-base-0.72, 
    regex-base-0.91, regex-compat-0.71, regex-posix-0.71, 
    regex-tdfa-0.92, rts-1.0, stm-2.0, template-haskell-2.1, 
    time-1.1.1, xhtml-3000.0.2 
..... 
Prelude> :m + Database.HDBC.ODBC 
module main:Database.HDBC.ODBC is not loaded 
..... 
$ ghc-pkg.exe describe HDBC-odbc 
name: HDBC-odbc 
version: 1.0.1.0 
license: LGPL 
copyright: Copyright (c) 2005-2006 John Goerzen 
maintainer: John Goerzen 
Thomas Hartman wrote:
ghc-pkg list says a package is installed, but ghci won't load its module (HDBC-ODBC)
Any advice?
hartthoma@dbnycws28816 ~/haskellInstalls/HDBC-odbc-1.0.1.0 $ ghc-pkg list c:/ghc/ghc-6.6.1\package.conf: Cabal-1.1.6.2, GLUT-2.1.1, HAppS-0.8.4, HDBC-1.0.1, HDBC-odbc-1.0.1.0, HUnit-1.1.1, HaXml-1.13.2, OpenGL-2.2.1, QuickCheck-1.0.1, Win32-2.1.1, base-2.1.1, cgi-3001.1.1, fgl-5.4.1, filepath-1.0, (ghc-6.6.1), haskell-src-1.0.1, haskell98-1.0, html-1.0.1, mtl-1.0.1, network-2.0.1, parsec-2.0, regex-base-0.72, regex-base-0.91, regex-compat-0.71, regex-posix-0.71, regex-tdfa-0.92, rts-1.0, stm-2.0, template-haskell-2.1, time-1.1.1, xhtml-3000.0.2
.....
Prelude> :m + Database.HDBC.ODBC module main:Database.HDBC.ODBC is not loaded
It looks like your current directory contains Database/HDBC/ODBC.hs. Move to a different directory, and you should be fine. The reason this happens is that GHC finds Database/HDBC/ODBC.hs relative to the current directory, and assumes the module is therefore part of the "main" package (see the error message you got), which overrides the module of the same name from the HDBC package. And you can't :m to a module in the "main" package, it has to be loaded with :load. Cheers, Simon
I didn't see an answer jet so here it goes:
If you look closely you will see that HDBC-odbc-1.1.6.2 is installed but
module Database.HDBC.ODBC is not found (loaded). The problem lies in the capitalisation.
I ran into the same problem with missingH and the package filepath wich registers as filepath-1.0 while missingH.cabal is
looking for FilePath.
Hope that helps and gets attention by packege developers in the future.
Kind regards,
Andreas
  ----- Original Message ----- 
  From: Thomas Hartman 
  To: haskell-cafe@haskell.org 
  Sent: Wednesday, June 13, 2007 10:31 PM
  Subject: [Haskell-cafe] ghc-pkg list says a package is installed, but ghci won't load its exposed module (HDBC-ODBC)
  ghc-pkg list says a package is installed, but ghci won't load its 
  module (HDBC-ODBC) 
  Any advice? 
  hartthoma@dbnycws28816 ~/haskellInstalls/HDBC-odbc-1.0.1.0 
  $ ghc-pkg list 
  c:/ghc/ghc-6.6.1\package.conf: 
      Cabal-1.1.6.2, GLUT-2.1.1, HAppS-0.8.4, HDBC-1.0.1, 
      HDBC-odbc-1.0.1.0, HUnit-1.1.1, HaXml-1.13.2, OpenGL-2.2.1, 
      QuickCheck-1.0.1, Win32-2.1.1, base-2.1.1, cgi-3001.1.1, 
  fgl-5.4.1, 
      filepath-1.0, (ghc-6.6.1), haskell-src-1.0.1, haskell98-1.0, 
      html-1.0.1, mtl-1.0.1, network-2.0.1, parsec-2.0, regex-base-0.72, 
      regex-base-0.91, regex-compat-0.71, regex-posix-0.71, 
      regex-tdfa-0.92, rts-1.0, stm-2.0, template-haskell-2.1, 
      time-1.1.1, xhtml-3000.0.2 
  ..... 
  Prelude> :m + Database.HDBC.ODBC 
  module main:Database.HDBC.ODBC is not loaded 
  ..... 
  $ ghc-pkg.exe describe HDBC-odbc 
  name: HDBC-odbc 
  version: 1.0.1.0 
  license: LGPL 
  copyright: Copyright (c) 2005-2006 John Goerzen 
  maintainer: John Goerzen 
participants (3)
- 
                
Andreas Marth - 
                
Simon Marlow - 
                
Thomas Hartman