Skip to content

Possible feature: Strictness annotations #1925

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

Open
unhammer opened this issue Jun 15, 2021 · 2 comments
Open

Possible feature: Strictness annotations #1925

unhammer opened this issue Jun 15, 2021 · 2 comments
Labels

Comments

@unhammer
Copy link

With

ghc --show-iface Foo.hi|grep -C10 Strictness:

you can see the demand analysis(?) for each function, cf. https://ghc.gitlab.haskell.org/ghc/doc/users_guide/using-optimisation.html?highlight=demand#ghc-flag--fstrictness According to https://ghc.readthedocs.io/en/latest/sooner.html#faster-producing-a-program-that-runs-quicker (“How do I find out a function’s strictness?”) this info is useful for debugging performance issues as well as allegedly being fun to look at.

Could/should haskell-language-server be able to show strictness annotations? I imagine it might be useful to be able to see such strictness hints some times (when the user requests it), perhaps displayed similar types in a little popup/overlay.

(No reproduction steps for this issue since it's just a feature idea discussion, moved from https://old.reddit.com/r/haskell/comments/nz5hym/ann_haskelllanguageserver120_has_been_released/h1qamg9/ )

@unhammer unhammer changed the title Possible feature idea Possible feature: Strictness annotations Jun 15, 2021
@jneira
Copy link
Member

jneira commented Jun 15, 2021

Thanks for the feature request, i think add diagnostics about performance like this could be useful for intermmediate/advanced haskellers

@michaelpj
Copy link
Collaborator

Related: #2529

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants