Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobias Decking
GHC
Commits
def40b89
Commit
def40b89
authored
Apr 22, 2005
by
simonpj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2005-04-22 02:10:10 by simonpj]
Fix hi-boot interface-finding code
parent
effd3425
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
ghc/compiler/iface/TcIface.lhs
ghc/compiler/iface/TcIface.lhs
+18
-6
No files found.
ghc/compiler/iface/TcIface.lhs
View file @
def40b89
...
...
@@ -30,7 +30,7 @@ import TypeRep ( Type(..), PredType(..) )
import TyCon ( TyCon, tyConName, isSynTyCon )
import HscTypes ( ExternalPackageState(..), EpsStats(..), PackageInstEnv,
HscEnv, TyThing(..), tyThingClass, tyThingTyCon,
ModIface(..), ModDetails(..), ModGuts,
ModIface(..), ModDetails(..), ModGuts,
HomeModInfo(..),
emptyModDetails,
extendTypeEnv, lookupTypeEnv, lookupType, typeEnvIds )
import InstEnv ( extendInstEnvList )
...
...
@@ -64,7 +64,7 @@ import ErrUtils ( Message )
import Maybes ( MaybeErr(..) )
import SrcLoc ( noSrcLoc )
import Util ( zipWithEqual, dropList, equalLength )
import DynFlags
( DynFlag(..)
)
import DynFlags
( DynFlag(..), isOneShot
)
\end{code}
This module takes
...
...
@@ -222,9 +222,21 @@ tcHiBootIface :: Module -> TcRn ModDetails
tcHiBootIface mod
= do { traceIf (text "loadHiBootInterface" <+> ppr mod)
-- We're read all the direct imports by now, so eps_is_boot will
-- record if any of our imports mention us by way of hi-boot file
; eps <- getEps
; mode <- getGhciMode
; if not (isOneShot mode)
-- In --make and interactive mode, if this module has an hs-boot file
-- we'll have compiled it already, and it'll be in the HPT
then do { hpt <- getHpt
; case lookupModuleEnv hpt mod of
Just info -> return (hm_details info)
Nothing -> return emptyModDetails }
else do
-- OK, so we're in one-shot mode.
-- In that case, we're read all the direct imports by now,
-- so eps_is_boot will record if any of our imports mention us by
-- way of hi-boot file
{ eps <- getEps
; case lookupModuleEnv (eps_is_boot eps) mod of {
Nothing -> return emptyModDetails ; -- The typical case
...
...
@@ -242,7 +254,7 @@ tcHiBootIface mod
; case read_result of
Failed err -> failWithTc (elaborate err)
Succeeded (iface, _path) -> typecheckIface iface
}}}
}}}
}
where
need = ptext SLIT("Need the hi-boot interface for") <+> ppr mod
<+> ptext SLIT("to compare against the Real Thing")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment