[Haskell-beginners] Cabal-install of local package
Stefan Höck
efasckenoth at gmail.com
Tue Oct 28 05:22:03 UTC 2014
So, I think I figured this out myself after some more googling:
`cabal sandbox add-source /path/to/efa-prelude`
did the trick as explained here:
http://coldwa.st/e/blog/2013-08-20-Cabal-sandbox.html
Please excuse the noise. Move on.
On Tue, Oct 28, 2014 at 05:49:21AM +0100, Stefan Höck wrote:
> Dear list
>
> Like many other I seem to be struggling with some of the concepts of
> cabal and cabal-install. For the records: I use cabal-install 1.20.0.3
> and ghc 7.8.3 on arch linux.
>
> For starters, I implemented my own idea of an improved prelude, called
> the package efa-prelude and the module it exports Efa.Prelude. I then
> built the package and installed it using `cabal install --user`.
> This worked and a folder for the library was created at
> "$HOME/.cabal/lib/x86_64-linux-ghc-7.8.3/efa-prelude-0.1.0".
> I also registered the library using `cabal register --user` and
> now cabal prints some information about the package when I type
> `cabal info efa-prelude`. I am also able to import Efa.Prelude into
> ghci.
>
> However, when I now try to use this library in another local project
> using a sandbox this time, I can build the project but
> when I try to install it into the sandbox I get the following error
> message:
>
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: test-0.1.0 (user goal)
> next goal: efa-prelude (dependency of test-0.1.0)
> Dependency tree exhaustively searched.
>
> I just tried and the install works if I do it outside of a sandbox.
> Obviously I am missing something crucial here. Could somebody please point me
> in the right direction what is needed to make my own packages available
> in a sanboxed install?
>
> Thanks for your time
>
> Stefan
>
More information about the Beginners
mailing list