Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/b2bd63f99d643f6b3eb30bb72bb9ae26d4183252 >--------------------------------------------------------------- commit b2bd63f99d643f6b3eb30bb72bb9ae26d4183252 Author: Ian Lynagh <[email protected]> Date: Thu Jun 2 00:23:27 2011 +0100 Refactor SrcLoc and SrcSpan The "Unhelpful" cases are now in a separate type. This allows us to improve various things, e.g.: * Most of the panic's in SrcLoc are now gone * The Lexer now works with RealSrcSpans rather than SrcSpans, i.e. it knows that it has real locations and thus can assume that the line number etc really exists * Some of the more suspicious cases are no longer necessary, e.g. we no longer need this case in advanceSrcLoc: advanceSrcLoc loc _ = loc -- Better than nothing More improvements can probably be made, e.g. tick locations can probably use RealSrcSpans too. compiler/basicTypes/Name.lhs | 14 ++- compiler/basicTypes/RdrName.lhs | 10 +- compiler/basicTypes/SrcLoc.lhs | 229 +++++++++++++++++++++++--------------- compiler/cmm/CmmLex.x | 20 ++-- compiler/cmm/CmmParse.y | 2 +- compiler/deSugar/Coverage.lhs | 26 ++--- compiler/hsSyn/HsImpExp.lhs | 2 +- compiler/hsSyn/HsSyn.lhs | 2 +- compiler/main/GHC.hs | 66 ++++++----- compiler/main/HeaderInfo.hs | 10 +- compiler/main/HscMain.lhs | 4 +- compiler/main/HscTypes.lhs | 2 +- compiler/parser/Lexer.x | 143 ++++++++++++------------ compiler/parser/Parser.y.pp | 6 +- compiler/rename/RnEnv.lhs | 6 +- compiler/rename/RnHsDoc.hs | 2 +- compiler/rename/RnHsSyn.lhs | 2 +- compiler/rename/RnNames.lhs | 4 +- compiler/typecheck/TcRnMonad.lhs | 7 +- compiler/typecheck/TcSplice.lhs | 16 ++- ghc/GhciTags.hs | 7 +- ghc/InteractiveUI.hs | 78 ++++++++----- 22 files changed, 368 insertions(+), 290 deletions(-) Diff suppressed because of size. To see it, use: git show b2bd63f99d643f6b3eb30bb72bb9ae26d4183252 _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
