
If you want to install it globally for use by GHC, I think you want v1-install. On 4/15/19 5:00 PM, Simon Peyton Jones via ghc-devs wrote:
Thanks. But alas I have no clue about whether I want a v1-install or a v2-install, nor how to achieve them if I knew what they were. I just want to install ‘hspec’ so that I can use it when compiling a program. How would I do that?
The instructions here https://wiki.haskell.org/Cabal-Install https://wiki.haskell.org/Cabal-Install just say “cabal install hspec” which is what I tried. Those instructions are pointed to from here https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package, which in turn are pointed to from the main Cabal home page https://www.haskell.org/cabal/.
I must be missing something.
Simon
*From:*Brandon Allbery
*Sent:* 15 April 2019 22:54 *To:* Simon Peyton Jones *Cc:* ghc-devs@haskell.org *Subject:* Re: Cabal woes
I think you wanted v1-install to install a library into the user package database, since your cabal is 3.x and the v2-* commands are now the default (that is, you did what used to be cabal new-install or cabal v2-install).
On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs
mailto:ghc-devs@haskell.org> wrote: I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux) system.
But I fail; see below.
For some reason cabal complains about installing a library. (That seems peculiar – isn’t that what cabal is for?) But it helpfully suggests adding –lib.
Alas, cabal then crashes outright, which should never happen.
So I’m stuck. What should I do?
Thanks
Simon
simonpj@MSRC-9870733:~$ cabal --version
cabal-install version 3.0.0.0
compiled using version 3.0.0.0 of the Cabal library
simonpj@MSRC-9870733:~$ cabal install hspec
Resolving dependencies...
Up to date
Warning: You asked to install executables, but there are no executables in
target: hspec. Perhaps you want to use --lib to install libraries instead.
simonpj@MSRC-9870733:~$ cabal install --lib hspec
Resolving dependencies...
Up to date
Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for pattern Just ghcPkgProg
simonpj@MSRC-9870733:~$ which ghc
/opt/ghc/bin/ghc
simonpj@MSRC-9870733:~$ which ghc-pkg
/opt/ghc/bin/ghc-pkg
simonpj@MSRC-9870733:~$
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org mailto:ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7C49de1a60a36e4a04bbe208d6c1ecdac9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909620364700618&sdata=dMUKGqIICFPisw%2Feskzb98WxcG9kfNFMOkZfd9fB7YU%3D&reserved=0
--
brandon s allbery kf8nh
allbery.b@gmail.com mailto:allbery.b@gmail.com
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- *Vanessa McHale* Functional Compiler Engineer | Chicago, IL Website: www.iohk.io http://iohk.io Twitter: @vamchale PGP Key ID: 4209B7B5 Input Output http://iohk.io Twitter https://twitter.com/InputOutputHK Github https://github.com/input-output-hk LinkedIn https://www.linkedin.com/company/input-output-global This e-mail and any file transmitted with it are confidential and intended solely for the use of the recipient(s) to whom it is addressed. Dissemination, distribution, and/or copying of the transmission by anyone other than the intended recipient(s) is prohibited. If you have received this transmission in error please notify IOHK immediately and delete it from your system. E-mail transmissions cannot be guaranteed to be secure or error free. We do not accept liability for any loss, damage, or error arising from this transmission