Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gesh
GHC
Commits
e99e6347
Commit
e99e6347
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-05-18 22:39:26 by sof]
new PP;2.0x bootable
parent
6954d210
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/typecheck/TcIfaceSig.lhs
+16
-5
16 additions, 5 deletions
ghc/compiler/typecheck/TcIfaceSig.lhs
with
16 additions
and
5 deletions
ghc/compiler/typecheck/TcIfaceSig.lhs
+
16
−
5
View file @
e99e6347
...
@@ -31,7 +31,8 @@ import WwLib ( mkWrapper )
...
@@ -31,7 +31,8 @@ import WwLib ( mkWrapper )
import SpecEnv ( SpecEnv )
import SpecEnv ( SpecEnv )
import PrimOp ( PrimOp(..) )
import PrimOp ( PrimOp(..) )
import Id ( GenId, mkImported, mkUserId, isPrimitiveId_maybe, dataConArgTys )
import Id ( GenId, mkImported, mkUserId,
isPrimitiveId_maybe, dataConArgTys, SYN_IE(Id) )
import Type ( mkSynTy, getAppDataTyConExpandingDicts )
import Type ( mkSynTy, getAppDataTyConExpandingDicts )
import TyVar ( mkTyVar )
import TyVar ( mkTyVar )
import Name ( Name )
import Name ( Name )
...
@@ -45,6 +46,11 @@ import PprStyle ( PprStyle(..) )
...
@@ -45,6 +46,11 @@ import PprStyle ( PprStyle(..) )
import Util ( zipWithEqual, panic, pprTrace, pprPanic )
import Util ( zipWithEqual, panic, pprTrace, pprPanic )
import IdInfo
import IdInfo
#if __GLASGOW_HASKELL__ >= 202
import Outputable
#endif
\end{code}
\end{code}
Ultimately, type signatures in interfaces will have pragmatic
Ultimately, type signatures in interfaces will have pragmatic
...
@@ -60,6 +66,7 @@ tcInterfaceSigs :: [RenamedHsDecl] -> TcM s [Id]
...
@@ -60,6 +66,7 @@ tcInterfaceSigs :: [RenamedHsDecl] -> TcM s [Id]
tcInterfaceSigs (SigD (IfaceSig name ty id_infos src_loc) : rest)
tcInterfaceSigs (SigD (IfaceSig name ty id_infos src_loc) : rest)
= tcAddSrcLoc src_loc $
= tcAddSrcLoc src_loc $
tcAddErrCtxt (ifaceSigCtxt name) $
tcHsType ty `thenTc` \ sigma_ty ->
tcHsType ty `thenTc` \ sigma_ty ->
tcIdInfo name sigma_ty noIdInfo id_infos `thenTc` \ id_info' ->
tcIdInfo name sigma_ty noIdInfo id_infos `thenTc` \ id_info' ->
let
let
...
@@ -107,7 +114,7 @@ tcStrictness ty info (StrictnessInfo demands maybe_worker)
...
@@ -107,7 +114,7 @@ tcStrictness ty info (StrictnessInfo demands maybe_worker)
let
let
-- Watch out! We can't pull on maybe_worker_id too eagerly!
-- Watch out! We can't pull on maybe_worker_id too eagerly!
info' = case maybe_worker_id of
info' = case maybe_worker_id of
Just worker_id -> info `addUnfoldInfo` mkUnfolding
False
(wrap_fn worker_id)
Just worker_id -> info `addUnfoldInfo` mkUnfolding
NoPragmaInfo
(wrap_fn worker_id)
Nothing -> info
Nothing -> info
in
in
returnTc (info' `addStrictnessInfo` StrictnessInfo demands maybe_worker_id)
returnTc (info' `addStrictnessInfo` StrictnessInfo demands maybe_worker_id)
...
@@ -139,14 +146,14 @@ tcUnfolding name core_expr
...
@@ -139,14 +146,14 @@ tcUnfolding name core_expr
= forkNF_Tc (
= forkNF_Tc (
recoverNF_Tc no_unfolding (
recoverNF_Tc no_unfolding (
tcCoreExpr core_expr `thenTc` \ core_expr' ->
tcCoreExpr core_expr `thenTc` \ core_expr' ->
returnTc (mkUnfolding
False
core_expr')
returnTc (mkUnfolding
NoPragmaInfo
core_expr')
))
))
where
where
-- The trace tells what wasn't available, for the benefit of
-- The trace tells what wasn't available, for the benefit of
-- compiler hackers who want to improve it!
-- compiler hackers who want to improve it!
no_unfolding = getErrsTc `thenNF_Tc` \ (warns,errs) ->
no_unfolding = getErrsTc `thenNF_Tc` \ (warns,errs) ->
returnNF_Tc (pprTrace "tcUnfolding failed with:"
returnNF_Tc (pprTrace "tcUnfolding failed with:"
(
ppH
ang (ppr PprDebug name) 4 (pprBagOfErrors PprDebug errs))
(
h
ang (ppr PprDebug name) 4 (pprBagOfErrors PprDebug errs))
NoUnfolding)
NoUnfolding)
\end{code}
\end{code}
...
@@ -165,7 +172,7 @@ tcVar name
...
@@ -165,7 +172,7 @@ tcVar name
Nothing -> failTc (noDecl name)
Nothing -> failTc (noDecl name)
}
}
noDecl name sty =
ppCat [ppPStr
SLIT("Warning: no binding for"), ppr sty name]
noDecl name sty =
hsep [ptext
SLIT("Warning: no binding for"), ppr sty name]
\end{code}
\end{code}
UfCore expressions.
UfCore expressions.
...
@@ -339,4 +346,8 @@ tcCorePrim (UfCCallOp str casm gc arg_tys res_ty)
...
@@ -339,4 +346,8 @@ tcCorePrim (UfCCallOp str casm gc arg_tys res_ty)
returnTc (CCallOp str casm gc arg_tys' res_ty')
returnTc (CCallOp str casm gc arg_tys' res_ty')
\end{code}
\end{code}
\begin{code}
ifaceSigCtxt sig_name sty
= hsep [ptext SLIT("In an interface-file signature for"), ppr sty sig_name]
\end{code}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment