Skip to content
Snippets Groups Projects
Commit a32c8f75 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Use dischargeFunEq consistently

Trac #15122 turned out to be interesting.

* Were calling dischargeFmv in three places.

* In all three cases we dealt with the Given case
  separately.

* In two of the three cases the Given code was right,
  (albeit duplicated).

* In the third case (in TcCanonical.canCFunEqCan), we had
     ; case flav of
         Given -> return () -- nothing more to do.
  which was utterly wrong.

The solution is easy: move the Given-case handling into
dischargeFmv (now reenamed dischargeFunEq), and delete it
from the call sites.

Result: less code, easier to understand (dischargeFunEq handles
all three cases, not just two out of three), and Trac #15122 is fixed.
parent d191db48
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment