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
Alex D
GHC
Commits
7fcd6808
Commit
7fcd6808
authored
Jan 03, 2019
by
Richard Eisenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some typos, etc., in comments.
[ci skip]
parent
17bd1635
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
compiler/types/CoAxiom.hs
compiler/types/CoAxiom.hs
+1
-1
compiler/types/FamInstEnv.hs
compiler/types/FamInstEnv.hs
+8
-5
No files found.
compiler/types/CoAxiom.hs
View file @
7fcd6808
...
...
@@ -223,7 +223,7 @@ data CoAxBranch
,
cab_tvs
::
[
TyVar
]
-- Bound type variables; not necessarily fresh
,
cab_eta_tvs
::
[
TyVar
]
-- Eta-reduced tyvars
-- See Note [CoAxBranch type variables]
-- cab_tvs and cab_lhs
may be eta-reduded; see FamInstEnv
-- cab_tvs and cab_lhs
may be eta-reduded; see
-- Note [Eta reduction for data families]
,
cab_cvs
::
[
CoVar
]
-- Bound coercion variables
-- Always empty, for now.
...
...
compiler/types/FamInstEnv.hs
View file @
7fcd6808
...
...
@@ -615,10 +615,11 @@ If we're not careful during tidying, then when this program is compiled with
axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 ::
Sing _ = DataFamilyInstanceLHS.R:SingMyKind_ _
Its misleading to have a wildcard type appearing on the RHS like
that. To avoid this issue, during tidying, we always opt to add a
numeric suffix to types that are simply `_`. That way, you instead end
up with:
It's misleading to have a wildcard type appearing on the RHS like
that. To avoid this issue, when building a CoAxiom (which is what eventually
gets printed above), we tidy all the variables in an env that already contains
'_'. Thus, any variable named '_' will be renamed, giving us the nicer output
here:
COERCION AXIOMS
axiom DataFamilyInstanceLHS.D:R:SingMyKind_0 ::
...
...
@@ -626,7 +627,9 @@ up with:
Which is at least legal syntax.
See also Note [CoAxBranch type variables] in CoAxiom
See also Note [CoAxBranch type variables] in CoAxiom; note that we
are tidying (changing OccNames only), not freshening, in accordance with
that Note.
-}
-- all axiom roles are Nominal, as this is only used with type families
...
...
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