[commit: ghc] master: In type or data instances, check that all variables are bound (e89f3ba)
Simon Peyton Jones <[email protected]> Wed, 02 Jan 2013 00:32:02 -0800
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <[email protected]> |
Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master http://hackage.haskell.org/trac/ghc/changeset/e89f3bac94f513841f46346528183920783ce1f9 >--------------------------------------------------------------- commit e89f3bac94f513841f46346528183920783ce1f9 Author: Simon Peyton Jones <[email protected]> Date: Wed Jan 2 08:26:28 2013 +0000 In type or data instances, check that all variables are bound Trac #7536 points out that it's possible for the LHS to *look* as if it binds variables, but does not acutally do so type T a = Int type instance F (T a) = a This patch makes it an error. compiler/typecheck/TcInstDcls.lhs | 43 ++++++++++++++++++----------------- compiler/typecheck/TcMType.lhs | 36 ++++++++++++++++++++++------- compiler/typecheck/TcTyClsDecls.lhs | 23 ++++++------------ 3 files changed, 57 insertions(+), 45 deletions(-) Diff suppressed because of size. To see it, use: git show e89f3bac94f513841f46346528183920783ce1f9