[commit: ghc] master: Fix tyConToIfaceDecl (Trac #9190) (e5257f8)

git at git.haskell.org git at git.haskell.org
Wed Jun 11 19:57:17 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e5257f8fe20f5278c23693f1523e298e6fdaa064/ghc

>---------------------------------------------------------------

commit e5257f8fe20f5278c23693f1523e298e6fdaa064
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Jun 11 15:09:55 2014 +0100

    Fix tyConToIfaceDecl (Trac #9190)
    
    There are three bugs here, one serious
    
     * We were failing to tidy the type arguments in an IfTyConParent
       This is what was causing Trac #9190.
    
     * toIfaceTcArgs is careful to suppress kind arguments, but there
       was a clone, tidyToIfaceTcArgs in IfaceSyn which didn't.
       Now the latter goes via the former.
    
     * When pretty-printing a IfaceDecl for an algebraic data type, and
       doing so in Haskell-98 syntax, we were silently assuming that the
       universal type variables of the TyCon and the DataCon were the
       same. But that has not been true for some time. Result: a very
       confusing display.
    
       Solution: during the conversion to IfaceSyn, take the opportunity
       to make the universal type variables line up exactly.  This is very
       easy to do, makes the pretty-printing easy, and leaves open the future
       possiblity of not serialising the universal type variables of the
       data constructor.


>---------------------------------------------------------------

e5257f8fe20f5278c23693f1523e298e6fdaa064
 compiler/iface/MkIface.lhs                | 67 +++++++++++++++++--------------
 testsuite/tests/ghci/scripts/T4087.stdout |  2 +-
 testsuite/tests/polykinds/T7438.stderr    |  2 +-
 3 files changed, 38 insertions(+), 33 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc e5257f8fe20f5278c23693f1523e298e6fdaa064


More information about the ghc-commits mailing list