[commit: testsuite] master: Don't use qualified names in in binding positions (11b9722)

Simon Peyton-Jones simonpj at microsoft.com
Mon Sep 5 15:13:44 CEST 2011


Qualified names in binding positions never were legal!  The Haskell report (4.3.2) says this is not legal

	instance Num Foo where
        Prelude.negate x = ...

We were inconsistently allowing them for associated type declarations; I just removed the inconsistency.

Simon

| -----Original Message-----
| From: Simon Marlow [mailto:marlowsd at gmail.com]
| Sent: 05 September 2011 13:33
| To: Simon Peyton-Jones
| Cc: cvs-ghc at haskell.org
| Subject: Re: [commit: testsuite] master: Don't use qualified names in in binding
| positions (11b9722)
| 
| On 02/09/2011 09:30, Simon Peyton Jones wrote:
| > Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
| >
| > On branch  : master
| >
| >
| http://hackage.haskell.org/trac/ghc/changeset/11b9722a22db56e5b4c58612a12fd3fae29dd63
| 4
| >
| >> ---------------------------------------------------------------
| >
| > commit 11b9722a22db56e5b4c58612a12fd3fae29dd634
| > Author: Simon Peyton Jones<simonpj at microsoft.com>
| > Date:   Fri Sep 2 09:29:35 2011 +0100
| >
| >      Don't use qualified names in in binding positions
| >
| >> ---------------------------------------------------------------
| >
| >   tests/typecheck/should_run/T4809_IdentityT.hs |    4 ++--
| >   1 files changed, 2 insertions(+), 2 deletions(-)
| >
| > diff --git a/tests/typecheck/should_run/T4809_IdentityT.hs
| b/tests/typecheck/should_run/T4809_IdentityT.hs
| > index f030fc5..879dada 100644
| > --- a/tests/typecheck/should_run/T4809_IdentityT.hs
| > +++ b/tests/typecheck/should_run/T4809_IdentityT.hs
| > @@ -29,8 +29,8 @@ evalIdentityT = runIdentityT . HSX.unXMLGenT
| >   -- * HSX.XMLGenerator for IdentityT
| >
| >   instance (Functor m, Monad m) =>  HSX.XMLGen (IdentityT m) where
| > -    type HSX.XML (IdentityT m) = XML
| > -    newtype HSX.Child (IdentityT m) = IChild { unIChild :: XML }
| > +    type XML (IdentityT m) = XML
| > +    newtype Child (IdentityT m) = IChild { unIChild :: XML }
| >       genElement n _attrs children = HSX.XMLGenT $
| >                                     do children'<- HSX.unXMLGenT (fmap (map
| unIChild . concat) (sequence children))
| >                                        return (Element n [] children')
| 
| Are these not allowed any more?  I recall some long discussion about
| this many years ago...
| 
| Cheers,
| 	Simon
| 




More information about the Cvs-ghc mailing list