[commit: ghc] type-nats: Merge remote-tracking branch 'origin/master' into type-nats (b27280b)

Iavor Diatchki diatchki at galois.com
Mon Jul 23 18:12:28 CEST 2012


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : type-nats

http://hackage.haskell.org/trac/ghc/changeset/b27280b2afe93f692ecdcba4124e5a5e68e46c94

>---------------------------------------------------------------

commit b27280b2afe93f692ecdcba4124e5a5e68e46c94
Merge: 3f2fe73... 4666be5...
Author: Iavor S. Diatchki <iavor.diatchki at gmail.com>
Date:   Sun Jul 22 12:53:38 2012 -0700

    Merge remote-tracking branch 'origin/master' into type-nats
    
    Conflicts:
    	compiler/basicTypes/Unique.lhs
    	compiler/iface/MkIface.lhs

 compiler/basicTypes/Literal.lhs                 |    9 +-
 compiler/basicTypes/Module.lhs                  |    4 +-
 compiler/basicTypes/Name.lhs                    |    2 +-
 compiler/basicTypes/OccName.lhs                 |    2 +-
 compiler/basicTypes/Unique.lhs                  |  162 +++---
 compiler/cmm/BlockId.hs                         |    1 +
 compiler/cmm/Cmm.hs                             |    5 -
 compiler/cmm/CmmBuildInfoTables.hs              |  190 ++++---
 compiler/cmm/CmmCommonBlockElim.hs              |    6 +-
 compiler/cmm/CmmContFlowOpt.hs                  |   12 +-
 compiler/cmm/CmmCvt.hs                          |    4 +-
 compiler/cmm/CmmLayoutStack.hs                  |  114 +---
 compiler/cmm/CmmNode.hs                         |   28 +-
 compiler/cmm/CmmPipeline.hs                     |   91 +---
 compiler/cmm/CmmProcPoint.hs                    |    6 +-
 compiler/cmm/CmmRewriteAssignments.hs           |    3 +-
 compiler/cmm/CmmSink.hs                         |  256 ++++++++
 compiler/cmm/CmmUtils.hs                        |    5 -
 compiler/cmm/Hoopl.hs                           |    3 +-
 compiler/cmm/Hoopl/Dataflow.hs                  |    4 -
 compiler/cmm/MkGraph.hs                         |   29 +-
 compiler/cmm/OldPprCmm.hs                       |    1 +
 compiler/cmm/PprC.hs                            |  281 +++++-----
 compiler/cmm/PprCmm.hs                          |   18 +-
 compiler/cmm/PprCmmDecl.hs                      |    1 +
 compiler/cmm/PprCmmExpr.hs                      |    1 +
 compiler/codeGen/CgCon.lhs                      |   17 +-
 compiler/codeGen/CgHeapery.lhs                  |  451 +++++++--------
 compiler/codeGen/CgUtils.hs                     |    3 +-
 compiler/codeGen/StgCmm.hs                      |    4 +-
 compiler/codeGen/StgCmmBind.hs                  |    8 +-
 compiler/codeGen/StgCmmCon.hs                   |   19 +-
 compiler/codeGen/StgCmmEnv.hs                   |    6 +-
 compiler/codeGen/StgCmmExpr.hs                  |   37 +-
 compiler/codeGen/StgCmmHeap.hs                  |    7 +-
 compiler/codeGen/StgCmmLayout.hs                |   29 +-
 compiler/codeGen/StgCmmPrim.hs                  |  173 ++++++-
 compiler/codeGen/StgCmmUtils.hs                 |   22 +-
 compiler/coreSyn/CoreLint.lhs                   |    2 -
 compiler/coreSyn/CoreUnfold.lhs                 |    2 +-
 compiler/coreSyn/ExternalCore.lhs               |    4 +-
 compiler/coreSyn/MkCore.lhs                     |    4 +-
 compiler/coreSyn/MkExternalCore.lhs             |    2 +-
 compiler/coreSyn/PprCore.lhs                    |    1 +
 compiler/coreSyn/PprExternalCore.lhs            |    5 +-
 compiler/deSugar/Check.lhs                      |    2 +-
 compiler/deSugar/Coverage.lhs                   |    7 +
 compiler/deSugar/DsBinds.lhs                    |    2 +-
 compiler/deSugar/DsExpr.lhs                     |   22 +
 compiler/deSugar/DsForeign.lhs                  |    5 +-
 compiler/deSugar/DsGRHSs.lhs                    |   10 +-
 compiler/deSugar/DsMeta.hs                      |   99 ++--
 compiler/deSugar/Match.lhs                      |    1 +
 compiler/deSugar/MatchLit.lhs                   |   10 +-
 compiler/ghc.cabal.in                           |    4 +-
 compiler/ghci/ByteCodeGen.lhs                   |    2 +-
 compiler/ghci/ByteCodeLink.lhs                  |    8 +-
 compiler/hsSyn/Convert.lhs                      |   12 +-
 compiler/hsSyn/HsDecls.lhs                      |    9 +-
 compiler/hsSyn/HsExpr.lhs                       |   22 +-
 compiler/hsSyn/HsLit.lhs                        |    4 +-
 compiler/hsSyn/HsSyn.lhs                        |    1 +
 compiler/hsSyn/HsTypes.lhs                      |    7 +-
 compiler/iface/BinIface.hs                      |    1 +
 compiler/iface/FlagChecker.hs                   |    4 +-
 compiler/iface/IfaceType.lhs                    |    7 +-
 compiler/iface/LoadIface.lhs                    |    1 +
 compiler/iface/MkIface.lhs                      |  135 +++--
 compiler/main/DriverPipeline.hs                 |    6 +-
 compiler/main/DynFlags.hs                       |   90 +++-
 compiler/main/ErrUtils.lhs                      |   15 +-
 compiler/main/HscMain.hs                        |    5 +-
 compiler/main/HscTypes.lhs                      |    4 +
 compiler/main/InteractiveEval.hs                |    4 -
 compiler/main/StaticFlagParser.hs               |   11 -
 compiler/main/StaticFlags.hs                    |    9 -
 compiler/main/SysTools.lhs                      |   21 +-
 compiler/main/TidyPgm.lhs                       |   10 +-
 compiler/nativeGen/AsmCodeGen.lhs               |   25 +-
 compiler/nativeGen/PIC.hs                       |   64 +-
 compiler/nativeGen/PPC/CodeGen.hs               |   19 +-
 compiler/nativeGen/PPC/Ppr.hs                   |    1 +
 compiler/nativeGen/PprBase.hs                   |    5 -
 compiler/nativeGen/RegAlloc/Graph/Main.hs       |    1 -
 compiler/nativeGen/RegAlloc/Graph/SpillClean.hs |    8 +-
 compiler/nativeGen/RegAlloc/Linear/State.hs     |    1 +
 compiler/nativeGen/SPARC/CodeGen.hs             |   17 +-
 compiler/nativeGen/SPARC/Ppr.hs                 |  716 +++++++++++------------
 compiler/nativeGen/X86/CodeGen.hs               |   24 +-
 compiler/nativeGen/X86/Ppr.hs                   |  662 +++++++++++-----------
 compiler/nativeGen/X86/Regs.hs                  |   40 +-
 compiler/parser/Lexer.x                         |   93 +++-
 compiler/parser/Parser.y.pp                     |   14 +-
 compiler/parser/ParserCore.y                    |    2 +-
 compiler/prelude/PrelRules.lhs                  |   31 +-
 compiler/profiling/CostCentre.lhs               |    2 +-
 compiler/rename/RnBinds.lhs                     |   24 +-
 compiler/rename/RnEnv.lhs                       |  647 ++++++++++-----------
 compiler/rename/RnExpr.lhs                      |   12 +-
 compiler/simplCore/FloatOut.lhs                 |    1 +
 compiler/simplCore/SimplCore.lhs                |   20 +-
 compiler/simplCore/SimplMonad.lhs               |   49 +-
 compiler/simplCore/Simplify.lhs                 |   35 +-
 compiler/specialise/Rules.lhs                   |    2 +-
 compiler/typecheck/TcCanonical.lhs              |   36 +-
 compiler/typecheck/TcDeriv.lhs                  |   55 +-
 compiler/typecheck/TcEnv.lhs                    |    1 +
 compiler/typecheck/TcErrors.lhs                 |    6 +-
 compiler/typecheck/TcExpr.lhs                   |   13 +
 compiler/typecheck/TcHsSyn.lhs                  |   14 +
 compiler/typecheck/TcHsType.lhs                 |  144 +++--
 compiler/typecheck/TcInstDcls.lhs               |    2 +-
 compiler/typecheck/TcMType.lhs                  |  165 ++++--
 compiler/typecheck/TcMatches.lhs                |    8 +-
 compiler/typecheck/TcPat.lhs                    |   26 -
 compiler/typecheck/TcRnDriver.lhs               |    9 +-
 compiler/typecheck/TcRnMonad.lhs                |    6 +-
 compiler/typecheck/TcRnTypes.lhs                |   40 +-
 compiler/typecheck/TcRules.lhs                  |    3 +-
 compiler/typecheck/TcSMonad.lhs                 |  155 +++--
 compiler/typecheck/TcSimplify.lhs               |  301 ++++++----
 compiler/typecheck/TcSplice.lhs                 |    1 +
 compiler/typecheck/TcTyClsDecls.lhs             |  133 +++--
 compiler/typecheck/TcType.lhs                   |   19 -
 compiler/types/Class.lhs                        |   25 +-
 compiler/types/Kind.lhs                         |    9 +-
 compiler/types/Type.lhs                         |    1 +
 compiler/utils/Binary.hs                        |   35 +-
 compiler/utils/BufWrite.hs                      |   11 +-
 compiler/utils/FastString.lhs                   |  322 ++++++-----
 compiler/utils/Fingerprint.hsc                  |   70 +---
 compiler/utils/Outputable.lhs                   |   37 +-
 compiler/utils/Panic.lhs                        |    6 -
 compiler/utils/Pretty.lhs                       |   12 +-
 compiler/utils/StringBuffer.lhs                 |    6 +-
 compiler/utils/md5.c                            |  241 --------
 configure.ac                                    |   21 +-
 docs/users_guide/bugs.xml                       |   30 +
 docs/users_guide/flags.xml                      |   14 +-
 docs/users_guide/glasgow_exts.xml               |   42 ++
 docs/users_guide/using.xml                      |    8 +
 ghc.mk                                          |    6 +-
 ghc/GhciMonad.hs                                |    9 +-
 ghc/InteractiveUI.hs                            |   88 ++-
 ghc/Main.hs                                     |   25 +-
 ghc/ghc-cross.wrapper                           |    1 +
 includes/Cmm.h                                  |    4 +-
 includes/mkDerivedConstants.cross.awk           |  350 +++++++++++
 includes/mkSizeMacros.cross.awk                 |   82 +++
 includes/rts/EventLogFormat.h                   |   13 +-
 includes/rts/OSThreads.h                        |   27 +-
 includes/rts/prof/CCS.h                         |    4 +-
 includes/stg/Regs.h                             |   10 +-
 libraries/bin-package-db/bin-package-db.cabal   |    2 +-
 libraries/tarballs/time-1.4.0.1.tar.gz          |  Bin 0 -> 87466 bytes
 libraries/tarballs/time-1.4.tar.gz              |  Bin 87054 -> 0 bytes
 rts/Profiling.c                                 |    6 +-
 rts/RtsAPI.c                                    |   15 +
 rts/RtsProbes.d                                 |   20 +-
 rts/Schedule.c                                  |   15 +-
 rts/Task.c                                      |   17 +-
 rts/Task.h                                      |   43 ++-
 rts/Trace.c                                     |   46 ++
 rts/Trace.h                                     |   89 +++-
 rts/eventlog/EventLog.c                         |   84 +++-
 rts/eventlog/EventLog.h                         |   10 +
 rts/posix/OSThreads.c                           |   30 +
 rts/sm/GC.c                                     |   14 +-
 rts/sm/GCThread.h                               |    1 +
 rts/sm/Storage.c                                |   23 +-
 rts/sm/Storage.h                                |    2 +-
 rts/win32/OSThreads.c                           |    8 +-
 rules/build-package-way.mk                      |    1 +
 rules/{all-target.mk => cross-compiling.mk}     |   18 +-
 utils/genapply/GenApply.hs                      |    6 +-
 utils/ghc-cabal/ghc-cabal.cabal                 |    2 +-
 utils/ghc-pkg/Main.hs                           |    2 +
 utils/hpc/HpcMarkup.hs                          |   22 +-
 utils/hpc/hpc-bin.cabal                         |    6 +-
 179 files changed, 4868 insertions(+), 3359 deletions(-)

