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
4,321
Issues
4,321
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
362
Merge Requests
362
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
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
Glasgow Haskell Compiler
GHC
Commits
c4854c78
Commit
c4854c78
authored
Oct 15, 2001
by
simonpj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[project @ 2001-10-15 15:05:17 by simonpj]
Rename ifaceTyCls to ifaceTyThing (more consistent)
parent
3d5a3720
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
ghc/compiler/ghci/InteractiveUI.hs
ghc/compiler/ghci/InteractiveUI.hs
+2
-2
ghc/compiler/hsSyn/HsDecls.lhs
ghc/compiler/hsSyn/HsDecls.lhs
+1
-1
ghc/compiler/main/MkIface.lhs
ghc/compiler/main/MkIface.lhs
+11
-11
No files found.
ghc/compiler/ghci/InteractiveUI.hs
View file @
c4854c78
-----------------------------------------------------------------------------
-- $Id: InteractiveUI.hs,v 1.9
1 2001/08/20 16:17:17 simonmar
Exp $
-- $Id: InteractiveUI.hs,v 1.9
2 2001/10/15 15:05:17 simonpj
Exp $
--
-- GHC Interactive User Interface
--
...
...
@@ -399,7 +399,7 @@ info s = do
showThing
(
ty_thing
,
fixity
)
=
vcat
[
text
"-- "
<>
showTyThing
ty_thing
,
showFixity
fixity
(
getName
ty_thing
),
ppr
(
ifaceTy
Cls
ty_thing
)
]
ppr
(
ifaceTy
Thing
ty_thing
)
]
showFixity
fix
name
|
fix
==
defaultFixity
=
empty
...
...
ghc/compiler/hsSyn/HsDecls.lhs
View file @
c4854c78
...
...
@@ -611,7 +611,7 @@ instance (Outputable name) => Outputable (ConDecl name) where
ppr_con_details con (InfixCon ty1 ty2)
= hsep [ppr_bang ty1, ppr con, ppr_bang ty2]
-- ConDecls generated by MkIface.ifaceTy
Cls
always have a VanillaCon, even
-- ConDecls generated by MkIface.ifaceTy
Thing
always have a VanillaCon, even
-- if the constructor is an infix one. This is because in an interface file
-- we don't distinguish between the two. Hence when printing these for the
-- user, we need to parenthesise infix constructor names.
...
...
ghc/compiler/main/MkIface.lhs
View file @
c4854c78
...
...
@@ -8,7 +8,7 @@
module MkIface (
mkFinalIface,
pprModDetails, pprIface, pprUsage,
ifaceTy
Cls
,
ifaceTy
Thing
,
) where
#include "HsVersions.h"
...
...
@@ -118,7 +118,7 @@ mkFinalIface ghci_mode dflags location
hi_file_path = ml_hi_file location
new_decls = mkIfaceDecls ty_cls_dcls rule_dcls inst_dcls
inst_dcls = map ifaceInstance (md_insts new_details)
ty_cls_dcls = foldNameEnv ifaceTy
Cls
_acc [] (md_types new_details)
ty_cls_dcls = foldNameEnv ifaceTy
Thing
_acc [] (md_types new_details)
rule_dcls = map ifaceRule (md_rules new_details)
orphan_mod = isOrphanModule (mi_module new_iface) new_details
...
...
@@ -144,18 +144,18 @@ Implicit Ids and class tycons aren't included in interface files, so
we miss them out of the accumulating parameter here.
\begin{code}
ifaceTy
Cls
_acc :: TyThing -> [RenamedTyClDecl] -> [RenamedTyClDecl]
ifaceTy
Cls
_acc (AnId id) so_far | isImplicitId id = so_far
ifaceTy
Cls
_acc (ATyCon id) so_far | isClassTyCon id = so_far
ifaceTy
Cls_acc other so_far = ifaceTyCls
other : so_far
ifaceTy
Thing
_acc :: TyThing -> [RenamedTyClDecl] -> [RenamedTyClDecl]
ifaceTy
Thing
_acc (AnId id) so_far | isImplicitId id = so_far
ifaceTy
Thing
_acc (ATyCon id) so_far | isClassTyCon id = so_far
ifaceTy
Thing_acc other so_far = ifaceTyThing
other : so_far
\end{code}
Convert *any* TyThing into a RenamedTyClDecl. Used both for
generating interface files and for the ':info' command in GHCi.
\begin{code}
ifaceTy
Cls
:: TyThing -> RenamedTyClDecl
ifaceTy
Cls
(AClass clas) = cls_decl
ifaceTy
Thing
:: TyThing -> RenamedTyClDecl
ifaceTy
Thing
(AClass clas) = cls_decl
where
cls_decl = ClassDecl { tcdCtxt = toHsContext sc_theta,
tcdName = getName clas,
...
...
@@ -182,7 +182,7 @@ ifaceTyCls (AClass clas) = cls_decl
GenDefMeth -> GenDefMeth
DefMeth id -> DefMeth (getName id)
ifaceTy
Cls
(ATyCon tycon) = ty_decl
ifaceTy
Thing
(ATyCon tycon) = ty_decl
where
ty_decl | isSynTyCon tycon
= TySynonym { tcdName = getName tycon,
...
...
@@ -218,7 +218,7 @@ ifaceTyCls (ATyCon tycon) = ty_decl
tcdSysNames = [],
tcdLoc = noSrcLoc }
| otherwise = pprPanic "ifaceTy
Cls
" (ppr tycon)
| otherwise = pprPanic "ifaceTy
Thing
" (ppr tycon)
tyvars = tyConTyVars tycon
(_, syn_ty) = getSynTyConDefn tycon
...
...
@@ -246,7 +246,7 @@ ifaceTyCls (ATyCon tycon) = ty_decl
mk_field strict_mark field_label
= ([getName field_label], BangType strict_mark (toHsType (fieldLabelType field_label)))
ifaceTy
Cls
(AnId id) = iface_sig
ifaceTy
Thing
(AnId id) = iface_sig
where
iface_sig = IfaceSig { tcdName = getName id,
tcdType = toHsType id_type,
...
...
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