implicit-hie
implicit-hie copied to clipboard
Support curly braces
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"
# ...
Is cabal indent insensitive within curly blocks?
What does index sensitive mean?
oops, indent insensitive.
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...
Unfortunately, I don't have any time to work on this in the next two weeks.
I ran into this with brittany: https://github.com/lspitzner/brittany/blob/4d064db674203626fe5011d10874fcbc335ec9b1/brittany.cabal#L47
I'll take a look this weekend.