[commit: ghc] master: Allow type signatures in instance decls (Trac #5676) (6353ae0)

Simon Peyton Jones simonpj at microsoft.com
Tue Dec 13 14:37:44 CET 2011


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6353ae0ff672dfcf79fd9bca1d58ff6ec7e7f9e0

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

commit 6353ae0ff672dfcf79fd9bca1d58ff6ec7e7f9e0
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Dec 12 00:32:06 2011 +0000

    Allow type signatures in instance decls (Trac #5676)
    
    This new feature-ette, enable with -XInstanceSigs, lets
    you give a type signature in an instance declaration:
    
       instance Eq Int where
         (==) :: Int -> Int -> Bool
         (==) = ...blah...
    
    Scoped type variables work too.

 compiler/main/DynFlags.hs         |    2 +
 compiler/rename/RnBinds.lhs       |    8 +++---
 compiler/rename/RnSource.lhs      |   38 ++++++++++++++++----------
 compiler/typecheck/TcBinds.lhs    |    9 +++---
 compiler/typecheck/TcInstDcls.lhs |   52 ++++++++++++++++++++++++++++++++----
 compiler/typecheck/TcSMonad.lhs   |    4 +-
 docs/users_guide/glasgow_exts.xml |   33 +++++++++++++++++++++++
 7 files changed, 114 insertions(+), 32 deletions(-)


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

    git show 6353ae0ff672dfcf79fd9bca1d58ff6ec7e7f9e0



More information about the Cvs-ghc mailing list