[Haskell-beginners] Re: installing cabal with 6.10 - ubuntu

B bburdette at comcast.net
Tue Mar 10 09:59:36 EDT 2009

Christian Maeder wrote:
> B wrote:
>> I found some directions online that said that compiling from source
>> might be a good way to go.  I downloaded and compiled ghc 6.10.1,
>> installing it locally.
> Next time include the extra-libraries in your sources, to avoid
> installing so many packages afterwards.
>> Ok.  Now when I go to build network I get this:
>> Could not find module `Data.Generics':
>>       it is a member of package base-, which is hidden
>> According to google, the above message actually indicates that 'syb' is
>> needed, the bug is here:
>> http://hackage.haskell.org/trac/ghc/ticket/2980
>> - installed syb-
>> - still get the same message.
>> At this point I'm stuck!
> Are you sure you have version
> http://hackage.haskell.org/packages/archive/network/
> This package does not need syb as dependency.
> The file Network/URI.hs contains:
> #ifdef BASE4
> import Data.Data      ( Data )
> #else
> import Data.Generics  ( Data )
> #endif
> and network.cabal sets the appropriate flag:
>   if flag(base4)
>       build-depends:    base>=4
>       cpp-options:      -DBASE4
>> I should say that I'm using this to install all these things:
>> runhaskell Setup configure --user
>> runhaskell Setup build
>> runhaskell Setup install
>> So everything is installed 'locally' and not globally.
> This should be fine.
> HTH Christian

Thanks for the reply Christian (and the others who replied off-list).

The wrong network package was exactly the problem, for some reason I had instead of  Also, I believe I may have had some 
things left over from a previous install in ~/.ghc.

Anyway, my resolution was to delete the ghc folder from /usr/local, 
delete .cabal and .ghc from ~, and start over from scratch.

Too bad this process isn't more automated!  I did learn a lot along the 
way, but it was a bit frustrating.

My only real question now is how one might install all this globally 
rather than locally.  In ubuntu I couldn't figure out how to add ghc to 
my path so that sudo would pick it up.  That's why I ended up with the 
local install approach.

More information about the Beginners mailing list