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,251
Issues
4,251
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
394
Merge Requests
394
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
00571252
Commit
00571252
authored
Feb 15, 2016
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments and white space
parent
f6b98ea7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
compiler/coreSyn/CoreLint.hs
compiler/coreSyn/CoreLint.hs
+7
-2
No files found.
compiler/coreSyn/CoreLint.hs
View file @
00571252
...
...
@@ -1231,6 +1231,11 @@ lintStarCoercion g
lintCoercion
::
OutCoercion
->
LintM
(
LintedKind
,
LintedKind
,
LintedType
,
LintedType
,
Role
)
-- Check the kind of a coercion term, returning the kind
-- Post-condition: the returned OutTypes are lint-free
--
-- If lintCorecion co = (k1, k2, s1, s2, r)
-- then co :: s1 ~r s2
-- s1 :: k2
-- s2 :: k2
-- If you edit this function, you may need to update the GHC formalism
-- See Note [GHC Formalism]
...
...
@@ -1266,7 +1271,7 @@ lintCoercion co@(AppCo co1 co2)
|
Refl
_
(
TyConApp
{})
<-
co1
=
failWithL
(
text
"Refl (TyConApp ...) to the left of AppCo:"
<+>
ppr
co
)
|
otherwise
=
do
{
(
k1
,
k2
,
s1
,
s2
,
r1
)
<-
lintCoercion
co1
=
do
{
(
k1
,
k2
,
s1
,
s2
,
r1
)
<-
lintCoercion
co1
;
(
k'1
,
k'2
,
t1
,
t2
,
r2
)
<-
lintCoercion
co2
;
k3
<-
lint_co_app
co
k1
[(
t1
,
k'1
)]
;
k4
<-
lint_co_app
co
k2
[(
t2
,
k'2
)]
...
...
@@ -1448,7 +1453,7 @@ lintCoercion co@(AxiomInstCo con ind cos)
(
empty_subst
,
empty_subst
)
(
zip3
(
ktvs
++
cvs
)
roles
cos
)
;
let
lhs'
=
substTys
subst_l
lhs
rhs'
=
substTy
subst_r
rhs
rhs'
=
substTy
subst_r
rhs
;
case
checkAxInstCo
co
of
Just
bad_branch
->
bad_ax
$
text
"inconsistent with"
<+>
pprCoAxBranch
con
bad_branch
...
...
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