kowainik / stan

🕵️ Haskell STatic ANalyser
https://kowainik.github.io/projects/stan
Mozilla Public License 2.0
566 stars 48 forks source link

Add 'fromIntegral' inspection as anti-pattern #377

Open chshersh opened 4 years ago

chshersh commented 4 years ago

fromIntegral produces unexpected results for almost all types and is partial for Natural. We can recommend safer versions of this function.

Additionally, we can add possible solutions for already existing fromInteger inspection: