简体   繁体   中英

.cabal file keeps reverting to template on save in Visual Studio Code

I've been going through the book Haskell Programming from First Principles and I've gotten to the section on testing where I've started to encounter this strange issue.

Whenever I try and edit the.cabal file for my project, every time I save it it reverts back to the template.cabal file that is generated when creating a project with stack.

I've tried saving without formatting and editing the file in Notes (I'm on Mac), saving, and then reopening the project in vscode (this also reverts the file to the template).

Does anyone have any idea what might be going on? I'm using the basic Haskell extension, the syntax highlighting extension, the debugging extension (which I have not gotten to work, anyway), and brittany for auto-formatting.

Thanks all!

When I checked my package.yaml (as referenced by @Koterpillar) I realized that it was acting as a generator of sorts for my .cabal file.

I then edited package.yaml with the information I needed and it fixed my issue. My .cabal file now contains the appropriate parameters.

Thanks @Koterpillar!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM