-
Notifications
You must be signed in to change notification settings - Fork 63
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
Avoid CPP in Config.hs #315
Comments
Rewriting should be possible, however, the parsers of |
👋 I can try to give a shot at this :) Though I would need some pointers before doing so. From what I see, the only impacted points are parsing HashMap and the use of
Do you have something specific in mind ? |
Hello! Happy to hear it! True, I think so as well, these are the only locations where we access the Keys.
I feel like we have a number of code smells, for example, we dispatch manually the cradle type in https://github.com/haskell/hie-bios/blob/master/src/HIE/Bios/Config.hs#L158. Then the individual parsers feel a little off as well, take https://github.com/haskell/hie-bios/blob/master/src/HIE/Bios/Config.hs#L203 where we explicitly check the size of the Aeson object to determine what values are possible and provide a proper error message for the user (e.g. when we fail to parse a In general, everything you would consider a code-smell can and should be re-worked! The structure and code of the types If you are not sure about something, you can either ask here or ping me in irc/matrix (libera.chat #haskell-language-server, I have the same name) |
Closing, has been fixed by #329 |
In haskell/lsp#360, compatibility with
aeson >= 2
is achieved without using CPP, we want that too, because no one likes CPP!The text was updated successfully, but these errors were encountered: