cvs commit: fptools/ghc/compiler/deSugar DsMeta.hs fptools/ghc/compiler/hsSyn Convert.lhs fptools/ghc/compiler/typecheck TcSplice.lhs fptools/libraries/template-haskell/Language/Haskell/TH Syntax.hs fptools/testsuite/tests/ghc-regress/th TH_class1.stderr TH_reifyDecl1.stderr TH_repGuard.stderr ...

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.fptools,gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
simonpj     2004/12/23 01:07:39 PST

  Modified files:
    ghc/compiler/deSugar DsMeta.hs 
    ghc/compiler/hsSyn   Convert.lhs 
    ghc/compiler/typecheck TcSplice.lhs 
    libraries/template-haskell/Language/Haskell/TH Syntax.hs 
    testsuite/tests/ghc-regress/th TH_class1.stderr 
                                   TH_reifyDecl1.stderr 
                                   TH_repGuard.stderr 
                                   TH_repPatSig.stderr 
                                   TH_repPrim.stderr 
                                   TH_spliceE3.stderr 
  Log:
    	---------------------------------
            Template Haskell: names again
    	---------------------------------
  
  On 2 Dec 04 I made this commit (1.58 in Convert.lhs)
  
      Fix a Template Haskell bug that meant that top-level names created
      with newName were not made properly unique.
  
  But that just introduced a new bug!  THe trouble is that names created by
  newName are NameUs; but I was *also* using NameU for names of free varaibles,
  such as the 'x' in the quoted code here
  	f x = $( g [| \y -> (x,y) |])
  
  But when converting to HsSyn, the x and y must be treated diffferently.
  The 'x' must convert to an Exact RdrName, so that it binds to the 'x' that's
  in the type environment; but the 'y' must generate a nice unique RdrName.
  
  So this commit adds NameL for the lexically-scoped bindings like 'x'.
  
  Revision  Changes    Path
  1.68      +4 -4      fptools/ghc/compiler/deSugar/DsMeta.hs
  1.60      +10 -4     fptools/ghc/compiler/hsSyn/Convert.lhs
  1.49      +4 -0      fptools/ghc/compiler/typecheck/TcSplice.lhs
  1.10      +30 -10    fptools/libraries/template-haskell/Language/Haskell/TH/Syntax.hs
  1.2       +3 -4      fptools/testsuite/tests/ghc-regress/th/TH_class1.stderr
  1.5       +3 -3      fptools/testsuite/tests/ghc-regress/th/TH_reifyDecl1.stderr
  1.4       +3 -3      fptools/testsuite/tests/ghc-regress/th/TH_repGuard.stderr
  1.2       +3 -3      fptools/testsuite/tests/ghc-regress/th/TH_repPatSig.stderr
  1.7       +3 -3      fptools/testsuite/tests/ghc-regress/th/TH_repPrim.stderr
  1.3       +3 -4      fptools/testsuite/tests/ghc-regress/th/TH_spliceE3.stderr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.