implicit-hie icon indicating copy to clipboard operation
implicit-hie copied to clipboard

Support curly braces

Open anka-213 opened this issue 5 years ago • 7 comments
trafficstars

Cabal files apparently allows writing curly braces around blocks, which confuses implicit-hie. For example, this file: https://github.com/ivan-m/graphviz/blob/42dbb6312d7edf789d7055079de7b4fa099a4acc/graphviz.cabal#L59

Library {

-- ...

will generate a hie.yaml file like this

cradle:
  cabal:
    - path: "./"
      component: "graphviz:lib:{"

# ...

instead of the expected

cradle:
  cabal:
    - path: "./"
      component: "lib:graphviz"

# ...

anka-213 avatar Nov 16 '20 21:11 anka-213

Is cabal indent insensitive within curly blocks?

Avi-D-coder avatar Nov 17 '20 00:11 Avi-D-coder

What does index sensitive mean?

anka-213 avatar Nov 17 '20 13:11 anka-213

oops, indent insensitive.

Avi-D-coder avatar Nov 18 '20 00:11 Avi-D-coder

Just hit this trying to load the Graphviz library in to HLS. No idea why it uses those braces, but, well, if Cabal accepts them...

georgefst avatar Feb 04 '21 15:02 georgefst

Unfortunately, I don't have any time to work on this in the next two weeks.

Avi-D-coder avatar Feb 04 '21 17:02 Avi-D-coder

I ran into this with brittany: https://github.com/lspitzner/brittany/blob/4d064db674203626fe5011d10874fcbc335ec9b1/brittany.cabal#L47

noughtmare avatar Apr 21 '21 17:04 noughtmare

I'll take a look this weekend.

Avi-D-coder avatar Apr 21 '21 20:04 Avi-D-coder