Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
d8cb9db5
Commit
d8cb9db5
authored
Oct 19, 2010
by
simonpj@microsoft.com
Browse files
Layout and tiny refactoring only
parent
a40f2735
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/TcInteract.lhs
View file @
d8cb9db5
...
...
@@ -891,23 +891,22 @@ interactWithInertsStage workItem inert
interactNext :: StageResult -> AtomicInert -> TcS StageResult
interactNext it inert
| ContinueWith workItem <- sr_stop it
= do { let inerts = sr_inerts it
fdimprs_old = getFDImprovements inerts
; ir <- interactWithInert fdimprs_old inert workItem
-- New inerts depend on whether we KeepInert or not and must
-- be updated with FD improvement information from the interaction result (ir)
; let inerts_new = updInertSetFDImprs upd_inert (ir_improvement ir)
upd_inert = if ir_inert_action ir == KeepInert
then inerts `updInertSet` inert else inerts
; return $ SR { sr_inerts = inerts_new
, sr_new_work = sr_new_work it `unionWorkLists` ir_new_work ir
, sr_stop = ir_stop ir } }
| otherwise = return $ itrAddInert inert it
where itrAddInert :: AtomicInert -> StageResult -> StageResult
itrAddInert inert itr = itr { sr_inerts = (sr_inerts itr) `updInertSet` inert }
= do { let inerts = sr_inerts it
fdimprs_old = getFDImprovements inerts
; ir <- interactWithInert fdimprs_old inert workItem
-- New inerts depend on whether we KeepInert or not and must
-- be updated with FD improvement information from the interaction result (ir)
; let inerts_new = updInertSetFDImprs upd_inert (ir_improvement ir)
upd_inert = if ir_inert_action ir == KeepInert
then inerts `updInertSet` inert else inerts
; return $ SR { sr_inerts = inerts_new
, sr_new_work = sr_new_work it `unionWorkLists` ir_new_work ir
, sr_stop = ir_stop ir } }
| otherwise
= return $ it { sr_inerts = (sr_inerts it) `updInertSet` inert }
-- Do a single interaction of two constraints.
interactWithInert :: FDImprovements -> AtomicInert -> WorkItem -> TcS InteractResult
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment