Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
bd13338d
Commit
bd13338d
authored
Dec 15, 2011
by
dimitris
Browse files
Exposing a useful assertion which was hidden inside a lazyness cloud.
parent
dff852b1
Changes
1
Show whitespace changes
Inline
Side-by-side
compiler/typecheck/TcInteract.lhs
View file @
bd13338d
...
@@ -746,9 +746,9 @@ doInteractWithInert
...
@@ -746,9 +746,9 @@ doInteractWithInert
-- situation for these and even if we did we'd have to be very careful to only
-- situation for these and even if we did we'd have to be very careful to only
-- create Derived's and not Wanteds.
-- create Derived's and not Wanteds.
else let fd_eqns = improveFromAnother inert_pred_loc work_item_pred_loc
else
do {
let fd_eqns = improveFromAnother inert_pred_loc work_item_pred_loc
wloc
=
get_workitem_wloc fl2
;
wloc
<-
get_workitem_wloc fl2
in
rewriteWithFunDeps fd_eqns tys2 wloc
;
rewriteWithFunDeps fd_eqns tys2 wloc
}
-- See Note [Efficient Orientation], [When improvement happens]
-- See Note [Efficient Orientation], [When improvement happens]
; case any_fundeps of
; case any_fundeps of
...
@@ -764,9 +764,12 @@ doInteractWithInert
...
@@ -764,9 +764,12 @@ doInteractWithInert
-> do { emitFDWorkAsDerived fd_work (cc_depth workItem)
-> do { emitFDWorkAsDerived fd_work (cc_depth workItem)
; irKeepGoing "Cls/Cls (new fundeps)" } -- Just keep going without droping the inert
; irKeepGoing "Cls/Cls (new fundeps)" } -- Just keep going without droping the inert
}
}
where get_workitem_wloc (Wanted wl) = wl
where get_workitem_wloc (Wanted wl) = return wl
get_workitem_wloc (Derived wl) = wl
get_workitem_wloc (Derived wl) = return wl
get_workitem_wloc (Given {}) = panic "Unexpected given!"
get_workitem_wloc (Given {}) = pprPanic "Unexpected given workitem!" $
vcat [ text "Work item =" <+> ppr workItem
, text "Inert item=" <+> ppr inertItem
]
-- Two pieces of irreducible evidence: if their types are *exactly identical* we can
-- Two pieces of irreducible evidence: if their types are *exactly identical* we can
...
...
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