Skip to content

Commit 1e2fd7a

Browse files
Add exception to the restricted function hint for eval plugin.
1 parent c434319 commit 1e2fd7a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

ghcide/.hlint.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
# Things that are unsafe in Haskell base library
115115
- {name: unsafeInterleaveIO, within: []}
116116
- {name: unsafeDupablePerformIO, within: []}
117-
- {name: unsafeCoerce, within: []}
117+
- {name: unsafeCoerce, within: [Ide.Plugin.Eval.Code]}
118118
# Things that are a bit dangerous in the GHC API
119119
- {name: nameModule, within: []}
120120

plugins/hls-eval-plugin/src/Ide/Plugin/Eval/Code.hs

-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ asStmts (Example e _) = NE.toList e
8080
asStmts (Property t _) =
8181
["prop11 = " ++ t, "(propEvaluation prop11 :: IO String)"]
8282

83-
{- HLINT ignore evalExpr "Avoid restricted function" -}
84-
8583
-- |Evaluate an expression (either a pure expression or an IO a)
8684
evalExpr :: GhcMonad m => [Char] -> m String
8785
evalExpr e = do

0 commit comments

Comments
 (0)