simonpj     2005/04/04 04:55:18 PDT

  Modified files:
    ghc/compiler/basicTypes IdInfo.lhs 
    ghc/compiler/deSugar Check.lhs DsArrows.lhs DsExpr.lhs 
                         DsGRHSs.lhs DsListComp.lhs DsMeta.hs 
                         DsUtils.lhs Match.lhs MatchCon.lhs 
                         MatchLit.lhs 
    ghc/compiler/hsSyn   Convert.lhs HsExpr.hi-boot-6 HsExpr.lhs 
                         HsExpr.lhs-boot HsLit.lhs HsPat.lhs 
                         HsTypes.lhs HsUtils.lhs 
    ghc/compiler/main    GHC.hs HscMain.lhs 
    ghc/compiler/parser  Parser.y.pp RdrHsSyn.lhs 
    ghc/compiler/prelude PrelNames.lhs 
    ghc/compiler/rename  RnEnv.lhs RnExpr.lhs RnTypes.lhs 
    ghc/compiler/typecheck Inst.lhs TcArrows.lhs TcExpr.hi-boot-6 
                           TcExpr.lhs TcExpr.lhs-boot 
                           TcGenDeriv.lhs TcHsSyn.lhs 
                           TcMatches.lhs TcPat.lhs TcRnDriver.lhs 
                           TcRnTypes.lhs TcTyDecls.lhs TcType.lhs 
                           TcUnify.lhs 
    ghc/compiler/utils   IOEnv.hs Util.lhs 
  Log:
  This commit combines three overlapping things:
  
  1.  Make rebindable syntax work for do-notation. The idea
      here is that, in particular, (>>=) can have a type that
      has class constraints on its argument types, e.g.
         (>>=) :: (Foo m, Baz a) => m a -> (a -> m b) -> m b
      The consequence is that a BindStmt and ExprStmt must have
      individual evidence attached -- previously it was one
      batch of evidence for the entire Do
      
      Sadly, we can't do this for MDo, because we use bind at
      a polymorphic type (to tie the knot), so we still use one
      blob of evidence (now in the HsStmtContext) for MDo.
      
      For arrow syntax, the evidence is in the HsCmd.
      
      For list comprehensions, it's all built-in anyway.
      
      So the evidence on a BindStmt is only used for ordinary
      do-notation.
  
  2.  Tidy up HsSyn.  In particular:
  
        - Eliminate a few "Out" forms, which we can manage
        without (e.g. 
  
        - It ought to be the case that the type checker only
        decorates the syntax tree, but doesn't change one
        construct into another.  That wasn't true for NPat,
        LitPat, NPlusKPat, so I've fixed that.
  
        - Eliminate ResultStmts from Stmt.  They always had
        to be the last Stmt, which led to awkward pattern
        matching in some places; and the benefits didn't seem
        to outweigh the costs.  Now each construct that uses
        [Stmt] has a result expression too (e.g. GRHS).
  
  
  3.  Make 'deriving( Ix )' generate a binding for unsafeIndex,
      rather than for index.  This is loads more efficient.
  
      (This item only affects TcGenDeriv, but some of point (2)
      also affects TcGenDeriv, so it has to be in one commit.)
  
  Revision  Changes    Path
  1.116     +7 -0      fptools/ghc/compiler/basicTypes/IdInfo.lhs
  1.40      +20 -13    fptools/ghc/compiler/deSugar/Check.lhs
  1.14      +27 -27    fptools/ghc/compiler/deSugar/DsArrows.lhs
  1.113     +151 -129  fptools/ghc/compiler/deSugar/DsExpr.lhs
  1.36      +18 -16    fptools/ghc/compiler/deSugar/DsGRHSs.lhs
  1.52      +50 -46    fptools/ghc/compiler/deSugar/DsListComp.lhs
  1.70      +23 -24    fptools/ghc/compiler/deSugar/DsMeta.hs
  1.82      +14 -9     fptools/ghc/compiler/deSugar/DsUtils.lhs
  1.71      +30 -28    fptools/ghc/compiler/deSugar/Match.lhs
  1.23      +1 -1      fptools/ghc/compiler/deSugar/MatchCon.lhs
  1.40      +102 -62   fptools/ghc/compiler/deSugar/MatchLit.lhs
  1.62      +28 -20    fptools/ghc/compiler/hsSyn/Convert.lhs
  1.7       +2 -0      fptools/ghc/compiler/hsSyn/HsExpr.hi-boot-6
  1.97      +114 -118  fptools/ghc/compiler/hsSyn/HsExpr.lhs
  1.2       +1 -0      fptools/ghc/compiler/hsSyn/HsExpr.lhs-boot
  1.15      +13 -9     fptools/ghc/compiler/hsSyn/HsLit.lhs
  1.47      +52 -34    fptools/ghc/compiler/hsSyn/HsPat.lhs
  1.84      +1 -19     fptools/ghc/compiler/hsSyn/HsTypes.lhs
  1.6       +54 -53    fptools/ghc/compiler/hsSyn/HsUtils.lhs
  1.9       +4 -0      fptools/ghc/compiler/main/GHC.hs
  1.211     +2 -3      fptools/ghc/compiler/main/HscMain.lhs
  1.29      +19 -27    fptools/ghc/compiler/parser/Parser.y.pp
  1.85      +11 -11    fptools/ghc/compiler/parser/RdrHsSyn.lhs
  1.97      +13 -14    fptools/ghc/compiler/prelude/PrelNames.lhs
  1.192     +10 -10    fptools/ghc/compiler/rename/RnEnv.lhs
  1.135     +163 -165  fptools/ghc/compiler/rename/RnExpr.lhs
  1.33      +9 -7      fptools/ghc/compiler/rename/RnTypes.lhs
  1.151     +65 -67    fptools/ghc/compiler/typecheck/Inst.lhs
  1.13      +15 -21    fptools/ghc/compiler/typecheck/TcArrows.lhs
  1.9       +6 -0      fptools/ghc/compiler/typecheck/TcExpr.hi-boot-6
  1.181     +84 -72    fptools/ghc/compiler/typecheck/TcExpr.lhs
  1.2       +7 -1      fptools/ghc/compiler/typecheck/TcExpr.lhs-boot
  1.116     +32 -44    fptools/ghc/compiler/typecheck/TcGenDeriv.lhs
  1.105     +87 -70    fptools/ghc/compiler/typecheck/TcHsSyn.lhs
  1.87      +296 -227  fptools/ghc/compiler/typecheck/TcMatches.lhs
  1.111     +27 -50    fptools/ghc/compiler/typecheck/TcPat.lhs
  1.102     +20 -19    fptools/ghc/compiler/typecheck/TcRnDriver.lhs
  1.55      +6 -5      fptools/ghc/compiler/typecheck/TcRnTypes.lhs
  1.100     +1 -1      fptools/ghc/compiler/typecheck/TcTyDecls.lhs
  1.123     +1 -1      fptools/ghc/compiler/typecheck/TcType.lhs
  1.63      +23 -21    fptools/ghc/compiler/typecheck/TcUnify.lhs
  1.3       +5 -1      fptools/ghc/compiler/utils/IOEnv.hs
  1.76      +7 -0      fptools/ghc/compiler/utils/Util.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to