-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document instructions for scripting in Haskell with Cabal 3.0 #6066
Comments
Ok, thanks to some discussion on the other issue, I found a set of new-style Cabal commands that seems to work:
You need the second line to expose Pandoc as a library, and the third because otherwise any dependencies of I still think it's worth some amount of documentation to guide Pandoc users in the right direction, though I guess there's some question whether that should be |
thanks a lot. I was wondering about this myself. |
See if the changes in ebf413c help. |
Yes, I those instructions look good to me. |
Cabal 3.0 changes the default
install
subcommand to the new-style installation (akav2-install
in earlier versions). The new-style installation seems not to register any installed packages with the GHC package database. As a result, you can't write Pandoc scripts in Haskell and build them withghc --make
; you would have to set up a full Cabal project for each script, which is rather a drag.Is this worth documenting somewhere? Pandoc users may want to be aware that they need to use
v1-
style subcommands in order to get to a working setup for scripting.The only way I've been able to make this work is to go back to the
v1-install
subcommand:Whereas whenever I build with any of the new-style commands, I can't build scripts afterwards.
And similarly with
--global
:I'm not sure what exactly is wrong with the new-style subcommands.
--global
sounds like it should do what I want, but it doesn't seem to. Other users of cabal seem to be having similar issues, see e.g. haskell/cabal#6478.Note: To be sure I'm getting a clean environment, I run
rm -rf ~/.cabal ~/.ghc/x86_64-darwin-8.8.1 && cabal user-config update && cabal update
prior to each attempt.The text was updated successfully, but these errors were encountered: