Hi,
I have a project which is built with stack and I like to improve the stack config. It's been a while I created it and I wasn't proficient in Haskell back then and tried to get something that just work. However I'd like to improve it now.
The first thing is that I usually modify the .cabalfile in my project, and now I have a C:\Users\vljno\OneDrive\Bureau\TDP7\RenduProcessor\UTILS.cabal was modified manually. Ignoring C:\Users\vljno\OneDrive\Bureau\TDP7\RenduProcessor\package.yaml in favor of the cabal file. message (and indeed the .yamlfile is ignored. Is there a way to "regenerate" the .cabalfile from the package so that I can edit the package.yamlfile instead ?
Is there a way to automatically run haddock when I do stack build/stack run ?
I'm using vscode and haskell LSP. In another project I saw that the LSP was able to detect if a function was not used because for instance, it's not exported and not used in the module being defined. In my current project this is not the case, no function are greyed out. Is there an option to enable this ?
Hi,
I have a project which is built with stack and I like to improve the stack config. It's been a while I created it and I wasn't proficient in Haskell back then and tried to get something that just work. However I'd like to improve it now.
The first thing is that I usually modify the .cabalfile in my project, and now I have a C:\Users\vljno\OneDrive\Bureau\TDP7\RenduProcessor\UTILS.cabal was modified manually. Ignoring C:\Users\vljno\OneDrive\Bureau\TDP7\RenduProcessor\package.yaml in favor of the cabal file. message (and indeed the .yamlfile is ignored. Is there a way to "regenerate" the .cabalfile from the package so that I can edit the package.yamlfile instead ?
Is there a way to automatically run haddock when I do stack build/stack run ?
I'm using vscode and haskell LSP. In another project I saw that the LSP was able to detect if a function was not used because for instance, it's not exported and not used in the module being defined. In my current project this is not the case, no function are greyed out. Is there an option to enable this ?
You can make it regenerate by removing current .cabal file
Try --haddockflag
Not sure about that one - maybe you can try running haskell-language-server in terminal and check whether it reports any errors/warnings
the stack.yaml file and the .cabal file do not do the same thing - the stack.yaml file is used to (roughly) specify which packages (and which versions of those packages) are available, and the *.cabal/package.yaml file is used to specify which dependencies your build system should use and other things related to the actual build of the project
Hi,
I have a project which is built with stack and I like to improve the stack config. It's been a while I created it and I wasn't proficient in Haskell back then and tried to get something that just work. However I'd like to improve it now.
.cabal
file in my project, and now I have aC:\Users\vljno\OneDrive\Bureau\TDP7\RenduProcessor\UTILS.cabal was modified manually. Ignoring C:\Users\vljno\OneDrive\Bureau\TDP7\RenduProcessor\package.yaml in favor of the cabal file.
message (and indeed the.yaml
file is ignored. Is there a way to "regenerate" the.cabal
file from the package so that I can edit thepackage.yaml
file instead ?Vincent L said:
.cabal
file--haddock
flaghaskell-language-server
in terminal and check whether it reports any errors/warningsWhat's the syntax to add the --haddock flag to package.yaml ?
Removing Cabal and using stack yaml file is cleaning my project config, not bad
the
stack.yaml
file and the.cabal
file do not do the same thing - thestack.yaml
file is used to (roughly) specify which packages (and which versions of those packages) are available, and the*.cabal/package.yaml
file is used to specify which dependencies your build system should use and other things related to the actual build of the projectyes but when I do
stack build
, it regenerates a UTILS.cabal file using the content from package.yamlyeah, because it's needed
it's also expect that you will commit it and update it as your package.yaml changes, but not touch it directly
Yes, that was my initial mistake. Now I'm not modifying the cabal file directly.