[commit: ghc] master: Fix Trac #7939, and add kind inference to closed type families. (8c5e734)
Richard Eisenberg
eir at cis.upenn.edu
Fri Jun 28 10:36:49 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/8c5e7346746a870ccc2eb86747792700f2a08deb
>---------------------------------------------------------------
commit 8c5e7346746a870ccc2eb86747792700f2a08deb
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date: Tue Jun 25 17:42:47 2013 +0100
Fix Trac #7939, and add kind inference to closed type families.
Now, all open type families have result kinds that default to
*. Top-level type families have all arguments default to *,
and associated type families have all arguments that are not
mentioned in the class header default to *. Closed type
families perform kind inference, but generalize only over
those kind variables that are parametric in their use.
This is all a little fiddly and specific, but it seems to follow
use cases. This commit also includes a large
Note [Kind-checking strategies] in TcHsType that helps keep all
of this straight.
compiler/hsSyn/HsDecls.lhs | 12 ++
compiler/typecheck/TcHsType.lhs | 224 +++++++++++++++++++++++++++++++++---
compiler/typecheck/TcMType.lhs | 9 +-
compiler/typecheck/TcTyClsDecls.lhs | 210 ++++++++++++++++++---------------
4 files changed, 344 insertions(+), 111 deletions(-)
Diff suppressed because of size. To see it, use:
git show 8c5e7346746a870ccc2eb86747792700f2a08deb
More information about the ghc-commits
mailing list