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
d271ecde
Commit
d271ecde
authored
27 years ago
by
sof
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1997-06-05 20:20:56 by sof]
removed pragma pruning from rnDecl (now done in RnIfaces.loadDecl)
parent
a91391b9
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/compiler/rename/RnSource.lhs
+20
-20
20 additions, 20 deletions
ghc/compiler/rename/RnSource.lhs
with
20 additions
and
20 deletions
ghc/compiler/rename/RnSource.lhs
+
20
−
20
View file @
d271ecde
...
...
@@ -8,9 +8,14 @@
module RnSource ( rnDecl, rnHsType, rnHsSigType ) where
IMPORT_1_3(List(partition))
IMP_Ubiq()
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
IMPORT_DELOOPER(RnLoop) -- *check* the RnPass/RnExpr/RnBinds loop-breaking
IMPORT_1_3(List(partition))
#else
import {-# SOURCE #-} RnExpr
#endif
import HsSyn
import HsDecls ( HsIdInfo(..) )
...
...
@@ -87,17 +92,11 @@ rnDecl (SigD (IfaceSig name ty id_infos loc))
= pushSrcLocRn loc $
lookupBndrRn name `thenRn` \ name' ->
rnHsType ty `thenRn` \ ty' ->
-- Get the pragma info, unless we should ignore it
(if opt_IgnoreIfacePragmas then
returnRn []
else
setModeRn (InterfaceMode Optional) $
-- In all the rest of the signature we read in optional mode,
-- so that (a) we don't die
mapRn rnIdInfo id_infos
) `thenRn` \ id_infos' ->
-- Get the pragma info (if any).
setModeRn (InterfaceMode Optional) $
-- In all the rest of the signature we read in optional mode,
-- so that (a) we don't die
mapRn rnIdInfo id_infos `thenRn` \ id_infos' ->
returnRn (SigD (IfaceSig name' ty' id_infos' loc))
\end{code}
...
...
@@ -157,14 +156,15 @@ original names, reporting any unknown names.
\begin{code}
rnDecl (ClD (ClassDecl context cname tyvar sigs mbinds pragmas src_loc))
= pushSrcLocRn src_loc $
bindTyVarsRn cls_doc [tyvar] $ \ [tyvar'] ->
rnContext context `thenRn` \ context' ->
lookupBndrRn cname `thenRn` \ cname' ->
-- Check the signatures
checkDupOrQualNames sig_doc sig_names `thenRn_`
mapRn (rn_op cname' (getTyVarName tyvar')) sigs `thenRn` \ sigs' ->
bindTyVarsRn cls_doc [tyvar] ( \ [tyvar'] ->
rnContext context `thenRn` \ context' ->
lookupBndrRn cname `thenRn` \ cname' ->
-- Check the signatures
checkDupOrQualNames sig_doc sig_names `thenRn_`
mapRn (rn_op cname' (getTyVarName tyvar')) sigs `thenRn` \ sigs' ->
returnRn (tyvar', context', cname', sigs')
) `thenRn` \ (tyvar', context', cname', sigs') ->
-- Check the methods
checkDupOrQualNames meth_doc meth_names `thenRn_`
...
...
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