[commit: ghc] master: Make -XDeriveFunctor more generous about non-last arguments (Trac #8678) (cdac487)

Gabor Greif ggreif at gmail.com
Fri Mar 7 19:07:45 UTC 2014


Thanks for fixing this, Simon!

I can add tests if you haven't already...

Cheers,

    Gabor

On 3/7/14, git at git.haskell.org <git at git.haskell.org> wrote:
> Repository : ssh://git@git.haskell.org/ghc
>
> On branch  : master
> Link       :
> http://ghc.haskell.org/trac/ghc/changeset/cdac487bcd9928d77738f6e79ead7b9bb4bc00fd/ghc
>
>>---------------------------------------------------------------
>
> commit cdac487bcd9928d77738f6e79ead7b9bb4bc00fd
> Author: Simon Peyton Jones <simonpj at microsoft.com>
> Date:   Fri Mar 7 16:45:55 2014 +0000
>
>     Make -XDeriveFunctor more generous about non-last arguments (Trac
> #8678)
>
>     When deriving Functor, Foldable, Traversable, we need only look at the
>     way that the last type argument is treated.  It's fine for there to
>     be existentials etc, provided they don't affect the last type argument.
>
>     See Note [Check that the type variable is truly universal] in TcDeriv.
>
>
>>---------------------------------------------------------------
>
> cdac487bcd9928d77738f6e79ead7b9bb4bc00fd
>  compiler/typecheck/TcDeriv.lhs                     |   88
> +++++++++++++++-----
>  compiler/typecheck/TcGenDeriv.lhs                  |    8 +-
>  docs/users_guide/glasgow_exts.xml                  |    7 ++
>  testsuite/tests/deriving/should_compile/T8678.hs   |   12 +++
>  testsuite/tests/deriving/should_compile/all.T      |    1 +
>  testsuite/tests/deriving/should_fail/T3101.stderr  |    2 +-
>  testsuite/tests/generics/GenCannotDoRep0_0.stderr  |    3 +-
>  testsuite/tests/generics/GenCannotDoRep1_0.stderr  |    3 +-
>  .../tests/typecheck/should_fail/tcfail086.stderr   |    2 +-
>  9 files changed, 96 insertions(+), 30 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 cdac487bcd9928d77738f6e79ead7b9bb4bc00fd
> _______________________________________________
> ghc-commits mailing list
> ghc-commits at haskell.org
> http://www.haskell.org/mailman/listinfo/ghc-commits
>


More information about the ghc-devs mailing list