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
359
Merge Requests
359
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
a2ce3afa
Commit
a2ce3afa
authored
Apr 14, 2015
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments and white space only
parent
25f2d688
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
compiler/typecheck/TcFlatten.hs
compiler/typecheck/TcFlatten.hs
+2
-2
compiler/typecheck/TcRules.hs
compiler/typecheck/TcRules.hs
+7
-3
No files found.
compiler/typecheck/TcFlatten.hs
View file @
a2ce3afa
...
...
@@ -553,7 +553,7 @@ instance Applicative FlatM where
liftTcS
::
TcS
a
->
FlatM
a
liftTcS
thing_inside
=
FlatM
$
const
thing_inside
=
FlatM
$
const
thing_inside
emitFlatWork
::
Ct
->
FlatM
()
-- See Note [The flattening work list]
...
...
@@ -622,7 +622,7 @@ setEqRel new_eq_rel thing_inside
if
new_eq_rel
==
fe_eq_rel
env
then
runFlatM
thing_inside
env
else
runFlatM
thing_inside
(
env
{
fe_eq_rel
=
new_eq_rel
})
-- | Change the 'FlattenMode' in a 'FlattenEnv'.
setMode
::
FlattenMode
->
FlatM
a
->
FlatM
a
setMode
new_mode
thing_inside
...
...
compiler/typecheck/TcRules.hs
View file @
a2ce3afa
...
...
@@ -227,11 +227,15 @@ revert to SimplCheck when going under an implication.
------------------------ So the plan is this -----------------------
* Step 0: typecheck the LHS and RHS to get constraints from each
* Step 1: Simplify the LHS and RHS constraints all together in one bag
We do this to discover all unification equalities
* Step 2: Zonk the ORIGINAL lhs constraints, and partition them into
the ones we will quantify over, and the others
* Step 2: Zonk the ORIGINAL (unsimplified) lhs constraints, to take
advantage of those unifications, and partition them into the
ones we will quantify over, and the others
See Note [RULE quantification over equalities]
* Step 3: Decide on the type variables to quantify over
...
...
@@ -251,7 +255,7 @@ From the RULE we get
lhs-constraints: T Int ~ alpha
rhs-constraints: Bool ~ alpha
where 'alpha' is the type that connects the two. If we glom them
all together, and solve the RHS constraint first, we might solve
all together, and solve the RHS constraint first, we might solve
with alpha := Bool. But then we'd end up with a RULE like
RULE: f 3 |> (co :: T Int ~ Booo) = True
...
...
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