Skip to content
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

Check for dangerous and unsafe functions #813

Open
yaxu opened this issue Mar 30, 2021 · 2 comments
Open

Check for dangerous and unsafe functions #813

yaxu opened this issue Mar 30, 2021 · 2 comments

Comments

@yaxu
Copy link
Member

yaxu commented Mar 30, 2021

Useful list and hlint config here:
https://github.com/NorfairKing/haskell-dangerous-functions

@jwaldmann
Copy link
Contributor

I am looking into this (as a way of refreshing my knowledge of Tidal's code...) NB: NorfairKing/haskell-dangerous-functions#18

@jwaldmann
Copy link
Contributor

With this "dangerous function" hlint.yaml, I get this report on Tidal's current main branch: https://www.imn.htwk-leipzig.de/~waldmann/etc/Tidal/

This reports all warnings (including those from hlint's default settings) I guess that "dangerous functions" are listed under "avoid restricted function".

NB: It's a bit strange (for me) to see "return" there, but apparently it should be "pure". That's a matter of style only? No, this page https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return says it's "error prone" (default declarations of Applicative.pure and Monad.return refer to each other => non-termination).

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

No branches or pull requests

2 participants