-
-
Notifications
You must be signed in to change notification settings - Fork 391
[Feature] Provide Stan integration #258
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I think it would be great if possible, but as they use .hie file, we cannot use them for GHC < 8.8... P.S. You are at the Haskell Love Conference, aren't you? :) |
Yes, and I wanted to link the existing HLS-Stan integration issue to others. That's how I noticed there is no issue yet 😛 |
Hi, I started with this, but have no particular branch yet. |
haskell/ghcide#701 is now in |
A required step for sure would be create a plugin to provide stan diagnostics and refactorings (?). I think |
I was wondering if @fendor s work is something that's "almost done", and just needs a bit of cleanup. |
@googleson78 The work got stalled, and it was not that much, so we should rather re-write it. I don't have anything workable at the moment :( |
I will try to work on this. As far as I understand, it required to add new Rule, which will call Stan |
Right, but ideally we re-use the .HIE files HLS is already generating, so we save some work. |
HLS writes getHieFile :: NormalizedFilePath -> Action (Maybe HieFile)
getHieFile nfp = runMaybeT $ do
HAR{hieAst} <- MaybeT $ use GetHieAst nfp
tmr <- MaybeT $ use TypeCheck nfp
ghc <- MaybeT $ use GhcSession nfp
msr <- MaybeT $ use GetModSummaryWithoutTimestamps nfp
source <- lift $ getSourceFileSource nfp
let exports = tcg_exports $ tmrTypechecked tmr
typedAst <- MaybeT $ pure $ cast hieAst
liftIO $ runHsc (hscEnv ghc) $ mkHieFile' (msrModSummary msr) exports typedAst source |
Got error:
|
Add a Typeable constraint in the HAR constructor of the HieAstResult data type |
@pepeiborra Thank you very much, your code worked. Created WIP PR. |
I propose HLS supports Stan integration, what do you think?
The text was updated successfully, but these errors were encountered: