Se você for usar stack
, será necessário parar de usar cabal install <packae-name>
. Você poderia usar stack install <packae-name>
.
Veja:
Eu instalei stack via pacote binário no site da stack. Agora eu quero usar a cabal para instalar pacotes.
cabal install something
mas gera:
cabal: The program 'ghc' version >=6.4 is required but it could not be found.
Não sabe como verificar o verison, mas o GHCi é recente:
GHCi, version 8.0.2: http://www.haskell.org/ghc/ :? for help
O GHC não está no meu PATH, eu o uso via
stack ghc ...
Mas parece muito despojado, como sugere apenas um pequeno conjunto de opções disponíveis:
Usage: stack ghc [-- ARGS (e.g. stack runghc -- X.hs -o x)] ([--plain] |
[--[no-]ghc-package-path] [--[no-]stack-exe] [--package ARG]
[--rts-options RTSFLAG] [--cwd DIR]) [--help]
Run ghc
Available options:
--plain Use an unmodified environment (only useful with
Docker)
--[no-]ghc-package-path Enable/disable setting the GHC_PACKAGE_PATH variable
for the subprocess
--[no-]stack-exe Enable/disable setting the STACK_EXE environment
variable to the path for the stack executable
--package ARG Additional packages that must be installed
--rts-options RTSFLAG Explicit RTS options to pass to application
--cwd DIR Sets the working directory before executing
--help Show this help text
Run 'stack --help' for global options that apply to all subcommands.
Como fazer o ghc funcionar sem instalá-lo via gerenciador de pacotes ou construir a partir da fonte, usando apenas stack
facilities?
Se você for usar stack
, será necessário parar de usar cabal install <packae-name>
. Você poderia usar stack install <packae-name>
.
Veja: