kowainik / stan

🕵️ Haskell STatic ANalyser
https://kowainik.github.io/projects/stan
Mozilla Public License 2.0
562 stars 48 forks source link

Break up runStan function and expose it and its components #552

Closed 0rphee closed 6 months ago

0rphee commented 6 months ago

This is no much more than anything a separation of functions, so that stan functionality can be better added to the hls-stan-plugin (https://github.com/haskell/haskell-language-server/pull/3914).

getStanConfig is the only essential one for the plugin. I factored-out the second getAnalysis to use it as-is for hls. However, that is not possible because all the internal machinery in stan works with only relative paths, while the plugin at the end requires an absolute path. I'm inclined to leave it as is, but if it were possible to change stan internals to get one version of the function with both the plugin and stan itself, that would be nicer.

This also exports runStan, but it would be no problem leaving it there.

tomjaguarpaw commented 6 months ago

Nice, thank you!

tomjaguarpaw commented 6 months ago

Released to Hackage as https://hackage.haskell.org/package/stan-0.1.2.0