[Haskell-cafe] Re: ghc error: requested module name differs from
name found in interface file
Larry Evans
cppljevans at suddenlink.net
Mon Oct 20 20:05:11 EDT 2008
On 10/20/08 12:33, Larry Evans wrote:
> With a file containing:
>
> > module Main where
> >
> > import Array
> > import Control.Functor.Fix
> I get:
>
> > make
> > ghc -i/root/.cabal/lib/category-extras-0.53.5/ghc-6.8.2 -c
> catamorphism.example.hs
> >
> > catamorphism.example.hs:19:0:
> > Bad interface file:
> /root/.cabal/lib/category-extras-0.53.5/ghc-6.8.2/Control/Functor/Fix.hi
> > Something is amiss; requested module main:Control.Functor.Fix
> differs from name found in the interface file
> category-extras-0.53.5:Control.Functor.Fix
> > make: *** [all] Error 1
> I used cabal to install category-extras:
>
> > /home/evansl/download/haskell/libs # cabal install category-extras
> > Resolving dependencies...
> > Downloading category-extras-0.53.5...
> > Configuring category-extras-0.53.5...
> > Preprocessing library category-extras-0.53.5...
> ...
> > /usr/bin/ar: creating dist/build/libHScategory-extras-0.53.5.a
> > Installing library in /root/.cabal/lib/category-extras-0.53.5/ghc-6.8.2
[snip]
The problem must be where the library was installed. A manual install:
http://www.haskell.org/haskellwiki/Cabal/How_to_install_a_Cabal_package
of http://hackage.haskell.org/cgi-bin/hackage-scripts/package/uniplate
followed by compile of:
<--- cut here ---
module Main where
import Data.Generics.Biplate
main = do
putStr "hello world\n"
>--- cut here ---
showed no errors:
<--- cut here ---
make
ghc -C import.test.hs
Compilation finished at Mon Oct 20 18:47:54
>--- cut here ---
The key difference is the manual installed as:
<--- cut here ---
/home/evansl/download/haskell/libs/uniplate-1.2.0.1 # runhaskell Setup
install
Installing library in /usr/local/lib/uniplate-1.2.0.1/ghc-6.8.2
Registering uniplate-1.2.0.1...
Reading package info from "dist/installed-pkg-config" ... done.
Saving old package config file... done.
Writing new package config file... done.
/home/evansl/download/haskell/libs/uniplate-1.2.0.1 #
>--- cut here ---
whereas the cabal install of category-extras installed the library here:
<--- cut here ---
/root/.cabal/lib/category-extras-0.53.5/ghc-6.8.2:
total used in directory 2812 available 148773984
drwxr-xr-x 4 root root 4096 Oct 19 15:09 .
drwxr-xr-x 3 root root 4096 Oct 19 15:09 ..
drwxr-xr-x 9 root root 4096 Oct 19 15:09 Control
drwxr-xr-x 2 root root 4096 Oct 19 15:09 Data
-rw-r--r-- 1 root root 1120345 Oct 19 15:09 HScategory-extras-0.53.5.o
-rw-r--r-- 1 root root 1728590 Oct 19 15:09 libHScategory-extras-0.53.5.a
>--- cut here ---
So, I've got to figure how to tell cabal install to install in right
place :(
More information about the Haskell-Cafe
mailing list