1
1
mirror of https://github.com/github/semantic.git synced 2024-11-27 12:57:49 +03:00

Annotate attemptUnsafeArithmetic explicitly.

This commit is contained in:
Rob Rix 2018-06-19 09:55:55 -04:00
parent 85c91ab693
commit 211110c0f3
2 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@
# Blacklist some functions by default.
- functions:
- {name: unsafePerformIO, within: [Data.Scientific.Exts]} # unsafePerformIO has to be explicitly whitelisted
- {name: unsafePerformIO, within: []} # unsafePerformIO has to be explicitly whitelisted
- {name: unsafeCoerce, within: []} # unsafeCoerce has to be explicitly whitelisted
- {name: head, within: []}
- {name: tail, within: []}

View File

@ -106,3 +106,5 @@ parser = signed (choice [hex, oct, bin, dec]) where
attemptUnsafeArithmetic :: a -> Either ArithException a
attemptUnsafeArithmetic = unsafePerformIO . Exc.try . evaluate
{-# NOINLINE attemptUnsafeArithmetic #-}
{-# ANN attemptUnsafeArithmetic ("HLint: ignore Avoid restricted function" :: String) #-}