Haskell-mode and stack

Hi, i’ve been coding in haskell for a while and i’m trying to use emacs these days, the thing is i’m currently using stack for building and manage dependencies, but for some reason when i use haskell mode interactive with C-c C-l in emacs my .cabal file is rewritten to stack’s default cabal file so i lost all of the flags and dependencies i configure in it, it happens just after i press C-c C-l, because i’m able to see the changes i’ve made perfectly just before i use that command, please help me understand why this happens.

1 Like

Hi @eko234

Do you have package.yaml in your project?. If so, package.yaml is your source of truth for the package structure and stack runs hpack to generate the .cabal file from it.