Skip to content

Commit 86dd667

Browse files
committed
Remove unused functions
1 parent 28704bb commit 86dd667

File tree

1 file changed

+0
-28
lines changed
  • plugins/hls-eval-plugin/src/Ide/Plugin/Eval

1 file changed

+0
-28
lines changed

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
-- |GHC API utilities
77
module Ide.Plugin.Eval.GHC (
8-
isExpr,
98
addExtension,
109
addImport,
1110
hasPackage,
@@ -42,33 +41,6 @@ import StringBuffer (stringToStringBuffer)
4241
"/Users/titto/.ghcup/ghc/8.8.4/lib/ghc-8.8.4"
4342
-}
4443

45-
{- | Returns true if string is an expression
46-
47-
>>> isExprTst e df = return (isExpr df e)
48-
>>> run $ isExprTst "3"
49-
True
50-
51-
>>> run $ isExprTst "(x+y)"
52-
True
53-
54-
>>> run $ isExprTst "import Data.Maybe"
55-
False
56-
57-
>>> run $ isExprTst "three=3"
58-
False
59-
-}
60-
isExpr :: DynFlags -> String -> Bool
61-
isExpr df stmt = case parseThing Parser.parseExpression df stmt of
62-
Lexer.POk _ _ -> True
63-
Lexer.PFailed{} -> False
64-
65-
parseThing :: Lexer.P thing -> DynFlags -> String -> Lexer.ParseResult thing
66-
parseThing parser dflags stmt = do
67-
let buf = stringToStringBuffer stmt
68-
loc = mkRealSrcLoc (fsLit "<interactive>") 1 1
69-
70-
Lexer.unP parser (Lexer.mkPState dflags buf loc)
71-
7244
{- | True if specified package is present in DynFlags
7345
7446
-- >>> hasPackageTst pkg = run $ \df -> return (hasPackage df pkg)

0 commit comments

Comments
 (0)