Skip to content

Commit efb7fe2

Browse files
committed
Remove unused TopIfaceBinding type
1 parent f16c7c4 commit efb7fe2

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

ghcide/src/Development/IDE/GHC/CoreFile.hs

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ module Development.IDE.GHC.CoreFile
1313
) where
1414

1515
import Control.Monad
16-
import Data.Foldable
1716
import Data.IORef
1817
import Data.Maybe
1918
import Development.IDE.GHC.Compat
@@ -44,33 +43,6 @@ data CoreFile
4443
, cf_iface_hash :: !Fingerprint
4544
}
4645

47-
-- | Like IfaceBinding, but lets us serialize internal names as well
48-
data TopIfaceBinding v
49-
= TopIfaceNonRec v IfaceExpr
50-
| TopIfaceRec [(v, IfaceExpr)]
51-
deriving (Functor, Foldable, Traversable)
52-
53-
-- | GHC doesn't export 'tcIdDetails', 'tcIfaceInfo', or 'tcIfaceType',
54-
-- but it does export 'tcIfaceDecl'
55-
-- so we use `IfaceDecl` as a container for all of these
56-
-- invariant: 'IfaceId' is always a 'IfaceId' constructor
57-
type IfaceId = IfaceDecl
58-
59-
instance Binary (TopIfaceBinding IfaceId) where
60-
put_ bh (TopIfaceNonRec d e) = do
61-
putByte bh 0
62-
put_ bh d
63-
put_ bh e
64-
put_ bh (TopIfaceRec vs) = do
65-
putByte bh 1
66-
put_ bh vs
67-
get bh = do
68-
t <- getByte bh
69-
case t of
70-
0 -> TopIfaceNonRec <$> get bh <*> get bh
71-
1 -> TopIfaceRec <$> get bh
72-
_ -> error "Binary TopIfaceBinding"
73-
7446
instance Binary CoreFile where
7547
put_ bh (CoreFile core fp) = lazyPut bh core >> put_ bh fp
7648
get bh = CoreFile <$> lazyGet bh <*> get bh

0 commit comments

Comments
 (0)