simonpj     2002/11/07 03:42:50 PST

  Modified files:
    ghc/compiler/deSugar DsUtils.lhs 
  Log:
                ------------------
        Fix an obscure bug in implicit parameters,
        interacting with lazy pattern matching
                ------------------
  
                MERGE TO STABLE BRANCH
  
  The problem was this:
  
    data UniqueSupply = US Integer
  
    newUnique :: (?uniqueSupply :: UniqueSupply) => Integer
    newUnique = r
              where US r = ?uniqueSupply
  
  The lazy pattern match in the where clause killed GHC 5.04 because the
  SourceType {?uniqueSupply::UniqueSupply} of the RHS of the 'where' didn't
  look like a UniqueSupply.
  
  The fix is simple: in DsUtils.mkSelectorBinds, use the pattern, not
  the rhs, to get the type reqd.  More efficient too.
  
  Test is typecheck/should_compile/tc164.hs
  
  Revision  Changes    Path
  1.66      +19 -1     fptools/ghc/compiler/deSugar/DsUtils.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc


Reply via email to