diff --cc compiler/basicTypes/Unique.lhs
index e55b0c8,037aed0..c0d2da6
--- a/compiler/basicTypes/Unique.lhs
+++ b/compiler/basicTypes/Unique.lhs
@@@ -18,42 -18,34 +18,35 @@@ Haskell)
  \begin{code}
  {-# LANGUAGE BangPatterns #-}
  
- {-# OPTIONS -fno-warn-tabs #-}
- -- The above warning supression flag is a temporary kludge.
- -- While working on this module you are encouraged to remove it and
- -- detab the module (please do the detabbing in a separate patch). See
- --     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
- -- for details
- 
  module Unique (
          -- * Main data types
- 	Unique, Uniquable(..), 
- 	
- 	-- ** Constructors, desctructors and operations on 'Unique's
- 	hasKey,
+         Unique, Uniquable(..),
+ 
+         -- ** Constructors, desctructors and operations on 'Unique's
+         hasKey,
  
- 	pprUnique, 
+         pprUnique,
  
- 	mkUniqueGrimily,		-- Used in UniqSupply only!
-         getKey, getKeyFastInt,		-- Used in Var, UniqFM, Name only!
+         mkUniqueGrimily,                -- Used in UniqSupply only!
+         getKey, getKeyFastInt,          -- Used in Var, UniqFM, Name only!
          mkUnique, unpkUnique,           -- Used in BinIface only
  
- 	incrUnique,			-- Used for renumbering
- 	deriveUnique,			-- Ditto
- 	newTagUnique,			-- Used in CgCase
- 	initTyVarUnique,
+         incrUnique,                     -- Used for renumbering
+         deriveUnique,                   -- Ditto
+         newTagUnique,                   -- Used in CgCase
+         initTyVarUnique,
  
- 	-- ** Making built-in uniques
+         -- ** Making built-in uniques
  
- 	-- now all the built-in Uniques (and functions to make them)
- 	-- [the Oh-So-Wonderful Haskell module system wins again...]
- 	mkAlphaTyVarUnique,
- 	mkPrimOpIdUnique,
- 	mkTupleTyConUnique, mkTupleDataConUnique,
- 	mkPreludeMiscIdUnique, mkPreludeDataConUnique,
- 	mkPreludeTyConUnique, mkPreludeClassUnique,
- 	mkPArrDataConUnique,
- 	mkAxiomRuleUnique,
+         -- now all the built-in Uniques (and functions to make them)
+         -- [the Oh-So-Wonderful Haskell module system wins again...]
+         mkAlphaTyVarUnique,
+         mkPrimOpIdUnique,
+         mkTupleTyConUnique, mkTupleDataConUnique,
+         mkPreludeMiscIdUnique, mkPreludeDataConUnique,
+         mkPreludeTyConUnique, mkPreludeClassUnique,
+         mkPArrDataConUnique,
++        mkAxiomRuleUnique,
  
      mkVarOccUnique, mkDataOccUnique, mkTvOccUnique, mkTcOccUnique,
          mkRegSingleUnique, mkRegPairUnique, mkRegClassUnique, mkRegSubUnique,
@@@ -286,24 -278,23 +279,24 @@@ iToBase62 n
  %************************************************************************
  
  Allocation of unique supply characters:
- 	v,t,u : for renumbering value-, type- and usage- vars.
- 	B:   builtin
- 	C-E: pseudo uniques	(used in native-code generator)
- 	X:   uniques derived by deriveUnique
- 	_:   unifiable tyvars   (above)
- 	0-9: prelude things below
- 	     (no numbers left any more..)
- 	::   (prelude) parallel array data constructors
+         v,t,u : for renumbering value-, type- and usage- vars.
+         B:   builtin
+         C-E: pseudo uniques     (used in native-code generator)
+         X:   uniques derived by deriveUnique
+         _:   unifiable tyvars   (above)
+         0-9: prelude things below
+              (no numbers left any more..)
+         ::   (prelude) parallel array data constructors
 +        +:   names of evidence rules for type-level proofs.
  
- 	other a-z: lower case chars for unique supplies.  Used so far:
+         other a-z: lower case chars for unique supplies.  Used so far:
  
- 	d	desugarer
- 	f	AbsC flattener
- 	g	SimplStg
- 	n	Native codegen
- 	r	Hsc name cache
- 	s	simplifier
+         d       desugarer
+         f       AbsC flattener
+         g       SimplStg
+         n       Native codegen
+         r       Hsc name cache
+         s       simplifier
  
  \begin{code}
  mkAlphaTyVarUnique     :: Int -> Unique
@@@ -344,11 -334,9 +336,11 @@@ mkTupleDataConUnique ConstraintTuple a 
  mkPrimOpIdUnique op         = mkUnique '9' op
  mkPreludeMiscIdUnique  i    = mkUnique '0' i
  
- -- No numbers left anymore, so I pick something different for the character tag 
- mkPArrDataConUnique a	        = mkUnique ':' (2*a)
+ -- No numbers left anymore, so I pick something different for the character tag
+ mkPArrDataConUnique a           = mkUnique ':' (2*a)
  
 +mkAxiomRuleUnique a         = mkUnique '+' a
 +
  -- The "tyvar uniques" print specially nicely: a, b, c, etc.
  -- See pprUnique for details
  
diff --cc compiler/iface/MkIface.lhs
index 5184ec8,ce07b37..ddb1fdc
--- a/compiler/iface/MkIface.lhs
+++ b/compiler/iface/MkIface.lhs
@@@ -1432,11 -1432,19 +1432,22 @@@ checkList (check:checks) = do recompil
  
  \begin{code}
  tyThingToIfaceDecl :: TyThing -> IfaceDecl
- -- Assumption: the thing is already tidied, so that locally-bound names
- --             (lambdas, for-alls) already have non-clashing OccNames
- -- Reason: Iface stuff uses OccNames, and the conversion here does
- --         not do tidying on the way
- tyThingToIfaceDecl (AnId id)
+ tyThingToIfaceDecl (AnId id)      = idToIfaceDecl id
+ tyThingToIfaceDecl (ATyCon tycon) = tyConToIfaceDecl emptyTidyEnv tycon
+ tyThingToIfaceDecl (ACoAxiom ax)  = coAxiomToIfaceDecl ax
+ tyThingToIfaceDecl (ADataCon dc)  = pprPanic "toIfaceDecl" (ppr dc)
+                                     -- Should be trimmed out earlier
++tyThingToIfaceDecl (ACoAxiomRule _)
++  = pprPanic "tyThingToIfaceDecl: declaration for a CoAxiomRule?" empty
++
+ 
+ --------------------------
+ idToIfaceDecl :: Id -> IfaceDecl
+ -- The Id is already tidied, so that locally-bound names
+ -- (lambdas, for-alls) already have non-clashing OccNames
+ -- We can't tidy it here, locally, because it may have
+ -- free variables in its type or IdInfo
+ idToIfaceDecl id
    = IfaceId { ifName      = getOccName id,
                ifType      = toIfaceType (idType id),
                ifIdDetails = toIfaceIdDetails (idDetails id),





More information about the Cvs-ghc mailing list