Tidal icon indicating copy to clipboard operation
Tidal copied to clipboard

Check for dangerous and unsafe functions

Open yaxu opened this issue 3 years ago • 2 comments

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

yaxu avatar Mar 30 '21 13:03 yaxu

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

jwaldmann avatar Nov 30 '21 19:11 jwaldmann

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).

jwaldmann avatar Dec 01 '21 12:12 jwaldmann