Skip to content

Commit d2846c5

Browse files
committed
cleanup: Remove redundant imports
From GHC.Debugger.Runtime.Instances
1 parent 910625f commit d2846c5

4 files changed

Lines changed: 20 additions & 26 deletions

File tree

haskell-debugger/GHC/Debugger/Runtime/Instances.hs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,18 @@
11
{-# LANGUAGE TemplateHaskell, LambdaCase, BlockArguments #-}
22
module GHC.Debugger.Runtime.Instances where
33

4-
import Control.Exception
54
import Control.Monad
65
import Control.Monad.Reader
76

87
import GHC
9-
import GHC.Builtin.Names
10-
import GHC.Core.TyCon
11-
import GHC.Core.Type
12-
import GHC.Driver.Config
138
import GHC.Driver.Env
14-
import GHC.Driver.Main
15-
import GHC.HsToCore.Expr
16-
import GHC.HsToCore.Monad
179
import GHC.Plugins
18-
import GHC.Rename.Env
19-
import GHC.Rename.Expr
2010
import GHC.Runtime.Eval
2111
import GHC.Runtime.Heap.Inspect
2212
import GHC.Runtime.Interpreter as Interp
23-
import GHC.Tc.Gen.Expr
24-
import GHC.Tc.Solver
25-
import GHC.Tc.Types.Evidence
26-
import GHC.Tc.Utils.Env
27-
import GHC.Tc.Utils.Monad
28-
import GHC.Tc.Utils.TcType
29-
import GHC.Tc.Zonk.Type
30-
import GHCi.Message
3113

3214
import GHC.Debugger.Monad
33-
import GHC.Debugger.Session.Builtin
3415
import GHC.Debugger.View.Class
35-
import GHC.Debugger.Logger as Logger
3616

3717
import GHC.Debugger.Runtime.Instances.Discover
3818

test/golden/T135/T135.hdb-stdin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
run

test/golden/T135/T135.hdb-stdout

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[1 of 3] Compiling GHC.Debugger.View.Class ( in-memory:GHC.Debugger.View.Class, interpreted )[haskell-debugger-view-in-memory]
2+
[2 of 3] Compiling Main ( <TEMPORARY-DIRECTORY>/myapp/app/Main.hs, interpreted )[myapp-0.1.0.0-inplace-myapp]
3+
<TEMPORARY-DIRECTORY>/myapp/app/Main.hs:3:1: warning: [GHC-66111] [-Wunused-imports]
4+
The import of ‘MyLib’ is redundant
5+
except perhaps to import instances from ‘MyLib’
6+
To import instances alone, use: import MyLib()
7+
 |
8+
3 | import MyLib (someFunc)
9+
 | ^^^^^^^^^^^^^^^^^^^^^^^
10+
11+
(hdb) Hello, Haskell!
12+
EvalCompleted {resultVal = "()", resultType = "()", resultStructureRef = NoVariables}
13+
(hdb) Exiting...

test/golden/T135/T135.hdb-test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
2-
mkdir -p mystore
3-
STORE=$PWD/mystore
4-
(cd mylib && cabal --store-dir="$STORE" install --lib --package-env .)
5-
MYPKGDB=$(echo "$STORE"/ghc-*/package.db)
6-
cd myapp || exit 11
7-
hdb app/Main.hs --extra-ghc-options=-package-db="$MYPKGDB"
2+
# mkdir -p mystore
3+
# STORE=$PWD/mystore
4+
# hie-bios already handles setting up its own pkgdb I think
5+
# (cd mylib && cabal -v0 --store-dir="$STORE" install --lib --package-env .)
6+
# MYPKGDB=$(echo "$STORE"/ghc-*/package.db)
7+
hdb -v0 myapp/app/Main.hs < T135.hdb-stdin # the pkgdb is filled in by hie-bios (--extra-ghc-args -package-db="$MYPKGDB")

0 commit comments

Comments
 (0)