-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"stan: nodeInfo" with ghc-9.4.7 #541
Comments
This also seems to happen in 9.6.3, with hls: haskell/haskell-language-server#3885 |
In this case, after changing the offending lines https://github.com/kowainik/stan/blob/ddcd461be0bfe3ff7d5353ff6f5d64fb0536c38e/src/Stan/Hie/Compat904.hs#L52C1-L58C74 nodeInfo :: HieAST a -> NodeInfo a
nodeInfo h = case (lookup' SourceInfo, lookup' GeneratedInfo) of
(Nothing, Nothing) ->
let a = error "nodeInfo Nothing Nothing"
in
-- NodeInfo S.empty [] M.empty
a
(Just n1, Nothing) -> n1
(Nothing, Just b) -> let a = error "nodeInfo Nothing Just"
in
-- b
a
(Just n1, Just{}) -> n1
where lookup' k = Map.lookup k (getSourcedNodeInfo (sourcedNodeInfo h)) gives us
For liquid-fixpoint and ghcide in hls, the error happens with the Returning the value from the Just might be a good enough solution though @tomjaguarpaw . |
Thanks for reporting this @facundominguez. Sorry for not responding earlier. I didn't have notifications on for this repository so I was only notified when I was mentioned. And thanks for jumping on this @0rphee. This code is in |
I guess we should replace |
WIP fixing this here: https://github.com/tomjaguarpaw/stan/tree/nodeInfo |
There seem to be some cases in which SourceInfo doesn't exist, and those led to run time crashes. See, for example * kowainik#541 * haskell/haskell-language-server#3885 Fixes: kowainik#541
Fixed and released to Hackage: https://hackage.haskell.org/package/stan-0.1.1.0 I managed to track this down to |
Thanks @tomjaguarpaw! |
Hello! When running
stan
withghc-9.4.7
in the liquid-fixpoint repo I get the following crash and error messageThe error is rather uninformative to me. Is there anything I could do about it?
The text was updated successfully, but these errors were encountered: