[GHC] #14643: Partial type signatures in class constraints behave unexpectedly
GHC
ghc-devs at haskell.org
Wed Jan 10 08:20:50 UTC 2018
#14643: Partial type signatures in class constraints behave unexpectedly
-------------------------------------+-------------------------------------
Reporter: mnislaih | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones <simonpj@…>):
In [changeset:"1577908f2a9db0fcf6f749d40dd75481015f5497/ghc" 1577908/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="1577908f2a9db0fcf6f749d40dd75481015f5497"
Fix two more bugs in partial signatures
These were shown up by Trac #14643
Bug 1: if we had a single partial signature for
two functions
f, g :: forall a. _ -> a
then we made two different SigTvs but with the sane Name.
This was jolly confusing and ultimately led to deeply bogus
results with Any's appearing in the resulting program. Yikes.
Fix: clone the quantified variables in TcSigs.tcInstSig (as
indeed its name suggests).
Bug 2: we were not eliminating duplicate/superclass constraints
in the partial signatures of a mutually recursive group.
Easy to fix: we are already doing dup/superclass elim in
TcSimplify.decideQuantification. So we move the partial-sig
constraints there too.
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14643#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list