haskell-ide-engine icon indicating copy to clipboard operation
haskell-ide-engine copied to clipboard

Should we provide a means to generate a multi-cradle file?

Open alanz opened this issue 4 years ago • 0 comments

As I understand it, a multi-cradle hie.yaml maps from files to components in the cabal file.

This can be done in a mechanical way, that will be correct 95% of the time.

Perhaps we should provide a code action etc to do this. Possibly triggered when the hie-bios is not able to load a given file.

e.g. if the hie.yaml is

cradle: {stack: {component: "ghcide:lib"}}

and the user opens the file exe/Main.hs, this fails, but perhaps we need a code action to generate a cradle like

cradle:
  stack:
    - path: "./src/"
      component: "ghcide:lib"
    - path: "./exe/Main.hs"
      component: "ghcide:exe"

(hand made example, may not work).

alanz avatar Dec 31 '19 11:12 alanz