From 204e804aa249dbbc53c6e74cd9d77d018f58a1d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Philip=20K=2EF=2E=20H=C3=B6lzenspies?= <holzensp@gmail.com>
Date: Thu, 3 Oct 2013 14:22:34 +0200
Subject: [PATCH] Detabbed modules that still had the -fno-warn-tabs kludge and
 stopped genprimopcode from introducing tabs that set off GHC's warning

---
 compiler/basicTypes/DataCon.lhs              | 612 ++++++++++++------------
 compiler/basicTypes/IdInfo.lhs               | 286 ++++++-----
 compiler/basicTypes/MkId.lhs                 | 162 +++----
 compiler/basicTypes/NameEnv.lhs              |  76 ++-
 compiler/basicTypes/NameSet.lhs              | 122 +++--
 compiler/basicTypes/OccName.lhs              | 418 ++++++++--------
 compiler/basicTypes/Var.lhs                  | 162 +++----
 compiler/basicTypes/VarEnv.lhs               | 270 +++++------
 compiler/basicTypes/VarSet.lhs               | 136 +++---
 compiler/cmm/CmmInfo.hs                      |  82 ++--
 compiler/coreSyn/CoreArity.lhs               | 262 +++++-----
 compiler/coreSyn/CoreLint.lhs                | 356 +++++++-------
 compiler/coreSyn/CoreSubst.lhs               | 302 ++++++------
 compiler/coreSyn/CoreSyn.lhs                 | 416 ++++++++--------
 compiler/coreSyn/CoreTidy.lhs                | 122 +++--
 compiler/coreSyn/CoreUnfold.lhs              | 532 ++++++++++-----------
 compiler/coreSyn/MkCore.lhs                  |  46 +-
 compiler/coreSyn/TrieMap.lhs                 |  66 ++-
 compiler/deSugar/DsArrows.lhs                | 418 ++++++++--------
 compiler/deSugar/DsBinds.lhs                 | 272 ++++++-----
 compiler/deSugar/DsCCall.lhs                 | 174 ++++---
 compiler/deSugar/DsUtils.lhs                 | 270 +++++------
 compiler/deSugar/MatchCon.lhs                | 110 ++---
 compiler/ghci/ByteCodeGen.lhs                |  20 +-
 compiler/ghci/ByteCodeInstr.lhs              | 156 +++---
 compiler/ghci/RtClosureInspect.hs            |  36 +-
 compiler/hsSyn/HsLit.lhs                     | 102 ++--
 compiler/hsSyn/HsUtils.lhs                   | 162 +++----
 compiler/iface/BuildTyCl.lhs                 | 270 +++++------
 compiler/iface/IfaceEnv.lhs                  | 160 +++----
 compiler/iface/IfaceSyn.lhs                  |  28 +-
 compiler/main/PprTyThing.hs                  |  74 ++-
 compiler/nativeGen/PPC/Cond.hs               |  40 +-
 compiler/nativeGen/PPC/RegInfo.hs            |  18 +-
 compiler/nativeGen/Reg.hs                    | 234 +++++----
 compiler/nativeGen/RegClass.hs               |  40 +-
 compiler/nativeGen/SPARC/CodeGen/Amode.hs    |  32 +-
 compiler/nativeGen/SPARC/CodeGen/Base.hs     |  84 ++--
 compiler/nativeGen/SPARC/CodeGen/CondCode.hs |  46 +-
 compiler/nativeGen/SPARC/CodeGen/Expand.hs   | 196 ++++----
 compiler/nativeGen/SPARC/CodeGen/Gen32.hs    | 690 +++++++++++++--------------
 compiler/nativeGen/SPARC/CodeGen/Sanity.hs   |  88 ++--
 compiler/nativeGen/SPARC/Cond.hs             |  48 +-
 compiler/nativeGen/SPARC/Imm.hs              |  72 ++-
 compiler/nativeGen/SPARC/Instr.hs            | 602 ++++++++++++-----------
 compiler/nativeGen/SPARC/Regs.hs             | 260 +++++-----
 compiler/nativeGen/SPARC/ShortcutJump.hs     |  24 +-
 compiler/nativeGen/SPARC/Stack.hs            |  46 +-
 compiler/nativeGen/Size.hs                   |  86 ++--
 compiler/nativeGen/TargetReg.hs              |  30 +-
 compiler/nativeGen/X86/RegInfo.hs            |  28 +-
 compiler/parser/Ctype.lhs                    |  46 +-
 compiler/prelude/PrelInfo.lhs                |  50 +-
 compiler/prelude/TysPrim.lhs                 | 314 ++++++------
 compiler/profiling/CostCentre.lhs            |  84 ++--
 compiler/rename/RnBinds.lhs                  | 374 +++++++--------
 compiler/simplCore/CoreMonad.lhs             | 332 +++++++------
 compiler/simplCore/FloatIn.lhs               | 226 +++++----
 compiler/simplCore/FloatOut.lhs              | 208 ++++----
 compiler/simplCore/LiberateCase.lhs          | 234 +++++----
 compiler/simplCore/SAT.lhs                   |  68 ++-
 compiler/simplCore/SetLevels.lhs             | 552 +++++++++++----------
 compiler/stranal/WorkWrap.lhs                | 184 ++++---
 compiler/stranal/WwLib.lhs                   | 392 ++++++++-------
 compiler/typecheck/FamInst.lhs               |  80 ++--
 compiler/typecheck/Inst.lhs                  | 154 +++---
 compiler/typecheck/TcArrows.lhs              | 228 +++++----
 compiler/typecheck/TcCanonical.lhs           |  34 +-
 compiler/typecheck/TcClassDcl.lhs            | 188 ++++----
 compiler/typecheck/TcDefaults.lhs            |  70 ++-
 compiler/typecheck/TcErrors.lhs              |  66 ++-
 compiler/typecheck/TcGenGenerics.lhs         |  26 +-
 compiler/typecheck/TcHsType.lhs              | 332 +++++++------
 compiler/typecheck/TcInstDcls.lhs            |  22 +-
 compiler/typecheck/TcInteract.lhs            | 118 +++--
 compiler/typecheck/TcMType.lhs               | 148 +++---
 compiler/typecheck/TcMatches.lhs             | 352 +++++++-------
 compiler/typecheck/TcPat.lhs                 | 570 +++++++++++-----------
 compiler/typecheck/TcRules.lhs               |  90 ++--
 compiler/typecheck/TcSMonad.lhs              |  65 ++-
 compiler/typecheck/TcSimplify.lhs            |  50 +-
 compiler/typecheck/TcTyDecls.lhs             |  26 +-
 compiler/typecheck/TcType.lhs                | 376 +++++++--------
 compiler/typecheck/TcUnify.lhs               | 128 +++--
 compiler/types/Class.lhs                     |  96 ++--
 compiler/types/Coercion.lhs                  | 122 +++--
 compiler/types/Kind.lhs                      |  28 +-
 compiler/types/OptCoercion.lhs               |  20 +-
 compiler/types/TypeRep.lhs                   | 188 ++++----
 compiler/types/Unify.lhs                     | 306 ++++++------
 compiler/utils/BufWrite.hs                   |  72 ++-
 compiler/utils/Digraph.lhs                   |  38 +-
 compiler/utils/GraphBase.hs                  | 122 +++--
 compiler/utils/GraphPpr.hs                   | 254 +++++-----
 utils/genprimopcode/Main.hs                  |   4 +-
 95 files changed, 8109 insertions(+), 8672 deletions(-)

diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs
index ad56290..4cbd3ab 100644
--- a/compiler/basicTypes/DataCon.lhs
+++ b/compiler/basicTypes/DataCon.lhs
@@ -5,45 +5,39 @@
 \section[DataCon]{@DataCon@: Data Constructors}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module DataCon (
         -- * Main data types
-	DataCon, DataConRep(..), HsBang(..), StrictnessMark(..),
-	ConTag,
-	
-	-- ** Type construction
-	mkDataCon, fIRST_TAG,
+        DataCon, DataConRep(..), HsBang(..), StrictnessMark(..),
+        ConTag,
+        
+        -- ** Type construction
+        mkDataCon, fIRST_TAG,
         buildAlgTyCon, 
-	
-	-- ** Type deconstruction
-	dataConRepType, dataConSig, dataConFullSig,
-	dataConName, dataConIdentity, dataConTag, dataConTyCon, 
+        
+        -- ** Type deconstruction
+        dataConRepType, dataConSig, dataConFullSig,
+        dataConName, dataConIdentity, dataConTag, dataConTyCon, 
         dataConOrigTyCon, dataConUserType,
-	dataConUnivTyVars, dataConExTyVars, dataConAllTyVars, 
-	dataConEqSpec, eqSpecPreds, dataConTheta,
-	dataConStupidTheta,  
-	dataConInstArgTys, dataConOrigArgTys, dataConOrigResTy,
-	dataConInstOrigArgTys, dataConRepArgTys, 
-	dataConFieldLabels, dataConFieldType,
-	dataConStrictMarks, 
-	dataConSourceArity, dataConRepArity, dataConRepRepArity,
-	dataConIsInfix,
-	dataConWorkId, dataConWrapId, dataConWrapId_maybe, dataConImplicitIds,
-	dataConRepStrictness, dataConRepBangs, dataConBoxer,
-
-	splitDataProductType_maybe,
+        dataConUnivTyVars, dataConExTyVars, dataConAllTyVars, 
+        dataConEqSpec, eqSpecPreds, dataConTheta,
+        dataConStupidTheta,  
+        dataConInstArgTys, dataConOrigArgTys, dataConOrigResTy,
+        dataConInstOrigArgTys, dataConRepArgTys, 
+        dataConFieldLabels, dataConFieldType,
+        dataConStrictMarks, 
+        dataConSourceArity, dataConRepArity, dataConRepRepArity,
+        dataConIsInfix,
+        dataConWorkId, dataConWrapId, dataConWrapId_maybe, dataConImplicitIds,
+        dataConRepStrictness, dataConRepBangs, dataConBoxer,
+
+        splitDataProductType_maybe,
 
         tyConsOfTyCon,
 
-	-- ** Predicates on DataCons
-	isNullarySrcDataCon, isNullaryRepDataCon, isTupleDataCon, isUnboxedTupleCon,
-	isVanillaDataCon, classDataCon, dataConCannotMatch,
+        -- ** Predicates on DataCons
+        isNullarySrcDataCon, isNullaryRepDataCon, isTupleDataCon, isUnboxedTupleCon,
+        isVanillaDataCon, classDataCon, dataConCannotMatch,
         isBanged, isMarkedStrict, eqHsBang,
 
         -- ** Promotion related functions
@@ -86,30 +80,30 @@ Data constructor representation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider the following Haskell data type declaration
 
-	data T = T !Int ![Int]
+        data T = T !Int ![Int]
 
 Using the strictness annotations, GHC will represent this as
 
-	data T = T Int# [Int]
+        data T = T Int# [Int]
 
 That is, the Int has been unboxed.  Furthermore, the Haskell source construction
 
-	T e1 e2
+        T e1 e2
 
 is translated to
 
-	case e1 of { I# x -> 
-	case e2 of { r ->
-	T x r }}
+        case e1 of { I# x -> 
+        case e2 of { r ->
+        T x r }}
 
 That is, the first argument is unboxed, and the second is evaluated.  Finally,
 pattern matching is translated too:
 
-	case e of { T a b -> ... }
+        case e of { T a b -> ... }
 
 becomes
 
-	case e of { T a' b -> let a = I# a' in ... }
+        case e of { T a' b -> let a = I# a' in ... }
 
 To keep ourselves sane, we name the different versions of the data constructor
 differently, as follows.
@@ -119,11 +113,11 @@ Note [Data Constructor Naming]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Each data constructor C has two, and possibly up to four, Names associated with it:
 
-		   OccName   Name space	  Name of   Notes
+                   OccName   Name space   Name of   Notes
  ---------------------------------------------------------------------------
- The "data con itself" 	 C     DataName	  DataCon   In dom( GlobalRdrEnv )
- The "worker data con"	 C     VarName	  Id        The worker
- The "wrapper data con"	 $WC   VarName	  Id        The wrapper
+ The "data con itself"   C     DataName   DataCon   In dom( GlobalRdrEnv )
+ The "worker data con"   C     VarName    Id        The worker
+ The "wrapper data con"  $WC   VarName    Id        The wrapper
  The "newtype coercion"  :CoT  TcClsName  TyCon
  
 EVERY data constructor (incl for newtypes) has the former two (the
@@ -147,11 +141,11 @@ The "worker Id", is the actual data constructor.
 
 * For a *newtype*, the worker has a compulsory unfolding which 
   does a cast, e.g.
-	newtype T = MkT Int
-	The worker for MkT has unfolding
-		\\(x:Int). x `cast` sym CoT
+        newtype T = MkT Int
+        The worker for MkT has unfolding
+                \\(x:Int). x `cast` sym CoT
   Here CoT is the type constructor, witnessing the FC axiom
-	axiom CoT : T = Int
+        axiom CoT : T = Int
 
 The "wrapper Id", \$WC, goes as follows
 
@@ -162,235 +156,235 @@ The "wrapper Id", \$WC, goes as follows
 
 * The wrapper Id isn't generated for a data type if there is
   nothing for the wrapper to do.  That is, if its defn would be
-	\$wC = C
+        \$wC = C
 
 Note [The need for a wrapper]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Why might the wrapper have anything to do?  Two reasons:
 
 * Unboxing strict fields (with -funbox-strict-fields)
-	data T = MkT !(Int,Int)
-	\$wMkT :: (Int,Int) -> T
-	\$wMkT (x,y) = MkT x y
+        data T = MkT !(Int,Int)
+        \$wMkT :: (Int,Int) -> T
+        \$wMkT (x,y) = MkT x y
   Notice that the worker has two fields where the wapper has 
   just one.  That is, the worker has type
-		MkT :: Int -> Int -> T
+                MkT :: Int -> Int -> T
 
 * Equality constraints for GADTs
-	data T a where { MkT :: a -> T [a] }
+        data T a where { MkT :: a -> T [a] }
 
   The worker gets a type with explicit equality
   constraints, thus:
-	MkT :: forall a b. (a=[b]) => b -> T a
+        MkT :: forall a b. (a=[b]) => b -> T a
 
   The wrapper has the programmer-specified type:
-	\$wMkT :: a -> T [a]
-	\$wMkT a x = MkT [a] a [a] x
+        \$wMkT :: a -> T [a]
+        \$wMkT a x = MkT [a] a [a] x
   The third argument is a coerion
-	[a] :: [a]~[a]
+        [a] :: [a]~[a]
 
 INVARIANT: the dictionary constructor for a class
-	   never has a wrapper.
+           never has a wrapper.
 
 
 A note about the stupid context
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Data types can have a context:
-	
-	data (Eq a, Ord b) => T a b = T1 a b | T2 a
+        
+        data (Eq a, Ord b) => T a b = T1 a b | T2 a
 
 and that makes the constructors have a context too
 (notice that T2's context is "thinned"):
 
-	T1 :: (Eq a, Ord b) => a -> b -> T a b
-	T2 :: (Eq a) => a -> T a b
+        T1 :: (Eq a, Ord b) => a -> b -> T a b
+        T2 :: (Eq a) => a -> T a b
 
 Furthermore, this context pops up when pattern matching
 (though GHC hasn't implemented this, but it is in H98, and
 I've fixed GHC so that it now does):
 
-	f (T2 x) = x
+        f (T2 x) = x
 gets inferred type
-	f :: Eq a => T a b -> a
+        f :: Eq a => T a b -> a
 
 I say the context is "stupid" because the dictionaries passed
 are immediately discarded -- they do nothing and have no benefit.
 It's a flaw in the language.
 
-	Up to now [March 2002] I have put this stupid context into the
-	type of the "wrapper" constructors functions, T1 and T2, but
-	that turned out to be jolly inconvenient for generics, and
-	record update, and other functions that build values of type T
-	(because they don't have suitable dictionaries available).
+        Up to now [March 2002] I have put this stupid context into the
+        type of the "wrapper" constructors functions, T1 and T2, but
+        that turned out to be jolly inconvenient for generics, and
+        record update, and other functions that build values of type T
+        (because they don't have suitable dictionaries available).
 
-	So now I've taken the stupid context out.  I simply deal with
-	it separately in the type checker on occurrences of a
-	constructor, either in an expression or in a pattern.
+        So now I've taken the stupid context out.  I simply deal with
+        it separately in the type checker on occurrences of a
+        constructor, either in an expression or in a pattern.
 
-	[May 2003: actually I think this decision could evasily be
-	reversed now, and probably should be.  Generics could be
-	disabled for types with a stupid context; record updates now
-	(H98) needs the context too; etc.  It's an unforced change, so
-	I'm leaving it for now --- but it does seem odd that the
-	wrapper doesn't include the stupid context.]
+        [May 2003: actually I think this decision could evasily be
+        reversed now, and probably should be.  Generics could be
+        disabled for types with a stupid context; record updates now
+        (H98) needs the context too; etc.  It's an unforced change, so
+        I'm leaving it for now --- but it does seem odd that the
+        wrapper doesn't include the stupid context.]
 
 [July 04] With the advent of generalised data types, it's less obvious
 what the "stupid context" is.  Consider
-	C :: forall a. Ord a => a -> a -> T (Foo a)
+        C :: forall a. Ord a => a -> a -> T (Foo a)
 Does the C constructor in Core contain the Ord dictionary?  Yes, it must:
 
-	f :: T b -> Ordering
-	f = /\b. \x:T b. 
-	    case x of
-		C a (d:Ord a) (p:a) (q:a) -> compare d p q
+        f :: T b -> Ordering
+        f = /\b. \x:T b. 
+            case x of
+                C a (d:Ord a) (p:a) (q:a) -> compare d p q
 
 Note that (Foo a) might not be an instance of Ord.
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Data constructors}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 -- | A data constructor
 data DataCon
   = MkData {
-	dcName    :: Name,	-- This is the name of the *source data con*
-				-- (see "Note [Data Constructor Naming]" above)
-	dcUnique :: Unique, 	-- Cached from Name
-	dcTag    :: ConTag,     -- ^ Tag, used for ordering 'DataCon's
-
-	-- Running example:
-	--
-	-- 	*** As declared by the user
-	--  data T a where
-	--    MkT :: forall x y. (x~y,Ord x) => x -> y -> T (x,y)
-
-	-- 	*** As represented internally
-	--  data T a where
-	--    MkT :: forall a. forall x y. (a~(x,y),x~y,Ord x) => x -> y -> T a
-	-- 
-	-- The next six fields express the type of the constructor, in pieces
-	-- e.g.
-	--
-	--	dcUnivTyVars  = [a]
-	--	dcExTyVars    = [x,y]
-	--	dcEqSpec      = [a~(x,y)]
-	--	dcOtherTheta  = [x~y, Ord x]	
-	--	dcOrigArgTys  = [x,y]
-	--	dcRepTyCon       = T
-
-	dcVanilla :: Bool,	-- True <=> This is a vanilla Haskell 98 data constructor
-				--	    Its type is of form
-				--	        forall a1..an . t1 -> ... tm -> T a1..an
-				-- 	    No existentials, no coercions, nothing.
-				-- That is: dcExTyVars = dcEqSpec = dcOtherTheta = []
-		-- NB 1: newtypes always have a vanilla data con
-		-- NB 2: a vanilla constructor can still be declared in GADT-style 
-		--	 syntax, provided its type looks like the above.
-		--       The declaration format is held in the TyCon (algTcGadtSyntax)
-
-	dcUnivTyVars :: [TyVar],	-- Universally-quantified type vars [a,b,c]
-					-- INVARIANT: length matches arity of the dcRepTyCon
-					---           result type of (rep) data con is exactly (T a b c)
-
-	dcExTyVars   :: [TyVar],	-- Existentially-quantified type vars 
-		-- In general, the dcUnivTyVars are NOT NECESSARILY THE SAME AS THE TYVARS
-		-- FOR THE PARENT TyCon. With GADTs the data con might not even have 
-		-- the same number of type variables.
-		-- [This is a change (Oct05): previously, vanilla datacons guaranteed to
-		--  have the same type variables as their parent TyCon, but that seems ugly.]
-
-	-- INVARIANT: the UnivTyVars and ExTyVars all have distinct OccNames
-	-- Reason: less confusing, and easier to generate IfaceSyn
-
-	dcEqSpec :: [(TyVar,Type)],	-- Equalities derived from the result type, 
-					-- _as written by the programmer_
-		-- This field allows us to move conveniently between the two ways
-		-- of representing a GADT constructor's type:
-		--	MkT :: forall a b. (a ~ [b]) => b -> T a
-		--	MkT :: forall b. b -> T [b]
-		-- Each equality is of the form (a ~ ty), where 'a' is one of 
-		-- the universally quantified type variables
-					
-		-- The next two fields give the type context of the data constructor
-		-- 	(aside from the GADT constraints, 
-		--	 which are given by the dcExpSpec)
-		-- In GADT form, this is *exactly* what the programmer writes, even if
-		-- the context constrains only universally quantified variables
-		--	MkT :: forall a b. (a ~ b, Ord b) => a -> T a b
-	dcOtherTheta :: ThetaType,  -- The other constraints in the data con's type
-		                    -- other than those in the dcEqSpec
-
-	dcStupidTheta :: ThetaType,	-- The context of the data type declaration 
-					--	data Eq a => T a = ...
-					-- or, rather, a "thinned" version thereof
-		-- "Thinned", because the Report says
-		-- to eliminate any constraints that don't mention
-		-- tyvars free in the arg types for this constructor
-		--
-		-- INVARIANT: the free tyvars of dcStupidTheta are a subset of dcUnivTyVars
-		-- Reason: dcStupidTeta is gotten by thinning the stupid theta from the tycon
-		-- 
-		-- "Stupid", because the dictionaries aren't used for anything.  
-		-- Indeed, [as of March 02] they are no longer in the type of 
-		-- the wrapper Id, because that makes it harder to use the wrap-id 
-		-- to rebuild values after record selection or in generics.
-
-	dcOrigArgTys :: [Type],		-- Original argument types
-					-- (before unboxing and flattening of strict fields)
-	dcOrigResTy :: Type,		-- Original result type, as seen by the user
-		-- NB: for a data instance, the original user result type may 
-		-- differ from the DataCon's representation TyCon.  Example
-		--	data instance T [a] where MkT :: a -> T [a]
-		-- The OrigResTy is T [a], but the dcRepTyCon might be :T123
-
-	-- Now the strictness annotations and field labels of the constructor
+        dcName    :: Name,      -- This is the name of the *source data con*
+                                -- (see "Note [Data Constructor Naming]" above)
+        dcUnique :: Unique,     -- Cached from Name
+        dcTag    :: ConTag,     -- ^ Tag, used for ordering 'DataCon's
+
+        -- Running example:
+        --
+        --      *** As declared by the user
+        --  data T a where
+        --    MkT :: forall x y. (x~y,Ord x) => x -> y -> T (x,y)
+
+        --      *** As represented internally
+        --  data T a where
+        --    MkT :: forall a. forall x y. (a~(x,y),x~y,Ord x) => x -> y -> T a
+        -- 
+        -- The next six fields express the type of the constructor, in pieces
+        -- e.g.
+        --
+        --      dcUnivTyVars  = [a]
+        --      dcExTyVars    = [x,y]
+        --      dcEqSpec      = [a~(x,y)]
+        --      dcOtherTheta  = [x~y, Ord x]    
+        --      dcOrigArgTys  = [x,y]
+        --      dcRepTyCon       = T
+
+        dcVanilla :: Bool,      -- True <=> This is a vanilla Haskell 98 data constructor
+                                --          Its type is of form
+                                --              forall a1..an . t1 -> ... tm -> T a1..an
+                                --          No existentials, no coercions, nothing.
+                                -- That is: dcExTyVars = dcEqSpec = dcOtherTheta = []
+                -- NB 1: newtypes always have a vanilla data con
+                -- NB 2: a vanilla constructor can still be declared in GADT-style 
+                --       syntax, provided its type looks like the above.
+                --       The declaration format is held in the TyCon (algTcGadtSyntax)
+
+        dcUnivTyVars :: [TyVar],        -- Universally-quantified type vars [a,b,c]
+                                        -- INVARIANT: length matches arity of the dcRepTyCon
+                                        ---           result type of (rep) data con is exactly (T a b c)
+
+        dcExTyVars   :: [TyVar],        -- Existentially-quantified type vars 
+                -- In general, the dcUnivTyVars are NOT NECESSARILY THE SAME AS THE TYVARS
+                -- FOR THE PARENT TyCon. With GADTs the data con might not even have 
+                -- the same number of type variables.
+                -- [This is a change (Oct05): previously, vanilla datacons guaranteed to
+                --  have the same type variables as their parent TyCon, but that seems ugly.]
+
+        -- INVARIANT: the UnivTyVars and ExTyVars all have distinct OccNames
+        -- Reason: less confusing, and easier to generate IfaceSyn
+
+        dcEqSpec :: [(TyVar,Type)],     -- Equalities derived from the result type, 
+                                        -- _as written by the programmer_
+                -- This field allows us to move conveniently between the two ways
+                -- of representing a GADT constructor's type:
+                --      MkT :: forall a b. (a ~ [b]) => b -> T a
+                --      MkT :: forall b. b -> T [b]
+                -- Each equality is of the form (a ~ ty), where 'a' is one of 
+                -- the universally quantified type variables
+                                        
+                -- The next two fields give the type context of the data constructor
+                --      (aside from the GADT constraints, 
+                --       which are given by the dcExpSpec)
+                -- In GADT form, this is *exactly* what the programmer writes, even if
+                -- the context constrains only universally quantified variables
+                --      MkT :: forall a b. (a ~ b, Ord b) => a -> T a b
+        dcOtherTheta :: ThetaType,  -- The other constraints in the data con's type
+                                    -- other than those in the dcEqSpec
+
+        dcStupidTheta :: ThetaType,     -- The context of the data type declaration 
+                                        --      data Eq a => T a = ...
+                                        -- or, rather, a "thinned" version thereof
+                -- "Thinned", because the Report says
+                -- to eliminate any constraints that don't mention
+                -- tyvars free in the arg types for this constructor
+                --
+                -- INVARIANT: the free tyvars of dcStupidTheta are a subset of dcUnivTyVars
+                -- Reason: dcStupidTeta is gotten by thinning the stupid theta from the tycon
+                -- 
+                -- "Stupid", because the dictionaries aren't used for anything.  
+                -- Indeed, [as of March 02] they are no longer in the type of 
+                -- the wrapper Id, because that makes it harder to use the wrap-id 
+                -- to rebuild values after record selection or in generics.
+
+        dcOrigArgTys :: [Type],         -- Original argument types
+                                        -- (before unboxing and flattening of strict fields)
+        dcOrigResTy :: Type,            -- Original result type, as seen by the user
+                -- NB: for a data instance, the original user result type may 
+                -- differ from the DataCon's representation TyCon.  Example
+                --      data instance T [a] where MkT :: a -> T [a]
+                -- The OrigResTy is T [a], but the dcRepTyCon might be :T123
+
+        -- Now the strictness annotations and field labels of the constructor
         -- See Note [Bangs on data constructor arguments]
-	dcArgBangs :: [HsBang],
-		-- Strictness annotations as decided by the compiler.  
-		-- Matches 1-1 with dcOrigArgTys
-		-- Hence length = dataConSourceArity dataCon
-
-	dcFields  :: [FieldLabel],
-		-- Field labels for this constructor, in the
-		-- same order as the dcOrigArgTys; 
-		-- length = 0 (if not a record) or dataConSourceArity.
-
-	-- The curried worker function that corresponds to the constructor:
-	-- It doesn't have an unfolding; the code generator saturates these Ids
-	-- and allocates a real constructor when it finds one.
-	dcWorkId :: Id,
-
-	-- Constructor representation
+        dcArgBangs :: [HsBang],
+                -- Strictness annotations as decided by the compiler.  
+                -- Matches 1-1 with dcOrigArgTys
+                -- Hence length = dataConSourceArity dataCon
+
+        dcFields  :: [FieldLabel],
+                -- Field labels for this constructor, in the
+                -- same order as the dcOrigArgTys; 
+                -- length = 0 (if not a record) or dataConSourceArity.
+
+        -- The curried worker function that corresponds to the constructor:
+        -- It doesn't have an unfolding; the code generator saturates these Ids
+        -- and allocates a real constructor when it finds one.
+        dcWorkId :: Id,
+
+        -- Constructor representation
         dcRep      :: DataConRep,
 
         -- Cached
         dcRepArity    :: Arity,  -- == length dataConRepArgTys
         dcSourceArity :: Arity,  -- == length dcOrigArgTys
 
-	-- Result type of constructor is T t1..tn
-	dcRepTyCon  :: TyCon,		-- Result tycon, T
+        -- Result type of constructor is T t1..tn
+        dcRepTyCon  :: TyCon,           -- Result tycon, T
 
-	dcRepType   :: Type,	-- Type of the constructor
-				-- 	forall a x y. (a~(x,y), x~y, Ord x) =>
+        dcRepType   :: Type,    -- Type of the constructor
+                                --      forall a x y. (a~(x,y), x~y, Ord x) =>
                                 --        x -> y -> T a
-				-- (this is *not* of the constructor wrapper Id:
-				--  see Note [Data con representation] below)
-	-- Notice that the existential type parameters come *second*.  
-	-- Reason: in a case expression we may find:
-	--	case (e :: T t) of
+                                -- (this is *not* of the constructor wrapper Id:
+                                --  see Note [Data con representation] below)
+        -- Notice that the existential type parameters come *second*.  
+        -- Reason: in a case expression we may find:
+        --      case (e :: T t) of
         --        MkT x y co1 co2 (d:Ord x) (v:r) (w:F s) -> ...
-	-- It's convenient to apply the rep-type of MkT to 't', to get
-	--	forall x y. (t~(x,y), x~y, Ord x) => x -> y -> T t
-	-- and use that to check the pattern.  Mind you, this is really only
-	-- used in CoreLint.
+        -- It's convenient to apply the rep-type of MkT to 't', to get
+        --      forall x y. (t~(x,y), x~y, Ord x) => x -> y -> T t
+        -- and use that to check the pattern.  Mind you, this is really only
+        -- used in CoreLint.
 
 
-	dcInfix :: Bool,	-- True <=> declared infix
-				-- Used for Template Haskell and 'deriving' only
-				-- The actual fixity is stored elsewhere
+        dcInfix :: Bool,        -- True <=> declared infix
+                                -- Used for Template Haskell and 'deriving' only
+                                -- The actual fixity is stored elsewhere
 
         dcPromoted :: Maybe TyCon    -- The promoted TyCon if this DataCon is promotable
                                      -- See Note [Promoted data constructors] in TyCon
@@ -410,7 +404,7 @@ data DataConRep
                                  -- and *including* all evidence args
 
         , dcr_stricts :: [StrictnessMark]  -- 1-1 with dcr_arg_tys
-		-- See also Note [Data-con worker strictness] in MkId.lhs
+                -- See also Note [Data-con worker strictness] in MkId.lhs
 
         , dcr_bangs :: [HsBang]  -- The actual decisions made (including failures)
                                  -- 1-1 with orig_arg_tys
@@ -435,7 +429,7 @@ data DataConRep
 -- but it also ensures that the wrapper is replaced
 -- by the worker (because it *is* the worker)
 -- even when there are no args. E.g. in
--- 		f (:) x
+--              f (:) x
 -- the (:) *is* the worker.
 -- This is really important in rule matching,
 -- (We could match on the wrappers,
@@ -452,7 +446,7 @@ data HsBang
                           -- Nothing      no pragma
        Bool               -- True <=> '!' specified
 
-  | HsNoBang	          -- Lazy field
+  | HsNoBang              -- Lazy field
                           -- HsUserBang Nothing False means the same as HsNoBang
 
   | HsUnpack              -- Definite commitment: this field is strict and unboxed
@@ -464,7 +458,7 @@ data HsBang
 -------------------------
 -- StrictnessMark is internal only, used to indicate strictness 
 -- of the DataCon *worker* fields
-data StrictnessMark = MarkedStrict | NotMarkedStrict	
+data StrictnessMark = MarkedStrict | NotMarkedStrict    
 \end{code}
 
 Note [Data con representation]
@@ -472,17 +466,17 @@ Note [Data con representation]
 The dcRepType field contains the type of the representation of a contructor
 This may differ from the type of the contructor *Id* (built
 by MkId.mkDataConId) for two reasons:
-	a) the constructor Id may be overloaded, but the dictionary isn't stored
-	   e.g.    data Eq a => T a = MkT a a
+        a) the constructor Id may be overloaded, but the dictionary isn't stored
+           e.g.    data Eq a => T a = MkT a a
 
-	b) the constructor may store an unboxed version of a strict field.
+        b) the constructor may store an unboxed version of a strict field.
 
 Here's an example illustrating both:
-	data Ord a => T a = MkT Int! a
+        data Ord a => T a = MkT Int! a
 Here
-	T :: Ord a => Int -> a -> T a
+        T :: Ord a => Int -> a -> T a
 but the rep type is
-	Trep :: Int# -> a -> T a
+        Trep :: Int# -> a -> T a
 Actually, the unboxed part isn't implemented yet!
 
 Note [Bangs on data constructor arguments]
@@ -508,9 +502,9 @@ dcr_bangs field; we don't know what the user originally said.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Instances}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -520,9 +514,9 @@ instance Eq DataCon where
 
 instance Ord DataCon where
     a <= b = getUnique a <= getUnique b
-    a <	 b = getUnique a <  getUnique b
+    a <  b = getUnique a <  getUnique b
     a >= b = getUnique a >= getUnique b
-    a >	 b = getUnique a > getUnique b
+    a >  b = getUnique a > getUnique b
     compare a b = getUnique a `compare` getUnique b
 
 instance Uniquable DataCon where
@@ -581,42 +575,42 @@ isMarkedStrict _               = True   -- All others are strict
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Construction}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 -- | Build a new data constructor
 mkDataCon :: Name 
-	  -> Bool	        -- ^ Is the constructor declared infix?
-	  -> [HsBang]           -- ^ Strictness annotations written in the source file
-	  -> [FieldLabel]       -- ^ Field labels for the constructor, if it is a record, 
-				--   otherwise empty
-	  -> [TyVar]            -- ^ Universally quantified type variables
-	  -> [TyVar]            -- ^ Existentially quantified type variables
-	  -> [(TyVar,Type)]     -- ^ GADT equalities
-	  -> ThetaType          -- ^ Theta-type occuring before the arguments proper
-	  -> [Type]             -- ^ Original argument types
-	  -> Type		-- ^ Original result type
-	  -> TyCon              -- ^ Representation type constructor
-	  -> ThetaType          -- ^ The "stupid theta", context of the data declaration 
-				--   e.g. @data Eq a => T a ...@
+          -> Bool               -- ^ Is the constructor declared infix?
+          -> [HsBang]           -- ^ Strictness annotations written in the source file
+          -> [FieldLabel]       -- ^ Field labels for the constructor, if it is a record, 
+                                --   otherwise empty
+          -> [TyVar]            -- ^ Universally quantified type variables
+          -> [TyVar]            -- ^ Existentially quantified type variables
+          -> [(TyVar,Type)]     -- ^ GADT equalities
+          -> ThetaType          -- ^ Theta-type occuring before the arguments proper
+          -> [Type]             -- ^ Original argument types
+          -> Type               -- ^ Original result type
+          -> TyCon              -- ^ Representation type constructor
+          -> ThetaType          -- ^ The "stupid theta", context of the data declaration 
+                                --   e.g. @data Eq a => T a ...@
           -> Id                 -- ^ Worker Id
-	  -> DataConRep         -- ^ Representation
-	  -> DataCon
+          -> DataConRep         -- ^ Representation
+          -> DataCon
   -- Can get the tag from the TyCon
 
 mkDataCon name declared_infix
-	  arg_stricts	-- Must match orig_arg_tys 1-1
-	  fields
-	  univ_tvs ex_tvs 
-	  eq_spec theta
-	  orig_arg_tys orig_res_ty rep_tycon
-	  stupid_theta work_id rep
+          arg_stricts   -- Must match orig_arg_tys 1-1
+          fields
+          univ_tvs ex_tvs 
+          eq_spec theta
+          orig_arg_tys orig_res_ty rep_tycon
+          stupid_theta work_id rep
 -- Warning: mkDataCon is not a good place to check invariants. 
 -- If the programmer writes the wrong result type in the decl, thus:
---	data T a where { MkT :: S }
+--      data T a where { MkT :: S }
 -- then it's possible that the univ_tvs may hit an assertion failure
 -- if you pull on univ_tvs.  This case is checked by checkValidDataCon,
 -- so the error is detected properly... it's just that asaertions here
@@ -626,30 +620,30 @@ mkDataCon name declared_infix
   where
     is_vanilla = null ex_tvs && null eq_spec && null theta
     con = MkData {dcName = name, dcUnique = nameUnique name, 
-		  dcVanilla = is_vanilla, dcInfix = declared_infix,
-	  	  dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs, 
-		  dcEqSpec = eq_spec, 
-		  dcOtherTheta = theta,
-		  dcStupidTheta = stupid_theta, 
-		  dcOrigArgTys = orig_arg_tys, dcOrigResTy = orig_res_ty,
-		  dcRepTyCon = rep_tycon, 
-		  dcArgBangs = arg_stricts, 
-		  dcFields = fields, dcTag = tag, dcRepType = rep_ty,
-		  dcWorkId = work_id,
+                  dcVanilla = is_vanilla, dcInfix = declared_infix,
+                  dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs, 
+                  dcEqSpec = eq_spec, 
+                  dcOtherTheta = theta,
+                  dcStupidTheta = stupid_theta, 
+                  dcOrigArgTys = orig_arg_tys, dcOrigResTy = orig_res_ty,
+                  dcRepTyCon = rep_tycon, 
+                  dcArgBangs = arg_stricts, 
+                  dcFields = fields, dcTag = tag, dcRepType = rep_ty,
+                  dcWorkId = work_id,
                   dcRep = rep, 
                   dcSourceArity = length orig_arg_tys,
                   dcRepArity = length rep_arg_tys,
                   dcPromoted = mb_promoted }
 
-	-- The 'arg_stricts' passed to mkDataCon are simply those for the
-	-- source-language arguments.  We add extra ones for the
-	-- dictionary arguments right here.
+        -- The 'arg_stricts' passed to mkDataCon are simply those for the
+        -- source-language arguments.  We add extra ones for the
+        -- dictionary arguments right here.
 
     tag = assoc "mkDataCon" (tyConDataCons rep_tycon `zip` [fIRST_TAG..]) con
     rep_arg_tys = dataConRepArgTys con
     rep_ty = mkForAllTys univ_tvs $ mkForAllTys ex_tvs $ 
-	     mkFunTys rep_arg_tys $
-	     mkTyConApp rep_tycon (mkTyVarTys univ_tvs)
+             mkFunTys rep_arg_tys $
+             mkTyConApp rep_tycon (mkTyVarTys univ_tvs)
 
     mb_promoted   -- See Note [Promoted data constructors] in TyCon
       | isJust (promotableTyCon_maybe rep_tycon)
@@ -828,8 +822,8 @@ dataConBoxer _ = Nothing
 -- 4) The /original/ result type of the 'DataCon'
 dataConSig :: DataCon -> ([TyVar], ThetaType, [Type], Type)
 dataConSig (MkData {dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs, 
-		    dcEqSpec = eq_spec, dcOtherTheta  = theta, 
-		    dcOrigArgTys = arg_tys, dcOrigResTy = res_ty})
+                    dcEqSpec = eq_spec, dcOtherTheta  = theta, 
+                    dcOrigArgTys = arg_tys, dcOrigResTy = res_ty})
   = (univ_tvs ++ ex_tvs, eqSpecPreds eq_spec ++ theta, arg_tys, res_ty)
 
 -- | The \"full signature\" of the 'DataCon' returns, in order:
@@ -847,10 +841,10 @@ dataConSig (MkData {dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs,
 --
 -- 6) The original result type of the 'DataCon'
 dataConFullSig :: DataCon 
-	       -> ([TyVar], [TyVar], [(TyVar,Type)], ThetaType, [Type], Type)
+               -> ([TyVar], [TyVar], [(TyVar,Type)], ThetaType, [Type], Type)
 dataConFullSig (MkData {dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs, 
-			dcEqSpec = eq_spec, dcOtherTheta = theta,
-			dcOrigArgTys = arg_tys, dcOrigResTy = res_ty})
+                        dcEqSpec = eq_spec, dcOtherTheta = theta,
+                        dcOrigArgTys = arg_tys, dcOrigResTy = res_ty})
   = (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, res_ty)
 
 dataConOrigResTy :: DataCon -> Type
@@ -875,9 +869,9 @@ dataConUserType :: DataCon -> Type
 -- NB: If the constructor is part of a data instance, the result type
 -- mentions the family tycon, not the internal one.
 dataConUserType  (MkData { dcUnivTyVars = univ_tvs, 
-			   dcExTyVars = ex_tvs, dcEqSpec = eq_spec,
-			   dcOtherTheta = theta, dcOrigArgTys = arg_tys,
-			   dcOrigResTy = res_ty })
+                           dcExTyVars = ex_tvs, dcEqSpec = eq_spec,
+                           dcOtherTheta = theta, dcOrigArgTys = arg_tys,
+                           dcOrigResTy = res_ty })
   = mkForAllTys ((univ_tvs `minusList` map fst eq_spec) ++ ex_tvs) $
     mkFunTys theta $
     mkFunTys arg_tys $
@@ -887,13 +881,13 @@ dataConUserType  (MkData { dcUnivTyVars = univ_tvs,
 -- NB: these INCLUDE any dictionary args
 --     but EXCLUDE the data-declaration context, which is discarded
 -- It's all post-flattening etc; this is a representation type
-dataConInstArgTys :: DataCon	-- ^ A datacon with no existentials or equality constraints
-				-- However, it can have a dcTheta (notably it can be a 
-				-- class dictionary, with superclasses)
-	      	  -> [Type] 	-- ^ Instantiated at these types
-	      	  -> [Type]
+dataConInstArgTys :: DataCon    -- ^ A datacon with no existentials or equality constraints
+                                -- However, it can have a dcTheta (notably it can be a 
+                                -- class dictionary, with superclasses)
+                  -> [Type]     -- ^ Instantiated at these types
+                  -> [Type]
 dataConInstArgTys dc@(MkData {dcUnivTyVars = univ_tvs, dcEqSpec = eq_spec,
-			      dcExTyVars = ex_tvs}) inst_tys
+                              dcExTyVars = ex_tvs}) inst_tys
  = ASSERT2( length univ_tvs == length inst_tys
           , ptext (sLit "dataConInstArgTys") <+> ppr dc $$ ppr univ_tvs $$ ppr inst_tys)
    ASSERT2( null ex_tvs && null eq_spec, ppr dc )
@@ -902,15 +896,15 @@ dataConInstArgTys dc@(MkData {dcUnivTyVars = univ_tvs, dcEqSpec = eq_spec,
 -- | Returns just the instantiated /value/ argument types of a 'DataCon',
 -- (excluding dictionary args)
 dataConInstOrigArgTys 
-	:: DataCon	-- Works for any DataCon
-	-> [Type]	-- Includes existential tyvar args, but NOT
-			-- equality constraints or dicts
-	-> [Type]
+        :: DataCon      -- Works for any DataCon
+        -> [Type]       -- Includes existential tyvar args, but NOT
+                        -- equality constraints or dicts
+        -> [Type]
 -- For vanilla datacons, it's all quite straightforward
 -- But for the call in MatchCon, we really do want just the value args
 dataConInstOrigArgTys dc@(MkData {dcOrigArgTys = arg_tys,
-			          dcUnivTyVars = univ_tvs, 
-			          dcExTyVars = ex_tvs}) inst_tys
+                                  dcUnivTyVars = univ_tvs, 
+                                  dcExTyVars = ex_tvs}) inst_tys
   = ASSERT2( length tyvars == length inst_tys
           , ptext (sLit "dataConInstOrigArgTys") <+> ppr dc $$ ppr tyvars $$ ppr inst_tys )
     map (substTyWith tyvars inst_tys) arg_tys
@@ -930,7 +924,7 @@ dataConRepArgTys :: DataCon -> [Type]
 dataConRepArgTys (MkData { dcRep = rep 
                          , dcEqSpec = eq_spec
                          , dcOtherTheta = theta
-		         , dcOrigArgTys = orig_arg_tys })
+                         , dcOrigArgTys = orig_arg_tys })
   = case rep of
       NoDataConRep -> ASSERT( null eq_spec ) theta ++ orig_arg_tys
       DCR { dcr_arg_tys = arg_tys } -> arg_tys
@@ -951,7 +945,7 @@ dataConIdentity dc = bytesFS (packageIdFS (modulePackageId mod)) ++
 \begin{code}
 isTupleDataCon :: DataCon -> Bool
 isTupleDataCon (MkData {dcRepTyCon = tc}) = isTupleTyCon tc
-	
+        
 isUnboxedTupleCon :: DataCon -> Bool
 isUnboxedTupleCon (MkData {dcRepTyCon = tc}) = isUnboxedTupleTyCon tc
 
@@ -963,20 +957,20 @@ isVanillaDataCon dc = dcVanilla dc
 \begin{code}
 classDataCon :: Class -> DataCon
 classDataCon clas = case tyConDataCons (classTyCon clas) of
-		      (dict_constr:no_more) -> ASSERT( null no_more ) dict_constr 
-		      [] -> panic "classDataCon"
+                      (dict_constr:no_more) -> ASSERT( null no_more ) dict_constr 
+                      [] -> panic "classDataCon"
 \end{code}
 
 \begin{code}
 dataConCannotMatch :: [Type] -> DataCon -> Bool
 -- Returns True iff the data con *definitely cannot* match a 
---		    scrutinee of type (T tys)
---		    where T is the dcRepTyCon for the data con
+--                  scrutinee of type (T tys)
+--                  where T is the dcRepTyCon for the data con
 -- NB: look at *all* equality constraints, not only those
 --     in dataConEqSpec; see Trac #5168
 dataConCannotMatch tys con
-  | null theta        = False	-- Common
-  | all isTyVarTy tys = False	-- Also common
+  | null theta        = False   -- Common
+  | all isTyVarTy tys = False   -- Also common
   | otherwise
   = typesCantMatch [(Type.substTy subst ty1, Type.substTy subst ty2)
                    | (ty1, ty2) <- concatMap predEqs theta ]
@@ -994,9 +988,9 @@ dataConCannotMatch tys con
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
               Building an algebraic data type
-%*									*
+%*                                                                      *
 %************************************************************************
 
 buildAlgTyCon is here because it is called from TysWiredIn, which in turn
@@ -1006,14 +1000,14 @@ depends on DataCon, but not on BuildTyCl.
 buildAlgTyCon :: Name 
               -> [TyVar]               -- ^ Kind variables and type variables
               -> [Role]
-	      -> Maybe CType
-	      -> ThetaType	       -- ^ Stupid theta
-	      -> AlgTyConRhs
-	      -> RecFlag
-	      -> Bool		       -- ^ True <=> this TyCon is promotable
-	      -> Bool		       -- ^ True <=> was declared in GADT syntax
+              -> Maybe CType
+              -> ThetaType             -- ^ Stupid theta
+              -> AlgTyConRhs
+              -> RecFlag
+              -> Bool                  -- ^ True <=> this TyCon is promotable
+              -> Bool                  -- ^ True <=> was declared in GADT syntax
               -> TyConParent
-	      -> TyCon
+              -> TyCon
 
 buildAlgTyCon tc_name ktvs roles cType stupid_theta rhs 
               is_rec is_promotable gadt_syn parent
@@ -1096,9 +1090,9 @@ promoteKind k = pprPanic "promoteKind" (ppr k)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Splitting products}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1115,15 +1109,15 @@ promoteKind k = pprPanic "promoteKind" (ppr k)
 --
 -- Whether the type is a @data@ type or a @newtype@
 splitDataProductType_maybe
-	:: Type 			-- ^ A product type, perhaps
-	-> Maybe (TyCon, 		-- The type constructor
-		  [Type],		-- Type args of the tycon
-		  DataCon,		-- The data constructor
-		  [Type])		-- Its /representation/ arg types
-
-	-- Rejecing existentials is conservative.  Maybe some things
-	-- could be made to work with them, but I'm not going to sweat
-	-- it through till someone finds it's important.
+        :: Type                         -- ^ A product type, perhaps
+        -> Maybe (TyCon,                -- The type constructor
+                  [Type],               -- Type args of the tycon
+                  DataCon,              -- The data constructor
+                  [Type])               -- Its /representation/ arg types
+
+        -- Rejecing existentials is conservative.  Maybe some things
+        -- could be made to work with them, but I'm not going to sweat
+        -- it through till someone finds it's important.
 
 splitDataProductType_maybe ty
   | Just (tycon, ty_args) <- splitTyConApp_maybe ty
diff --git a/compiler/basicTypes/IdInfo.lhs b/compiler/basicTypes/IdInfo.lhs
index a2bdd5c..0a25a9e 100644
--- a/compiler/basicTypes/IdInfo.lhs
+++ b/compiler/basicTypes/IdInfo.lhs
@@ -8,62 +8,56 @@
 Haskell. [WDP 94/11])
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module IdInfo (
         -- * The IdDetails type
-	IdDetails(..), pprIdDetails, coVarDetails,
+        IdDetails(..), pprIdDetails, coVarDetails,
 
         -- * The IdInfo type
-	IdInfo,		-- Abstract
-	vanillaIdInfo, noCafIdInfo,
-	seqIdInfo, megaSeqIdInfo,
+        IdInfo,         -- Abstract
+        vanillaIdInfo, noCafIdInfo,
+        seqIdInfo, megaSeqIdInfo,
 
-	-- ** Zapping various forms of Info
-	zapLamInfo, zapFragileInfo,
+        -- ** Zapping various forms of Info
+        zapLamInfo, zapFragileInfo,
 
         zapDemandInfo,
 
-	-- ** The ArityInfo type
-	ArityInfo,
-	unknownArity, 
-	arityInfo, setArityInfo, ppArityInfo, 
-
-	-- ** Demand and strictness Info
- 	strictnessInfo, setStrictnessInfo, 
-  	demandInfo, setDemandInfo, pprStrictness,
-
-	-- ** Unfolding Info
-	unfoldingInfo, setUnfoldingInfo, setUnfoldingInfoLazily,
-
-	-- ** The InlinePragInfo type
-	InlinePragInfo,
-	inlinePragInfo, setInlinePragInfo,
-
-	-- ** The OccInfo type
-	OccInfo(..),
-	isDeadOcc, isStrongLoopBreaker, isWeakLoopBreaker,
-	occInfo, setOccInfo,
-
-	InsideLam, OneBranch,
-	insideLam, notInsideLam, oneBranch, notOneBranch,
-	
-	-- ** The SpecInfo type
-	SpecInfo(..),
-	emptySpecInfo,
-	isEmptySpecInfo, specInfoFreeVars,
-	specInfoRules, seqSpecInfo, setSpecInfoHead,
+        -- ** The ArityInfo type
+        ArityInfo,
+        unknownArity, 
+        arityInfo, setArityInfo, ppArityInfo, 
+
+        -- ** Demand and strictness Info
+        strictnessInfo, setStrictnessInfo, 
+        demandInfo, setDemandInfo, pprStrictness,
+
+        -- ** Unfolding Info
+        unfoldingInfo, setUnfoldingInfo, setUnfoldingInfoLazily,
+
+        -- ** The InlinePragInfo type
+        InlinePragInfo,
+        inlinePragInfo, setInlinePragInfo,
+
+        -- ** The OccInfo type
+        OccInfo(..),
+        isDeadOcc, isStrongLoopBreaker, isWeakLoopBreaker,
+        occInfo, setOccInfo,
+
+        InsideLam, OneBranch,
+        insideLam, notInsideLam, oneBranch, notOneBranch,
+        
+        -- ** The SpecInfo type
+        SpecInfo(..),
+        emptySpecInfo,
+        isEmptySpecInfo, specInfoFreeVars,
+        specInfoRules, seqSpecInfo, setSpecInfoHead,
         specInfo, setSpecInfo,
 
-	-- ** The CAFInfo type
-	CafInfo(..),
-	ppCafInfo, mayHaveCafRefs,
-	cafInfo, setCafInfo,
+        -- ** The CAFInfo type
+        CafInfo(..),
+        ppCafInfo, mayHaveCafRefs,
+        cafInfo, setCafInfo,
 
         -- ** The LBVarInfo type
         LBVarInfo(..),
@@ -84,57 +78,57 @@ import BasicTypes
 import DataCon
 import TyCon
 import ForeignCall
-import Outputable	
+import Outputable       
 import Module
 import FastString
 import Demand
 
 -- infixl so you can say (id `set` a `set` b)
-infixl 	1 `setSpecInfo`,
-	  `setArityInfo`,
-	  `setInlinePragInfo`,
-	  `setUnfoldingInfo`,
-	  `setLBVarInfo`,
-	  `setOccInfo`,
-	  `setCafInfo`,
-	  `setStrictnessInfo`,
-	  `setDemandInfo`
+infixl  1 `setSpecInfo`,
+          `setArityInfo`,
+          `setInlinePragInfo`,
+          `setUnfoldingInfo`,
+          `setLBVarInfo`,
+          `setOccInfo`,
+          `setCafInfo`,
+          `setStrictnessInfo`,
+          `setDemandInfo`
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                      IdDetails
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 -- | The 'IdDetails' of an 'Id' give stable, and necessary, 
 -- information about the Id. 
 data IdDetails
-  = VanillaId	
+  = VanillaId   
 
   -- | The 'Id' for a record selector
   | RecSelId                 
-    { sel_tycon   :: TyCon	-- ^ For a data type family, this is the /instance/ 'TyCon'
-				--   not the family 'TyCon'
+    { sel_tycon   :: TyCon      -- ^ For a data type family, this is the /instance/ 'TyCon'
+                                --   not the family 'TyCon'
     , sel_naughty :: Bool       -- True <=> a "naughty" selector which can't actually exist, for example @x@ in:
                                 --    data T = forall a. MkT { x :: a }
-    }				-- See Note [Naughty record selectors] in TcTyClsDecls
+    }                           -- See Note [Naughty record selectors] in TcTyClsDecls
 
-  | DataConWorkId DataCon	-- ^ The 'Id' is for a data constructor /worker/
-  | DataConWrapId DataCon	-- ^ The 'Id' is for a data constructor /wrapper/
-				
-				-- [the only reasons we need to know is so that
-				--  a) to support isImplicitId
-				--  b) when desugaring a RecordCon we can get 
-				--     from the Id back to the data con]
+  | DataConWorkId DataCon       -- ^ The 'Id' is for a data constructor /worker/
+  | DataConWrapId DataCon       -- ^ The 'Id' is for a data constructor /wrapper/
+                                
+                                -- [the only reasons we need to know is so that
+                                --  a) to support isImplicitId
+                                --  b) when desugaring a RecordCon we can get 
+                                --     from the Id back to the data con]
 
-  | ClassOpId Class 		-- ^ The 'Id' is a superclass selector or class operation of a class
+  | ClassOpId Class             -- ^ The 'Id' is a superclass selector or class operation of a class
 
-  | PrimOpId PrimOp		-- ^ The 'Id' is for a primitive operator
-  | FCallId ForeignCall		-- ^ The 'Id' is for a foreign call
+  | PrimOpId PrimOp             -- ^ The 'Id' is for a primitive operator
+  | FCallId ForeignCall         -- ^ The 'Id' is for a foreign call
 
-  | TickBoxOpId TickBoxOp	-- ^ The 'Id' is for a HPC tick box (both traditional and binary)
+  | TickBoxOpId TickBoxOp       -- ^ The 'Id' is for a HPC tick box (both traditional and binary)
 
   | DFunId Int Bool             -- ^ A dictionary function.
        -- Int = the number of "silent" arguments to the dfun
@@ -169,15 +163,15 @@ pprIdDetails other     = brackets (pp other)
                              <> ppWhen (ns /= 0) (brackets (int ns))
                              <> ppWhen nt (ptext (sLit "(nt)"))
    pp (RecSelId { sel_naughty = is_naughty })
-      			 = brackets $ ptext (sLit "RecSel") 
-      			    <> ppWhen is_naughty (ptext (sLit "(naughty)"))
+                         = brackets $ ptext (sLit "RecSel") 
+                            <> ppWhen is_naughty (ptext (sLit "(naughty)"))
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{The main IdInfo type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -194,14 +188,14 @@ pprIdDetails other     = brackets (pp other)
 -- except for 'demandInfo' and 'lbvarInfo'.
 data IdInfo
   = IdInfo {
-	arityInfo 	:: !ArityInfo,		-- ^ 'Id' arity
-	specInfo 	:: SpecInfo,		-- ^ Specialisations of the 'Id's function which exist
-			   			-- See Note [Specialisations and RULES in IdInfo]
-	unfoldingInfo	:: Unfolding,		-- ^ The 'Id's unfolding
-	cafInfo		:: CafInfo,		-- ^ 'Id' CAF info
-        lbvarInfo	:: LBVarInfo,		-- ^ Info about a lambda-bound variable, if the 'Id' is one
-	inlinePragInfo	:: InlinePragma,	-- ^ Any inline pragma atached to the 'Id'
-	occInfo		:: OccInfo,		-- ^ How the 'Id' occurs in the program
+        arityInfo       :: !ArityInfo,          -- ^ 'Id' arity
+        specInfo        :: SpecInfo,            -- ^ Specialisations of the 'Id's function which exist
+                                                -- See Note [Specialisations and RULES in IdInfo]
+        unfoldingInfo   :: Unfolding,           -- ^ The 'Id's unfolding
+        cafInfo         :: CafInfo,             -- ^ 'Id' CAF info
+        lbvarInfo       :: LBVarInfo,           -- ^ Info about a lambda-bound variable, if the 'Id' is one
+        inlinePragInfo  :: InlinePragma,        -- ^ Any inline pragma atached to the 'Id'
+        occInfo         :: OccInfo,             -- ^ How the 'Id' occurs in the program
 
         strictnessInfo  :: StrictSig,      --  ^ A strictness signature
 
@@ -217,17 +211,17 @@ seqIdInfo (IdInfo {}) = ()
 -- compiler
 megaSeqIdInfo :: IdInfo -> ()
 megaSeqIdInfo info
-  = seqSpecInfo (specInfo info)			`seq`
+  = seqSpecInfo (specInfo info)                 `seq`
 
 -- Omitting this improves runtimes a little, presumably because
 -- some unfoldings are not calculated at all
---    seqUnfolding (unfoldingInfo info)		`seq`
+--    seqUnfolding (unfoldingInfo info)         `seq`
 
     seqDemandInfo (demandInfo info)         `seq`
     seqStrictnessInfo (strictnessInfo info) `seq`
 
-    seqCaf (cafInfo info)			`seq`
-    seqLBVar (lbvarInfo info)			`seq`
+    seqCaf (cafInfo info)                       `seq`
+    seqLBVar (lbvarInfo info)                   `seq`
     seqOccInfo (occInfo info) 
 
 seqStrictnessInfo :: StrictSig -> ()
@@ -241,17 +235,17 @@ Setters
 
 \begin{code}
 setSpecInfo :: IdInfo -> SpecInfo -> IdInfo
-setSpecInfo 	  info sp = sp `seq` info { specInfo = sp }
+setSpecInfo       info sp = sp `seq` info { specInfo = sp }
 setInlinePragInfo :: IdInfo -> InlinePragma -> IdInfo
 setInlinePragInfo info pr = pr `seq` info { inlinePragInfo = pr }
 setOccInfo :: IdInfo -> OccInfo -> IdInfo
-setOccInfo	  info oc = oc `seq` info { occInfo = oc }
-	-- Try to avoid spack leaks by seq'ing
+setOccInfo        info oc = oc `seq` info { occInfo = oc }
+        -- Try to avoid spack leaks by seq'ing
 
 setUnfoldingInfoLazily :: IdInfo -> Unfolding -> IdInfo
-setUnfoldingInfoLazily info uf 	-- Lazy variant to avoid looking at the
-  =				-- unfolding of an imported Id unless necessary
-    info { unfoldingInfo = uf }	-- (In this case the demand-zapping is redundant.)
+setUnfoldingInfoLazily info uf  -- Lazy variant to avoid looking at the
+  =                             -- unfolding of an imported Id unless necessary
+    info { unfoldingInfo = uf } -- (In this case the demand-zapping is redundant.)
 
 setUnfoldingInfo :: IdInfo -> Unfolding -> IdInfo
 setUnfoldingInfo info uf 
@@ -262,7 +256,7 @@ setUnfoldingInfo info uf
     info { unfoldingInfo = uf }
 
 setArityInfo :: IdInfo -> ArityInfo -> IdInfo
-setArityInfo	  info ar  = info { arityInfo = ar  }
+setArityInfo      info ar  = info { arityInfo = ar  }
 setCafInfo :: IdInfo -> CafInfo -> IdInfo
 setCafInfo        info caf = info { cafInfo = caf }
 
@@ -282,32 +276,32 @@ setStrictnessInfo info dd = dd `seq` info { strictnessInfo = dd }
 vanillaIdInfo :: IdInfo
 vanillaIdInfo 
   = IdInfo {
-	    cafInfo		= vanillaCafInfo,
-	    arityInfo		= unknownArity,
-	    specInfo		= emptySpecInfo,
-	    unfoldingInfo	= noUnfolding,
-	    lbvarInfo		= NoLBVarInfo,
-	    inlinePragInfo 	= defaultInlinePragma,
-	    occInfo		= NoOccInfo,
-            demandInfo	        = topDmd,
-	    strictnessInfo      = topSig
-	   }
+            cafInfo             = vanillaCafInfo,
+            arityInfo           = unknownArity,
+            specInfo            = emptySpecInfo,
+            unfoldingInfo       = noUnfolding,
+            lbvarInfo           = NoLBVarInfo,
+            inlinePragInfo      = defaultInlinePragma,
+            occInfo             = NoOccInfo,
+            demandInfo          = topDmd,
+            strictnessInfo      = topSig
+           }
 
 -- | More informative 'IdInfo' we can use when we know the 'Id' has no CAF references
 noCafIdInfo :: IdInfo
 noCafIdInfo  = vanillaIdInfo `setCafInfo`    NoCafRefs
-	-- Used for built-in type Ids in MkId.
+        -- Used for built-in type Ids in MkId.
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[arity-IdInfo]{Arity info about an @Id@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 For locally-defined Ids, the code generator maintains its own notion
-of their arities; so it should not be asking...	 (but other things
+of their arities; so it should not be asking...  (but other things
 besides the code-generator need arity info!)
 
 \begin{code}
@@ -331,9 +325,9 @@ ppArityInfo n = hsep [ptext (sLit "Arity"), int n]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Inline-pragma information}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -351,9 +345,9 @@ type InlinePragInfo = InlinePragma
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                Strictness
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -363,9 +357,9 @@ pprStrictness sig = ppr sig
 
 
 %************************************************************************
-%*									*
-	SpecInfo
-%*									*
+%*                                                                      *
+        SpecInfo
+%*                                                                      *
 %************************************************************************
 
 Note [Specialisations and RULES in IdInfo]
@@ -392,11 +386,11 @@ and put in the global list.
 -- in the form of rewrite 'CoreRule's that target them
 data SpecInfo 
   = SpecInfo 
-	[CoreRule] 
-	VarSet		-- Locally-defined free vars of *both* LHS and RHS 
-			-- of rules.  I don't think it needs to include the
-			-- ru_fn though.
-			-- Note [Rule dependency info] in OccurAnal
+        [CoreRule] 
+        VarSet          -- Locally-defined free vars of *both* LHS and RHS 
+                        -- of rules.  I don't think it needs to include the
+                        -- ru_fn though.
+                        -- Note [Rule dependency info] in OccurAnal
 
 -- | Assume that no specilizations exist: always safe
 emptySpecInfo :: SpecInfo
@@ -423,9 +417,9 @@ seqSpecInfo (SpecInfo rules fvs) = seqRules rules `seq` seqVarSet fvs
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[CG-IdInfo]{Code generator-related information}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -433,15 +427,15 @@ seqSpecInfo (SpecInfo rules fvs) = seqRules rules `seq` seqVarSet fvs
 
 -- | Records whether an 'Id' makes Constant Applicative Form references
 data CafInfo 
-	= MayHaveCafRefs		-- ^ Indicates that the 'Id' is for either:
-					--
-					-- 1. A function or static constructor
-					--    that refers to one or more CAFs, or
-					--
-					-- 2. A real live CAF
-
-	| NoCafRefs			-- ^ A function or static constructor
-				        -- that refers to no CAFs.
+        = MayHaveCafRefs                -- ^ Indicates that the 'Id' is for either:
+                                        --
+                                        -- 1. A function or static constructor
+                                        --    that refers to one or more CAFs, or
+                                        --
+                                        -- 2. A real live CAF
+
+        | NoCafRefs                     -- ^ A function or static constructor
+                                        -- that refers to no CAFs.
         deriving (Eq, Ord)
 
 -- | Assumes that the 'Id' has CAF references: definitely safe
@@ -450,7 +444,7 @@ vanillaCafInfo = MayHaveCafRefs
 
 mayHaveCafRefs :: CafInfo -> Bool
 mayHaveCafRefs  MayHaveCafRefs = True
-mayHaveCafRefs _	       = False
+mayHaveCafRefs _               = False
 
 seqCaf :: CafInfo -> ()
 seqCaf c = c `seq` ()
@@ -464,9 +458,9 @@ ppCafInfo MayHaveCafRefs = empty
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lbvar-IdInfo]{Lambda-bound var info about an @Id@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -478,7 +472,7 @@ ppCafInfo MayHaveCafRefs = empty
 -- safely be floated inside such a lambda without risk of duplicating
 -- work.
 data LBVarInfo = NoLBVarInfo            -- ^ No information
-	       | IsOneShotLambda	-- ^ The lambda is applied at most once).
+               | IsOneShotLambda        -- ^ The lambda is applied at most once).
 
 -- | It is always safe to assume that an 'Id' has no lambda-bound variable information
 noLBVarInfo :: LBVarInfo
@@ -501,9 +495,9 @@ instance Outputable LBVarInfo where
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Bulk operations on IdInfo}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -519,14 +513,14 @@ zapLamInfo info@(IdInfo {occInfo = occ, demandInfo = demand})
   | otherwise
   = Just (info {occInfo = safe_occ, demandInfo = topDmd})
   where
-	-- The "unsafe" occ info is the ones that say I'm not in a lambda
-	-- because that might not be true for an unsaturated lambda
+        -- The "unsafe" occ info is the ones that say I'm not in a lambda
+        -- because that might not be true for an unsaturated lambda
     is_safe_occ (OneOcc in_lam _ _) = in_lam
-    is_safe_occ _other		    = True
+    is_safe_occ _other              = True
 
     safe_occ = case occ of
-		 OneOcc _ once int_cxt -> OneOcc insideLam once int_cxt
-		 _other	       	       -> occ
+                 OneOcc _ once int_cxt -> OneOcc insideLam once int_cxt
+                 _other                -> occ
 
     is_safe_dmd dmd = not (isStrictDmd dmd)
 \end{code}
@@ -543,15 +537,15 @@ zapFragileInfo :: IdInfo -> Maybe IdInfo
 zapFragileInfo info 
   = Just (info `setSpecInfo` emptySpecInfo
                `setUnfoldingInfo` noUnfolding
-	       `setOccInfo` zapFragileOcc occ)
+               `setOccInfo` zapFragileOcc occ)
   where
     occ = occInfo info
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{TickBoxOp}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs
index 4a0b7d7..a38345e 100644
--- a/compiler/basicTypes/MkId.lhs
+++ b/compiler/basicTypes/MkId.lhs
@@ -12,12 +12,6 @@ have a standard form, namely:
 - primitive operations
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module MkId (
         mkDictFunId, mkDictFunTy, mkDictSelId,
@@ -37,8 +31,8 @@ module MkId (
         voidArgId, nullAddrId, seqId, lazyId, lazyIdKey,
         coercionTokenId, magicSingIId,
 
-	-- Re-export error Ids
-	module PrelRules
+        -- Re-export error Ids
+        module PrelRules
     ) where
 
 #include "HsVersions.h"
@@ -52,7 +46,7 @@ import FamInstEnv
 import Coercion
 import TcType
 import MkCore
-import CoreUtils	( exprType, mkCast )
+import CoreUtils        ( exprType, mkCast )
 import CoreUnfold
 import Literal
 import TyCon
@@ -125,7 +119,7 @@ is right here.
 wiredInIds :: [Id]
 wiredInIds
   =  [lazyId]
-  ++ errorIds		-- Defined in MkCore
+  ++ errorIds           -- Defined in MkCore
   ++ ghcPrimIds
 
 -- These Ids are exported from GHC.Prim
@@ -271,11 +265,11 @@ recover the original type signature from the class op selector.
 
 \begin{code}
 mkDictSelId :: DynFlags
-            -> Bool	     -- True <=> don't include the unfolding
-			     -- Little point on imports without -O, because the
-			     -- dictionary itself won't be visible
- 	    -> Name	     -- Name of one of the *value* selectors 
-	       		     -- (dictionary superclass or method)
+            -> Bool          -- True <=> don't include the unfolding
+                             -- Little point on imports without -O, because the
+                             -- dictionary itself won't be visible
+            -> Name          -- Name of one of the *value* selectors 
+                             -- (dictionary superclass or method)
             -> Class -> Id
 mkDictSelId dflags no_unf name clas
   = mkGlobalId (ClassOpId clas) name sel_ty info
@@ -291,29 +285,29 @@ mkDictSelId dflags no_unf name clas
                 `setArityInfo`         1
                 `setStrictnessInfo`    strict_sig
                 `setUnfoldingInfo`     (if no_unf then noUnfolding
-	                                else mkImplicitUnfolding dflags rhs)
-		   -- In module where class op is defined, we must add
-		   -- the unfolding, even though it'll never be inlined
-		   -- because we use that to generate a top-level binding
-		   -- for the ClassOp
+                                        else mkImplicitUnfolding dflags rhs)
+                   -- In module where class op is defined, we must add
+                   -- the unfolding, even though it'll never be inlined
+                   -- because we use that to generate a top-level binding
+                   -- for the ClassOp
 
     info | new_tycon = base_info `setInlinePragInfo` alwaysInlinePragma
-    	   	   -- See Note [Single-method classes] in TcInstDcls
-		   -- for why alwaysInlinePragma
+                   -- See Note [Single-method classes] in TcInstDcls
+                   -- for why alwaysInlinePragma
          | otherwise = base_info  `setSpecInfo`       mkSpecInfo [rule]
-		       		  `setInlinePragInfo` neverInlinePragma
-		   -- Add a magic BuiltinRule, and never inline it
-		   -- so that the rule is always available to fire.
-		   -- See Note [ClassOp/DFun selection] in TcInstDcls
+                                  `setInlinePragInfo` neverInlinePragma
+                   -- Add a magic BuiltinRule, and never inline it
+                   -- so that the rule is always available to fire.
+                   -- See Note [ClassOp/DFun selection] in TcInstDcls
 
     n_ty_args = length tyvars
 
     -- This is the built-in rule that goes
-    -- 	    op (dfT d1 d2) --->  opT d1 d2
+    --      op (dfT d1 d2) --->  opT d1 d2
     rule = BuiltinRule { ru_name = fsLit "Class op " `appendFS` 
-    	   	       	 	     occNameFS (getOccName name)
+                                     occNameFS (getOccName name)
                        , ru_fn    = name
-    	               , ru_nargs = n_ty_args + 1
+                       , ru_nargs = n_ty_args + 1
                        , ru_try   = dictSelRule val_index n_ty_args }
 
         -- The strictness signature is of the form U(AAAVAAAA) -> T
@@ -327,27 +321,27 @@ mkDictSelId dflags no_unf name clas
                           mkProdDmd [ if the_arg_id == id then evalDmd else absDmd
                                     | id <- arg_ids ]
 
-    tycon      	   = classTyCon clas
-    new_tycon  	   = isNewTyCon tycon
-    [data_con] 	   = tyConDataCons tycon
-    tyvars     	   = dataConUnivTyVars data_con
-    arg_tys    	   = dataConRepArgTys data_con	-- Includes the dictionary superclasses
+    tycon          = classTyCon clas
+    new_tycon      = isNewTyCon tycon
+    [data_con]     = tyConDataCons tycon
+    tyvars         = dataConUnivTyVars data_con
+    arg_tys        = dataConRepArgTys data_con  -- Includes the dictionary superclasses
 
     -- 'index' is a 0-index into the *value* arguments of the dictionary
     val_index      = assoc "MkId.mkDictSelId" sel_index_prs name
     sel_index_prs  = map idName (classAllSelIds clas) `zip` [0..]
 
     the_arg_id     = getNth arg_ids val_index
-    pred       	   = mkClassPred clas (mkTyVarTys tyvars)
-    dict_id    	   = mkTemplateLocal 1 pred
-    arg_ids    	   = mkTemplateLocalsNum 2 arg_tys
+    pred           = mkClassPred clas (mkTyVarTys tyvars)
+    dict_id        = mkTemplateLocal 1 pred
+    arg_ids        = mkTemplateLocalsNum 2 arg_tys
 
     rhs = mkLams tyvars  (Lam dict_id   rhs_body)
     rhs_body | new_tycon = unwrapNewTypeBody tycon (map mkTyVarTy tyvars) (Var dict_id)
              | otherwise = Case (Var dict_id) dict_id (idType the_arg_id)
                                 [(DataAlt data_con, arg_ids, varToCoreExpr the_arg_id)]
-				-- varToCoreExpr needed for equality superclass selectors
-				--   sel a b d = case x of { MkC _ (g:a~b) _ -> CO g }
+                                -- varToCoreExpr needed for equality superclass selectors
+                                --   sel a b d = case x of { MkC _ (g:a~b) _ -> CO g }
 
 dictSelRule :: Int -> Arity -> RuleFun
 -- Tries to persuade the argument to look like a constructor
@@ -420,7 +414,7 @@ mkDataConWorkId wkr_name data_con
     id_arg1      = mkTemplateLocal 1 (head nt_arg_tys)
     newtype_unf  = ASSERT2( isVanillaDataCon data_con &&
                             isSingleton nt_arg_tys, ppr data_con  )
-			      -- Note [Newtype datacons]
+                              -- Note [Newtype datacons]
                    mkCompulsoryUnfolding $ 
                    mkLams nt_tvs $ Lam id_arg1 $ 
                    wrapNewTypeBody tycon res_ty_args (Var id_arg1)
@@ -485,34 +479,34 @@ mkDataConRep dflags fam_envs wrap_name data_con
 
        ; let wrap_id = mkGlobalId (DataConWrapId data_con) wrap_name wrap_ty wrap_info
              wrap_info = noCafIdInfo
-                    	 `setArityInfo`         wrap_arity
-                    	     -- It's important to specify the arity, so that partial
-                    	     -- applications are treated as values
-		    	 `setInlinePragInfo`    alwaysInlinePragma
-                    	 `setUnfoldingInfo`     wrap_unf
-                    	 `setStrictnessInfo`    wrap_sig
-                    	     -- We need to get the CAF info right here because TidyPgm
-                    	     -- does not tidy the IdInfo of implicit bindings (like the wrapper)
-                    	     -- so it not make sure that the CAF info is sane
-
-    	     wrap_sig = mkStrictSig (mkTopDmdType wrap_arg_dmds (dataConCPR data_con))
-    	     wrap_arg_dmds = map mk_dmd (dropList eq_spec wrap_bangs)
-    	     mk_dmd str | isBanged str = evalDmd
-    	                | otherwise    = topDmd
-    	         -- The Cpr info can be important inside INLINE rhss, where the
-    	         -- wrapper constructor isn't inlined.
-    	         -- And the argument strictness can be important too; we
-    	         -- may not inline a contructor when it is partially applied.
-    	         -- For example:
-    	         --      data W = C !Int !Int !Int
-    	         --      ...(let w = C x in ...(w p q)...)...
-    	         -- we want to see that w is strict in its two arguments
-
-    	     wrap_unf = mkInlineUnfolding (Just wrap_arity) wrap_rhs
+                         `setArityInfo`         wrap_arity
+                             -- It's important to specify the arity, so that partial
+                             -- applications are treated as values
+                         `setInlinePragInfo`    alwaysInlinePragma
+                         `setUnfoldingInfo`     wrap_unf
+                         `setStrictnessInfo`    wrap_sig
+                             -- We need to get the CAF info right here because TidyPgm
+                             -- does not tidy the IdInfo of implicit bindings (like the wrapper)
+                             -- so it not make sure that the CAF info is sane
+
+             wrap_sig = mkStrictSig (mkTopDmdType wrap_arg_dmds (dataConCPR data_con))
+             wrap_arg_dmds = map mk_dmd (dropList eq_spec wrap_bangs)
+             mk_dmd str | isBanged str = evalDmd
+                        | otherwise    = topDmd
+                 -- The Cpr info can be important inside INLINE rhss, where the
+                 -- wrapper constructor isn't inlined.
+                 -- And the argument strictness can be important too; we
+                 -- may not inline a contructor when it is partially applied.
+                 -- For example:
+                 --      data W = C !Int !Int !Int
+                 --      ...(let w = C x in ...(w p q)...)...
+                 -- we want to see that w is strict in its two arguments
+
+             wrap_unf = mkInlineUnfolding (Just wrap_arity) wrap_rhs
              wrap_tvs = (univ_tvs `minusList` map fst eq_spec) ++ ex_tvs
-    	     wrap_rhs = mkLams wrap_tvs $ 
-    	                mkLams wrap_args $
-    	                wrapFamInstBody tycon res_ty_args $
+             wrap_rhs = mkLams wrap_tvs $ 
+                        mkLams wrap_args $
+                        wrapFamInstBody tycon res_ty_args $
                         wrap_body
 
        ; return (DCR { dcr_wrap_id = wrap_id
@@ -532,9 +526,9 @@ mkDataConRep dflags fam_envs wrap_name data_con
 
     wrap_arg_tys = theta ++ orig_arg_tys
     wrap_arity   = length wrap_arg_tys
-    	     -- The wrap_args are the arguments *other than* the eq_spec
-    	     -- Because we are going to apply the eq_spec args manually in the
-    	     -- wrapper
+             -- The wrap_args are the arguments *other than* the eq_spec
+             -- Because we are going to apply the eq_spec args manually in the
+             -- wrapper
 
     (wrap_bangs, rep_tys_w_strs, wrappers)
        = unzip3 (zipWith (dataConArgRep dflags fam_envs) all_arg_tys orig_bangs)
@@ -548,10 +542,10 @@ mkDataConRep dflags fam_envs wrap_name data_con
 
     initial_wrap_app = Var (dataConWorkId data_con)
                       `mkTyApps`  res_ty_args
-    	              `mkVarApps` ex_tvs                 
-    	              `mkCoApps`  map (mkReflCo Nominal . snd) eq_spec
-    	                -- Dont box the eq_spec coercions since they are
-    	                -- marked as HsUnpack by mk_dict_strict_mark
+                      `mkVarApps` ex_tvs                 
+                      `mkCoApps`  map (mkReflCo Nominal . snd) eq_spec
+                        -- Dont box the eq_spec coercions since they are
+                        -- marked as HsUnpack by mk_dict_strict_mark
 
     mk_boxer :: [Boxer] -> DataConBoxer
     mk_boxer boxers = DCB (\ ty_args src_vars -> 
@@ -771,22 +765,22 @@ The representation arguments of MkR are the *representation* arguments
 of S (plus Int); the rep args of MkS are Int#.  This is all fine.
 
 But be careful not to try to unbox this!
-	data T = MkT {-# UNPACK #-} !T Int
+        data T = MkT {-# UNPACK #-} !T Int
 Because then we'd get an infinite number of arguments.
 
 Here is a more complicated case:
-	data S = MkS {-# UNPACK #-} !T Int
-	data T = MkT {-# UNPACK #-} !S Int
+        data S = MkS {-# UNPACK #-} !T Int
+        data T = MkT {-# UNPACK #-} !S Int
 Each of S and T must decide independendently whether to unpack
 and they had better not both say yes. So they must both say no.
 
 Also behave conservatively when there is no UNPACK pragma
-	data T = MkS !T Int
+        data T = MkS !T Int
 with -funbox-strict-fields or -funbox-small-strict-fields
 we need to behave as if there was an UNPACK pragma there.
 
 But it's the *argument* type that matters. This is fine:
-	data S = MkS S !Int
+        data S = MkS S !Int
 because Int is non-recursive.
 
 
@@ -803,7 +797,7 @@ space for each equality predicate, so it's pretty important!
 \begin{code}
 mk_pred_strict_mark :: PredType -> HsBang
 mk_pred_strict_mark pred 
-  | isEqPred pred = HsUnpack Nothing	-- Note [Unpack equality predicates]
+  | isEqPred pred = HsUnpack Nothing    -- Note [Unpack equality predicates]
   | otherwise     = HsNoBang
 \end{code}
 
@@ -1091,7 +1085,7 @@ nullAddrId = pcMiscPrelId nullAddrName addrPrimTy info
                        `setUnfoldingInfo`  mkCompulsoryUnfolding (Lit nullAddrLit)
 
 ------------------------------------------------
-seqId :: Id	-- See Note [seqId magic]
+seqId :: Id     -- See Note [seqId magic]
 seqId = pcMiscPrelId seqName ty info
   where
     info = noCafIdInfo `setInlinePragInfo` alwaysInlinePragma
@@ -1121,7 +1115,7 @@ match_seq_of_cast _ _ _ [Type _, Type res_ty, Cast scrut co, expr]
 match_seq_of_cast _ _ _ _ = Nothing
 
 ------------------------------------------------
-lazyId :: Id	-- See Note [lazyId magic]
+lazyId :: Id    -- See Note [lazyId magic]
 lazyId = pcMiscPrelId lazyIdName ty info
   where
     info = noCafIdInfo
@@ -1149,7 +1143,7 @@ coerceId = pcMiscPrelId coerceName ty info
     [eqR,x,eq] = mkTemplateLocals [eqRTy, alphaTy,eqRPrimTy]
     rhs = mkLams [alphaTyVar,betaTyVar,eqR,x] $
           mkWildCase (Var eqR) eqRTy betaTy $
-	  [(DataAlt coercibleDataCon, [eq], Cast (Var x) (CoVarCo eq))]
+          [(DataAlt coercibleDataCon, [eq], Cast (Var x) (CoVarCo eq))]
 \end{code}
 
 Note [Unsafe coerce magic]
@@ -1307,7 +1301,7 @@ voidArgId :: Id
 voidArgId       -- :: State# RealWorld
   = mkSysLocal (fsLit "void") voidArgIdKey realWorldStatePrimTy
 
-coercionTokenId :: Id 	      -- :: () ~ ()
+coercionTokenId :: Id         -- :: () ~ ()
 coercionTokenId -- Used to replace Coercion terms when we go to STG
   = pcMiscPrelId coercionTokenName 
                  (mkTyConApp eqPrimTyCon [liftedTypeKind, unitTy, unitTy])
diff --git a/compiler/basicTypes/NameEnv.lhs b/compiler/basicTypes/NameEnv.lhs
index 79433ca..3d0d735 100644
--- a/compiler/basicTypes/NameEnv.lhs
+++ b/compiler/basicTypes/NameEnv.lhs
@@ -5,26 +5,20 @@
 \section[NameEnv]{@NameEnv@: name environments}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module NameEnv (
-	-- * Var, Id and TyVar environments (maps) 
-	NameEnv, 
-	
-	-- ** Manipulating these environments
-	mkNameEnv,
-	emptyNameEnv, unitNameEnv, nameEnvElts, nameEnvUniqueElts,
-	extendNameEnv_C, extendNameEnv_Acc, extendNameEnv,
+        -- * Var, Id and TyVar environments (maps) 
+        NameEnv, 
+        
+        -- ** Manipulating these environments
+        mkNameEnv,
+        emptyNameEnv, unitNameEnv, nameEnvElts, nameEnvUniqueElts,
+        extendNameEnv_C, extendNameEnv_Acc, extendNameEnv,
         extendNameEnvList, extendNameEnvList_C,
-	foldNameEnv, filterNameEnv,
-	plusNameEnv, plusNameEnv_C, alterNameEnv,
-	lookupNameEnv, lookupNameEnv_NF, delFromNameEnv, delListFromNameEnv,
-	elemNameEnv, mapNameEnv,
+        foldNameEnv, filterNameEnv,
+        plusNameEnv, plusNameEnv_C, alterNameEnv,
+        lookupNameEnv, lookupNameEnv_NF, delFromNameEnv, delListFromNameEnv,
+        elemNameEnv, mapNameEnv,
 
         -- ** Dependency analysis
         depAnal
@@ -40,9 +34,9 @@ import Maybes
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Name environment}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -66,50 +60,50 @@ depAnal get_defs get_uses nodes
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Name environment}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-type NameEnv a = UniqFM a	-- Domain is Name
+type NameEnv a = UniqFM a       -- Domain is Name
 
-emptyNameEnv   	   :: NameEnv a
-mkNameEnv	   :: [(Name,a)] -> NameEnv a
-nameEnvElts    	   :: NameEnv a -> [a]
+emptyNameEnv       :: NameEnv a
+mkNameEnv          :: [(Name,a)] -> NameEnv a
+nameEnvElts        :: NameEnv a -> [a]
 nameEnvUniqueElts  :: NameEnv a -> [(Unique, a)]
 alterNameEnv       :: (Maybe a-> Maybe a) -> NameEnv a -> Name -> NameEnv a
 extendNameEnv_C    :: (a->a->a) -> NameEnv a -> Name -> a -> NameEnv a
 extendNameEnv_Acc  :: (a->b->b) -> (a->b) -> NameEnv b -> Name -> a -> NameEnv b
-extendNameEnv  	   :: NameEnv a -> Name -> a -> NameEnv a
-plusNameEnv    	   :: NameEnv a -> NameEnv a -> NameEnv a
-plusNameEnv_C  	   :: (a->a->a) -> NameEnv a -> NameEnv a -> NameEnv a
+extendNameEnv      :: NameEnv a -> Name -> a -> NameEnv a
+plusNameEnv        :: NameEnv a -> NameEnv a -> NameEnv a
+plusNameEnv_C      :: (a->a->a) -> NameEnv a -> NameEnv a -> NameEnv a
 extendNameEnvList  :: NameEnv a -> [(Name,a)] -> NameEnv a
 extendNameEnvList_C :: (a->a->a) -> NameEnv a -> [(Name,a)] -> NameEnv a
-delFromNameEnv 	   :: NameEnv a -> Name -> NameEnv a
+delFromNameEnv     :: NameEnv a -> Name -> NameEnv a
 delListFromNameEnv :: NameEnv a -> [Name] -> NameEnv a
-elemNameEnv    	   :: Name -> NameEnv a -> Bool
-unitNameEnv    	   :: Name -> a -> NameEnv a
-lookupNameEnv  	   :: NameEnv a -> Name -> Maybe a
+elemNameEnv        :: Name -> NameEnv a -> Bool
+unitNameEnv        :: Name -> a -> NameEnv a
+lookupNameEnv      :: NameEnv a -> Name -> Maybe a
 lookupNameEnv_NF   :: NameEnv a -> Name -> a
-foldNameEnv	   :: (a -> b -> b) -> b -> NameEnv a -> b
-filterNameEnv	   :: (elt -> Bool) -> NameEnv elt -> NameEnv elt
-mapNameEnv	   :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2
+foldNameEnv        :: (a -> b -> b) -> b -> NameEnv a -> b
+filterNameEnv      :: (elt -> Bool) -> NameEnv elt -> NameEnv elt
+mapNameEnv         :: (elt1 -> elt2) -> NameEnv elt1 -> NameEnv elt2
 
 nameEnvElts x         = eltsUFM x
-emptyNameEnv  	      = emptyUFM
+emptyNameEnv          = emptyUFM
 unitNameEnv x y       = unitUFM x y 
 extendNameEnv x y z   = addToUFM x y z
 extendNameEnvList x l = addListToUFM x l
 lookupNameEnv x y     = lookupUFM x y
 alterNameEnv          = alterUFM
 mkNameEnv     l       = listToUFM l
-elemNameEnv x y 	 = elemUFM x y
-foldNameEnv a b c	 = foldUFM a b c 
-plusNameEnv x y		 = plusUFM x y 
-plusNameEnv_C f x y	 = plusUFM_C f x y 
+elemNameEnv x y          = elemUFM x y
+foldNameEnv a b c        = foldUFM a b c 
+plusNameEnv x y          = plusUFM x y 
+plusNameEnv_C f x y      = plusUFM_C f x y 
 extendNameEnv_C f x y z  = addToUFM_C f x y z
-mapNameEnv f x         	 = mapUFM f x
+mapNameEnv f x           = mapUFM f x
 nameEnvUniqueElts x      = ufmToList x
 extendNameEnv_Acc x y z a b  = addToUFM_Acc x y z a b
 extendNameEnvList_C x y z = addListToUFM_C x y z
diff --git a/compiler/basicTypes/NameSet.lhs b/compiler/basicTypes/NameSet.lhs
index f65fe8b..18a5906 100644
--- a/compiler/basicTypes/NameSet.lhs
+++ b/compiler/basicTypes/NameSet.lhs
@@ -4,36 +4,30 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module NameSet (
-	-- * Names set type
-	NameSet,
-	
-	-- ** Manipulating these sets
-	emptyNameSet, unitNameSet, mkNameSet, unionNameSets, unionManyNameSets,
-	minusNameSet, elemNameSet, nameSetToList, addOneToNameSet, addListToNameSet, 
-	delFromNameSet, delListFromNameSet, isEmptyNameSet, foldNameSet, filterNameSet,
-	intersectsNameSet, intersectNameSet,
-	
-	-- * Free variables
-	FreeVars,
-	
-	-- ** Manipulating sets of free variables
-	isEmptyFVs, emptyFVs, plusFVs, plusFV, 
-	mkFVs, addOneFV, unitFV, delFV, delFVs,
-
-	-- * Defs and uses
-	Defs, Uses, DefUse, DefUses,
-	
-	-- ** Manipulating defs and uses
-	emptyDUs, usesOnly, mkDUs, plusDU, 
-	findUses, duDefs, duUses, allUses
+        -- * Names set type
+        NameSet,
+        
+        -- ** Manipulating these sets
+        emptyNameSet, unitNameSet, mkNameSet, unionNameSets, unionManyNameSets,
+        minusNameSet, elemNameSet, nameSetToList, addOneToNameSet, addListToNameSet, 
+        delFromNameSet, delListFromNameSet, isEmptyNameSet, foldNameSet, filterNameSet,
+        intersectsNameSet, intersectNameSet,
+        
+        -- * Free variables
+        FreeVars,
+        
+        -- ** Manipulating sets of free variables
+        isEmptyFVs, emptyFVs, plusFVs, plusFV, 
+        mkFVs, addOneFV, unitFV, delFV, delFVs,
+
+        -- * Defs and uses
+        Defs, Uses, DefUse, DefUses,
+        
+        -- ** Manipulating defs and uses
+        emptyDUs, usesOnly, mkDUs, plusDU, 
+        findUses, duDefs, duUses, allUses
     ) where
 
 #include "HsVersions.h"
@@ -44,48 +38,48 @@ import UniqSet
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[Sets of names}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 type NameSet = UniqSet Name
 
 emptyNameSet       :: NameSet
-unitNameSet	   :: Name -> NameSet
+unitNameSet        :: Name -> NameSet
 addListToNameSet   :: NameSet -> [Name] -> NameSet
 addOneToNameSet    :: NameSet -> Name -> NameSet
 mkNameSet          :: [Name] -> NameSet
-unionNameSets	   :: NameSet -> NameSet -> NameSet
+unionNameSets      :: NameSet -> NameSet -> NameSet
 unionManyNameSets  :: [NameSet] -> NameSet
-minusNameSet 	   :: NameSet -> NameSet -> NameSet
-elemNameSet	   :: Name -> NameSet -> Bool
-nameSetToList	   :: NameSet -> [Name]
-isEmptyNameSet	   :: NameSet -> Bool
-delFromNameSet	   :: NameSet -> Name -> NameSet
+minusNameSet       :: NameSet -> NameSet -> NameSet
+elemNameSet        :: Name -> NameSet -> Bool
+nameSetToList      :: NameSet -> [Name]
+isEmptyNameSet     :: NameSet -> Bool
+delFromNameSet     :: NameSet -> Name -> NameSet
 delListFromNameSet :: NameSet -> [Name] -> NameSet
-foldNameSet	   :: (Name -> b -> b) -> b -> NameSet -> b
-filterNameSet	   :: (Name -> Bool) -> NameSet -> NameSet
+foldNameSet        :: (Name -> b -> b) -> b -> NameSet -> b
+filterNameSet      :: (Name -> Bool) -> NameSet -> NameSet
 intersectNameSet   :: NameSet -> NameSet -> NameSet
 intersectsNameSet  :: NameSet -> NameSet -> Bool
 -- ^ True if there is a non-empty intersection.
 -- @s1 `intersectsNameSet` s2@ doesn't compute @s2@ if @s1@ is empty
 
 isEmptyNameSet    = isEmptyUniqSet
-emptyNameSet	  = emptyUniqSet
-unitNameSet	  = unitUniqSet
+emptyNameSet      = emptyUniqSet
+unitNameSet       = unitUniqSet
 mkNameSet         = mkUniqSet
 addListToNameSet  = addListToUniqSet
-addOneToNameSet	  = addOneToUniqSet
+addOneToNameSet   = addOneToUniqSet
 unionNameSets     = unionUniqSets
 unionManyNameSets = unionManyUniqSets
-minusNameSet	  = minusUniqSet
+minusNameSet      = minusUniqSet
 elemNameSet       = elementOfUniqSet
 nameSetToList     = uniqSetToList
 delFromNameSet    = delOneFromUniqSet
-foldNameSet	  = foldUniqSet
-filterNameSet	  = filterUniqSet
+foldNameSet       = foldUniqSet
+filterNameSet     = filterUniqSet
 intersectNameSet  = intersectUniqSets
 
 delListFromNameSet set ns = foldl delFromNameSet set ns
@@ -95,22 +89,22 @@ intersectsNameSet s1 s2 = not (isEmptyNameSet (s1 `intersectNameSet` s2))
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Free variables}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 These synonyms are useful when we are thinking of free variables
 
 \begin{code}
-type FreeVars	= NameSet
+type FreeVars   = NameSet
 
 plusFV   :: FreeVars -> FreeVars -> FreeVars
 addOneFV :: FreeVars -> Name -> FreeVars
 unitFV   :: Name -> FreeVars
 emptyFVs :: FreeVars
 plusFVs  :: [FreeVars] -> FreeVars
-mkFVs	 :: [Name] -> FreeVars
+mkFVs    :: [Name] -> FreeVars
 delFV    :: Name -> FreeVars -> FreeVars
 delFVs   :: [Name] -> FreeVars -> FreeVars
 
@@ -119,7 +113,7 @@ isEmptyFVs  = isEmptyNameSet
 emptyFVs    = emptyNameSet
 plusFVs     = unionManyNameSets
 plusFV      = unionNameSets
-mkFVs	    = mkNameSet
+mkFVs       = mkNameSet
 addOneFV    = addOneToNameSet
 unitFV      = unitNameSet
 delFV n s   = delFromNameSet s n
@@ -128,9 +122,9 @@ delFVs ns s = delListFromNameSet s ns
 
 
 %************************************************************************
-%*									*
-		Defs and uses
-%*									*
+%*                                                                      *
+                Defs and uses
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -145,8 +139,8 @@ type Uses = NameSet
 --                      Also, @us@ may mention @ds@.
 --
 -- @Nothing =>@ Nothing is defined in this group, but
--- 	        nevertheless all the uses are essential.
---	        Used for instance declarations, for example
+--              nevertheless all the uses are essential.
+--              Used for instance declarations, for example
 type DefUse  = (Maybe Defs, Uses)
 
 -- | A number of 'DefUse's in dependency order: earlier 'Defs' scope over later 'Uses'
@@ -184,7 +178,7 @@ duUses dus = foldr get emptyNameSet dus
   where
     get (Nothing,   rhs_uses) uses = rhs_uses `unionNameSets` uses
     get (Just defs, rhs_uses) uses = (rhs_uses `unionNameSets` uses)
-				     `minusNameSet` defs
+                                     `minusNameSet` defs
 
 findUses :: DefUses -> Uses -> Uses
 -- ^ Given some 'DefUses' and some 'Uses', find all the uses, transitively.
@@ -194,13 +188,13 @@ findUses dus uses
   = foldr get uses dus
   where
     get (Nothing, rhs_uses) uses
-	= rhs_uses `unionNameSets` uses
+        = rhs_uses `unionNameSets` uses
     get (Just defs, rhs_uses) uses
-	| defs `intersectsNameSet` uses 	-- Used
-	|| any (startsWithUnderscore . nameOccName) (nameSetToList defs)
-		-- At least one starts with an "_", 
-		-- so treat the group as used
-	= rhs_uses `unionNameSets` uses
-	| otherwise	-- No def is used
-	= uses
+        | defs `intersectsNameSet` uses         -- Used
+        || any (startsWithUnderscore . nameOccName) (nameSetToList defs)
+                -- At least one starts with an "_", 
+                -- so treat the group as used
+        = rhs_uses `unionNameSets` uses
+        | otherwise     -- No def is used
+        = uses
 \end{code}
diff --git a/compiler/basicTypes/OccName.lhs b/compiler/basicTypes/OccName.lhs
index 9ec57d4..447b5ae 100644
--- a/compiler/basicTypes/OccName.lhs
+++ b/compiler/basicTypes/OccName.lhs
@@ -20,89 +20,83 @@
 --
 -- * 'Var.Var': see "Var#name_types"
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module OccName (
-	-- * The 'NameSpace' type
-	NameSpace, -- Abstract
-	
-	-- ** Construction
-	-- $real_vs_source_data_constructors
-	tcName, clsName, tcClsName, dataName, varName, 
-	tvName, srcDataName,
-
-	-- ** Pretty Printing
-	pprNameSpace, pprNonVarNameSpace, pprNameSpaceBrief,
-
-	-- * The 'OccName' type
-	OccName, 	-- Abstract, instance of Outputable
-	pprOccName, 
-
-	-- ** Construction	
-	mkOccName, mkOccNameFS, 
-	mkVarOcc, mkVarOccFS,
-	mkDataOcc, mkDataOccFS,
-	mkTyVarOcc, mkTyVarOccFS,
-	mkTcOcc, mkTcOccFS,
-	mkClsOcc, mkClsOccFS,
+        -- * The 'NameSpace' type
+        NameSpace, -- Abstract
+        
+        -- ** Construction
+        -- $real_vs_source_data_constructors
+        tcName, clsName, tcClsName, dataName, varName, 
+        tvName, srcDataName,
+
+        -- ** Pretty Printing
+        pprNameSpace, pprNonVarNameSpace, pprNameSpaceBrief,
+
+        -- * The 'OccName' type
+        OccName,        -- Abstract, instance of Outputable
+        pprOccName, 
+
+        -- ** Construction      
+        mkOccName, mkOccNameFS, 
+        mkVarOcc, mkVarOccFS,
+        mkDataOcc, mkDataOccFS,
+        mkTyVarOcc, mkTyVarOccFS,
+        mkTcOcc, mkTcOccFS,
+        mkClsOcc, mkClsOccFS,
         mkDFunOcc,
-	mkTupleOcc, 
-	setOccNameSpace,
+        mkTupleOcc, 
+        setOccNameSpace,
         demoteOccName,
         HasOccName(..),
 
-	-- ** Derived 'OccName's
+        -- ** Derived 'OccName's
         isDerivedOccName,
-	mkDataConWrapperOcc, mkWorkerOcc, mkDefaultMethodOcc, 
+        mkDataConWrapperOcc, mkWorkerOcc, mkDefaultMethodOcc, 
         mkGenDefMethodOcc, 
-	mkDerivedTyConOcc, mkNewTyCoOcc, mkClassOpAuxOcc,
+        mkDerivedTyConOcc, mkNewTyCoOcc, mkClassOpAuxOcc,
         mkCon2TagOcc, mkTag2ConOcc, mkMaxTagOcc,
-  	mkClassDataConOcc, mkDictOcc, mkIPOcc, 
- 	mkSpecOcc, mkForeignExportOcc, mkGenOcc1, mkGenOcc2,
- 	mkGenD, mkGenR, mkGen1R, mkGenRCo, mkGenC, mkGenS,
+        mkClassDataConOcc, mkDictOcc, mkIPOcc, 
+        mkSpecOcc, mkForeignExportOcc, mkGenOcc1, mkGenOcc2,
+        mkGenD, mkGenR, mkGen1R, mkGenRCo, mkGenC, mkGenS,
         mkDataTOcc, mkDataCOcc, mkDataConWorkerOcc,
-	mkSuperDictSelOcc, mkLocalOcc, mkMethodOcc, mkInstTyTcOcc,
-	mkInstTyCoOcc, mkEqPredCoOcc,
+        mkSuperDictSelOcc, mkLocalOcc, mkMethodOcc, mkInstTyTcOcc,
+        mkInstTyCoOcc, mkEqPredCoOcc,
         mkVectOcc, mkVectTyConOcc, mkVectDataConOcc, mkVectIsoOcc,
         mkPDataTyConOcc,  mkPDataDataConOcc,
-	mkPDatasTyConOcc, mkPDatasDataConOcc,
+        mkPDatasTyConOcc, mkPDatasDataConOcc,
         mkPReprTyConOcc, 
         mkPADFunOcc,
 
-	-- ** Deconstruction
-	occNameFS, occNameString, occNameSpace, 
+        -- ** Deconstruction
+        occNameFS, occNameString, occNameSpace, 
 
-	isVarOcc, isTvOcc, isTcOcc, isDataOcc, isDataSymOcc, isSymOcc, isValOcc,
-	parenSymOcc, startsWithUnderscore, 
-	
-	isTcClsNameSpace, isTvNameSpace, isDataConNameSpace, isVarNameSpace, isValNameSpace,
+        isVarOcc, isTvOcc, isTcOcc, isDataOcc, isDataSymOcc, isSymOcc, isValOcc,
+        parenSymOcc, startsWithUnderscore, 
+        
+        isTcClsNameSpace, isTvNameSpace, isDataConNameSpace, isVarNameSpace, isValNameSpace,
 
-	isTupleOcc_maybe,
+        isTupleOcc_maybe,
 
-	-- * The 'OccEnv' type
-	OccEnv, emptyOccEnv, unitOccEnv, extendOccEnv, mapOccEnv,
-	lookupOccEnv, mkOccEnv, mkOccEnv_C, extendOccEnvList, elemOccEnv,
-	occEnvElts, foldOccEnv, plusOccEnv, plusOccEnv_C, extendOccEnv_C,
+        -- * The 'OccEnv' type
+        OccEnv, emptyOccEnv, unitOccEnv, extendOccEnv, mapOccEnv,
+        lookupOccEnv, mkOccEnv, mkOccEnv_C, extendOccEnvList, elemOccEnv,
+        occEnvElts, foldOccEnv, plusOccEnv, plusOccEnv_C, extendOccEnv_C,
         extendOccEnv_Acc, filterOccEnv, delListFromOccEnv, delFromOccEnv,
 
-	-- * The 'OccSet' type
-	OccSet, emptyOccSet, unitOccSet, mkOccSet, extendOccSet, 
-	extendOccSetList,
-	unionOccSets, unionManyOccSets, minusOccSet, elemOccSet, occSetElts, 
-	foldOccSet, isEmptyOccSet, intersectOccSet, intersectsOccSet,
+        -- * The 'OccSet' type
+        OccSet, emptyOccSet, unitOccSet, mkOccSet, extendOccSet, 
+        extendOccSetList,
+        unionOccSets, unionManyOccSets, minusOccSet, elemOccSet, occSetElts, 
+        foldOccSet, isEmptyOccSet, intersectOccSet, intersectsOccSet,
                   
-	-- * Tidying up
-	TidyOccEnv, emptyTidyOccEnv, tidyOccName, initTidyOccEnv,
+        -- * Tidying up
+        TidyOccEnv, emptyTidyOccEnv, tidyOccName, initTidyOccEnv,
 
-	-- * Lexical characteristics of Haskell names
-	isLexCon, isLexVar, isLexId, isLexSym,
-	isLexConId, isLexConSym, isLexVarId, isLexVarSym,
-	startsVarSym, startsVarId, startsConSym, startsConId
+        -- * Lexical characteristics of Haskell names
+        isLexCon, isLexVar, isLexId, isLexSym,
+        isLexConId, isLexConSym, isLexVarId, isLexVarSym,
+        startsVarSym, startsVarId, startsConSym, startsConId
     ) where
 
 #include "Typeable.h"
@@ -121,18 +115,18 @@ import Data.Data
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Name space}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-data NameSpace = VarName	-- Variables, including "real" data constructors
-	       | DataName	-- "Source" data constructors 
-	       | TvName		-- Type variables
-	       | TcClsName	-- Type constructors and classes; Haskell has them
-				-- in the same name space for now.
-	       deriving( Eq, Ord )
+data NameSpace = VarName        -- Variables, including "real" data constructors
+               | DataName       -- "Source" data constructors 
+               | TvName         -- Type variables
+               | TcClsName      -- Type constructors and classes; Haskell has them
+                                -- in the same name space for now.
+               deriving( Eq, Ord )
    {-! derive: Binary !-}
 
 -- Note [Data Constructors]  
@@ -141,9 +135,9 @@ data NameSpace = VarName	-- Variables, including "real" data constructors
 -- $real_vs_source_data_constructors
 -- There are two forms of data constructor:
 --
---	[Source data constructors] The data constructors mentioned in Haskell source code
+--      [Source data constructors] The data constructors mentioned in Haskell source code
 --
---	[Real data constructors] The data constructors of the representation type, which may not be the same as the source type
+--      [Real data constructors] The data constructors of the representation type, which may not be the same as the source type
 --
 -- For example:
 --
@@ -160,13 +154,13 @@ tvName, varName            :: NameSpace
 
 -- Though type constructors and classes are in the same name space now,
 -- the NameSpace type is abstract, so we can easily separate them later
-tcName    = TcClsName		-- Type constructors
-clsName   = TcClsName		-- Classes
-tcClsName = TcClsName		-- Not sure which!
+tcName    = TcClsName           -- Type constructors
+clsName   = TcClsName           -- Classes
+tcClsName = TcClsName           -- Not sure which!
 
 dataName    = DataName
-srcDataName = DataName	-- Haskell-source data constructors should be
-			-- in the Data name space
+srcDataName = DataName  -- Haskell-source data constructors should be
+                        -- in the Data name space
 
 tvName      = TvName
 varName     = VarName
@@ -183,7 +177,7 @@ isTvNameSpace :: NameSpace -> Bool
 isTvNameSpace TvName = True
 isTvNameSpace _      = False
 
-isVarNameSpace :: NameSpace -> Bool	-- Variables or type variables, but not constructors
+isVarNameSpace :: NameSpace -> Bool     -- Variables or type variables, but not constructors
 isVarNameSpace TvName  = True
 isVarNameSpace VarName = True
 isVarNameSpace _       = False
@@ -221,9 +215,9 @@ demoteNameSpace TcClsName = Just DataName
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[Name-pieces-datatypes]{The @OccName@ datatypes}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -240,9 +234,9 @@ instance Eq OccName where
     (OccName sp1 s1) == (OccName sp2 s2) = s1 == s2 && sp1 == sp2
 
 instance Ord OccName where
-	-- Compares lexicographically, *not* by Unique of the string
+        -- Compares lexicographically, *not* by Unique of the string
     compare (OccName sp1 s1) (OccName sp2 s2) 
-	= (s1  `compare` s2) `thenCmp` (sp1 `compare` sp2)
+        = (s1  `compare` s2) `thenCmp` (sp1 `compare` sp2)
 
 instance Data OccName where
   -- don't traverse?
@@ -253,9 +247,9 @@ instance Data OccName where
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Printing}
-%*									*
+%*                                                                      *
 %************************************************************************
  
 \begin{code}
@@ -270,14 +264,14 @@ pprOccName (OccName sp occ)
     else pp_occ <> pp_debug sty
   where
     pp_debug sty | debugStyle sty = braces (pprNameSpaceBrief sp)
-	         | otherwise      = empty
+                 | otherwise      = empty
 
     pp_occ = sdocWithDynFlags $ \dflags ->
              if gopt Opt_SuppressUniques dflags
              then text (strip_th_unique (unpackFS occ))
              else ftext occ
 
-	-- See Note [Suppressing uniques in OccNames]
+        -- See Note [Suppressing uniques in OccNames]
     strip_th_unique ('[' : c : _) | isAlphaNum c = []
     strip_th_unique (c : cs) = c : strip_th_unique cs
     strip_th_unique []       = []
@@ -290,9 +284,9 @@ Template Haskell that have been turned into a string in the OccName.
 See Note [Unique OccNames from Template Haskell] in Convert.hs
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Construction}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -347,9 +341,9 @@ class HasOccName name where
 
 
 %************************************************************************
-%*									*
-		Environments
-%*									*
+%*                                                                      *
+                Environments
+%*                                                                      *
 %************************************************************************
 
 OccEnvs are used mainly for the envts in ModIfaces.
@@ -361,7 +355,7 @@ this key is less than 2^24, and indeed FastStrings are allocated keys
 sequentially starting at 0.
 
 So we can make a Unique using
-	mkUnique ns key  :: Unique
+        mkUnique ns key  :: Unique
 where 'ns' is a Char representing the name space.  This in turn makes it
 easy to build an OccEnv.
 
@@ -390,24 +384,24 @@ extendOccEnv_Acc :: (a->b->b) -> (a->b) -> OccEnv b -> OccName -> a -> OccEnv b
 plusOccEnv     :: OccEnv a -> OccEnv a -> OccEnv a
 plusOccEnv_C   :: (a->a->a) -> OccEnv a -> OccEnv a -> OccEnv a
 mapOccEnv      :: (a->b) -> OccEnv a -> OccEnv b
-delFromOccEnv 	   :: OccEnv a -> OccName -> OccEnv a
+delFromOccEnv      :: OccEnv a -> OccName -> OccEnv a
 delListFromOccEnv :: OccEnv a -> [OccName] -> OccEnv a
-filterOccEnv	   :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
+filterOccEnv       :: (elt -> Bool) -> OccEnv elt -> OccEnv elt
 
-emptyOccEnv  	 = A emptyUFM
+emptyOccEnv      = A emptyUFM
 unitOccEnv x y = A $ unitUFM x y 
 extendOccEnv (A x) y z = A $ addToUFM x y z
 extendOccEnvList (A x) l = A $ addListToUFM x l
 lookupOccEnv (A x) y = lookupUFM x y
 mkOccEnv     l    = A $ listToUFM l
-elemOccEnv x (A y) 	 = elemUFM x y
-foldOccEnv a b (A c)	 = foldUFM a b c 
-occEnvElts (A x)	 = eltsUFM x
-plusOccEnv (A x) (A y)	 = A $ plusUFM x y 
-plusOccEnv_C f (A x) (A y)	 = A $ plusUFM_C f x y 
+elemOccEnv x (A y)       = elemUFM x y
+foldOccEnv a b (A c)     = foldUFM a b c 
+occEnvElts (A x)         = eltsUFM x
+plusOccEnv (A x) (A y)   = A $ plusUFM x y 
+plusOccEnv_C f (A x) (A y)       = A $ plusUFM_C f x y 
 extendOccEnv_C f (A x) y z   = A $ addToUFM_C f x y z
 extendOccEnv_Acc f g (A x) y z   = A $ addToUFM_Acc f g x y z
-mapOccEnv f (A x)	 = A $ mapUFM f x
+mapOccEnv f (A x)        = A $ mapUFM f x
 mkOccEnv_C comb l = A $ addListToUFM_C comb emptyUFM l
 delFromOccEnv (A x) y    = A $ delFromUFM x y
 delListFromOccEnv (A x) y  = A $ delListFromUFM x y
@@ -418,32 +412,32 @@ instance Outputable a => Outputable (OccEnv a) where
 
 type OccSet = UniqSet OccName
 
-emptyOccSet	  :: OccSet
-unitOccSet	  :: OccName -> OccSet
+emptyOccSet       :: OccSet
+unitOccSet        :: OccName -> OccSet
 mkOccSet          :: [OccName] -> OccSet
 extendOccSet      :: OccSet -> OccName -> OccSet
 extendOccSetList  :: OccSet -> [OccName] -> OccSet
-unionOccSets	  :: OccSet -> OccSet -> OccSet
+unionOccSets      :: OccSet -> OccSet -> OccSet
 unionManyOccSets  :: [OccSet] -> OccSet
-minusOccSet 	  :: OccSet -> OccSet -> OccSet
-elemOccSet	  :: OccName -> OccSet -> Bool
-occSetElts	  :: OccSet -> [OccName]
-foldOccSet	  :: (OccName -> b -> b) -> b -> OccSet -> b
-isEmptyOccSet	  :: OccSet -> Bool
+minusOccSet       :: OccSet -> OccSet -> OccSet
+elemOccSet        :: OccName -> OccSet -> Bool
+occSetElts        :: OccSet -> [OccName]
+foldOccSet        :: (OccName -> b -> b) -> b -> OccSet -> b
+isEmptyOccSet     :: OccSet -> Bool
 intersectOccSet   :: OccSet -> OccSet -> OccSet
 intersectsOccSet  :: OccSet -> OccSet -> Bool
 
-emptyOccSet	  = emptyUniqSet
-unitOccSet	  = unitUniqSet
+emptyOccSet       = emptyUniqSet
+unitOccSet        = unitUniqSet
 mkOccSet          = mkUniqSet
-extendOccSet	  = addOneToUniqSet
+extendOccSet      = addOneToUniqSet
 extendOccSetList  = addListToUniqSet
 unionOccSets      = unionUniqSets
 unionManyOccSets  = unionManyUniqSets
-minusOccSet	  = minusUniqSet
+minusOccSet       = minusUniqSet
 elemOccSet        = elementOfUniqSet
 occSetElts        = uniqSetToList
-foldOccSet	  = foldUniqSet
+foldOccSet        = foldUniqSet
 isEmptyOccSet     = isEmptyUniqSet
 intersectOccSet   = intersectUniqSets
 intersectsOccSet s1 s2 = not (isEmptyOccSet (s1 `intersectOccSet` s2))
@@ -451,9 +445,9 @@ intersectsOccSet s1 s2 = not (isEmptyOccSet (s1 `intersectOccSet` s2))
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Predicates and taking them apart}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -503,7 +497,7 @@ isSymOcc (OccName TvName s)    = isLexSym s
 parenSymOcc :: OccName -> SDoc -> SDoc
 -- ^ Wrap parens around an operator
 parenSymOcc occ doc | isSymOcc occ = parens doc
-		    | otherwise    = doc
+                    | otherwise    = doc
 \end{code}
 
 
@@ -512,39 +506,39 @@ startsWithUnderscore :: OccName -> Bool
 -- ^ Haskell 98 encourages compilers to suppress warnings about unsed
 -- names in a pattern if they start with @_@: this implements that test
 startsWithUnderscore occ = case occNameString occ of
-			     ('_' : _) -> True
-			     _other    -> False
+                             ('_' : _) -> True
+                             _other    -> False
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Making system names}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Here's our convention for splitting up the interface file name space:
 
-   d...		dictionary identifiers
-   		(local variables, so no name-clash worries)
+   d...         dictionary identifiers
+                (local variables, so no name-clash worries)
 
 All of these other OccNames contain a mixture of alphabetic
 and symbolic characters, and hence cannot possibly clash with
 a user-written type or function name
 
-   $f...	Dict-fun identifiers (from inst decls)
-   $dmop	Default method for 'op'
-   $pnC		n'th superclass selector for class C
-   $wf		Worker for functtoin 'f'
-   $sf..	Specialised version of f
-   T:C		Tycon for dictionary for class C
-   D:C		Data constructor for dictionary for class C
+   $f...        Dict-fun identifiers (from inst decls)
+   $dmop        Default method for 'op'
+   $pnC         n'th superclass selector for class C
+   $wf          Worker for functtoin 'f'
+   $sf..        Specialised version of f
+   T:C          Tycon for dictionary for class C
+   D:C          Data constructor for dictionary for class C
    NTCo:T       Coercion connecting newtype T with its representation type
    TFCo:R       Coercion connecting a data family to its respresentation type R
 
 In encoded form these appear as Zdfxxx etc
 
-	:...		keywords (export:, letrec: etc.)
+        :...            keywords (export:, letrec: etc.)
 --- I THINK THIS IS WRONG!
 
 This knowledge is encoded in the following functions.
@@ -554,9 +548,9 @@ NB: The string must already be encoded!
 
 \begin{code}
 mk_deriv :: NameSpace 
-	 -> String		-- Distinguishes one sort of derived name from another
-	 -> String
-	 -> OccName
+         -> String              -- Distinguishes one sort of derived name from another
+         -> String
+         -> OccName
 
 mk_deriv occ_sp sys_prefix str = mkOccName occ_sp (sys_prefix ++ str)
 
@@ -571,10 +565,10 @@ isDerivedOccName occ =
 \begin{code}
 mkDataConWrapperOcc, mkWorkerOcc, mkDefaultMethodOcc, 
         mkGenDefMethodOcc, mkDerivedTyConOcc, mkClassDataConOcc, mkDictOcc,
- 	mkIPOcc, mkSpecOcc, mkForeignExportOcc, mkGenOcc1, mkGenOcc2,
- 	mkGenD, mkGenR, mkGen1R, mkGenRCo,
-	mkDataTOcc, mkDataCOcc, mkDataConWorkerOcc, mkNewTyCoOcc,
-	mkInstTyCoOcc, mkEqPredCoOcc, mkClassOpAuxOcc,
+        mkIPOcc, mkSpecOcc, mkForeignExportOcc, mkGenOcc1, mkGenOcc2,
+        mkGenD, mkGenR, mkGen1R, mkGenRCo,
+        mkDataTOcc, mkDataCOcc, mkDataConWorkerOcc, mkNewTyCoOcc,
+        mkInstTyCoOcc, mkEqPredCoOcc, mkClassOpAuxOcc,
         mkCon2TagOcc, mkTag2ConOcc, mkMaxTagOcc
    :: OccName -> OccName
 
@@ -584,16 +578,16 @@ mkWorkerOcc         = mk_simple_deriv varName  "$w"
 mkDefaultMethodOcc  = mk_simple_deriv varName  "$dm"
 mkGenDefMethodOcc   = mk_simple_deriv varName  "$gdm"
 mkClassOpAuxOcc     = mk_simple_deriv varName  "$c"
-mkDerivedTyConOcc   = mk_simple_deriv tcName   ":"	-- The : prefix makes sure it classifies as a tycon/datacon
-mkClassDataConOcc   = mk_simple_deriv dataName "D:"	-- We go straight to the "real" data con
-							-- for datacons from classes
-mkDictOcc	    = mk_simple_deriv varName  "$d"
-mkIPOcc		    = mk_simple_deriv varName  "$i"
-mkSpecOcc	    = mk_simple_deriv varName  "$s"
+mkDerivedTyConOcc   = mk_simple_deriv tcName   ":"      -- The : prefix makes sure it classifies as a tycon/datacon
+mkClassDataConOcc   = mk_simple_deriv dataName "D:"     -- We go straight to the "real" data con
+                                                        -- for datacons from classes
+mkDictOcc           = mk_simple_deriv varName  "$d"
+mkIPOcc             = mk_simple_deriv varName  "$i"
+mkSpecOcc           = mk_simple_deriv varName  "$s"
 mkForeignExportOcc  = mk_simple_deriv varName  "$f"
-mkNewTyCoOcc        = mk_simple_deriv tcName   "NTCo:"	-- Coercion for newtypes
+mkNewTyCoOcc        = mk_simple_deriv tcName   "NTCo:"  -- Coercion for newtypes
 mkInstTyCoOcc       = mk_simple_deriv tcName   "TFCo:"   -- Coercion for type functions
-mkEqPredCoOcc	    = mk_simple_deriv tcName   "$co"
+mkEqPredCoOcc       = mk_simple_deriv tcName   "$co"
 
 -- used in derived instances
 mkCon2TagOcc        = mk_simple_deriv varName  "$con2tag_"
@@ -619,8 +613,8 @@ mkGen1R  = mk_simple_deriv tcName "Rep1_"
 mkGenRCo = mk_simple_deriv tcName "CoRep_"
 
 -- data T = MkT ... deriving( Data ) needs definitions for 
---	$tT   :: Data.Generics.Basics.DataType
---	$cMkT :: Data.Generics.Basics.Constr
+--      $tT   :: Data.Generics.Basics.DataType
+--      $cMkT :: Data.Generics.Basics.Constr
 mkDataTOcc = mk_simple_deriv varName  "$t"
 mkDataCOcc = mk_simple_deriv varName  "$c"
 
@@ -655,37 +649,37 @@ mkDataConWorkerOcc datacon_occ = setOccNameSpace varName datacon_occ
 \end{code}
 
 \begin{code}
-mkSuperDictSelOcc :: Int 	-- ^ Index of superclass, e.g. 3
-		  -> OccName 	-- ^ Class, e.g. @Ord@
-		  -> OccName	-- ^ Derived 'Occname', e.g. @$p3Ord@
+mkSuperDictSelOcc :: Int        -- ^ Index of superclass, e.g. 3
+                  -> OccName    -- ^ Class, e.g. @Ord@
+                  -> OccName    -- ^ Derived 'Occname', e.g. @$p3Ord@
 mkSuperDictSelOcc index cls_tc_occ
   = mk_deriv varName "$p" (show index ++ occNameString cls_tc_occ)
 
-mkLocalOcc :: Unique 		-- ^ Unique to combine with the 'OccName'
-	   -> OccName		-- ^ Local name, e.g. @sat@
-	   -> OccName		-- ^ Nice unique version, e.g. @$L23sat@
+mkLocalOcc :: Unique            -- ^ Unique to combine with the 'OccName'
+           -> OccName           -- ^ Local name, e.g. @sat@
+           -> OccName           -- ^ Nice unique version, e.g. @$L23sat@
 mkLocalOcc uniq occ
    = mk_deriv varName ("$L" ++ show uniq) (occNameString occ)
-	-- The Unique might print with characters 
-	-- that need encoding (e.g. 'z'!)
+        -- The Unique might print with characters 
+        -- that need encoding (e.g. 'z'!)
 \end{code}
 
 \begin{code}
 -- | Derive a name for the representation type constructor of a
 -- @data@\/@newtype@ instance.
-mkInstTyTcOcc :: String 		-- ^ Family name, e.g. @Map@
+mkInstTyTcOcc :: String                 -- ^ Family name, e.g. @Map@
               -> OccSet                 -- ^ avoid these Occs
-	      -> OccName		-- ^ @R:Map@
+              -> OccName                -- ^ @R:Map@
 mkInstTyTcOcc str set =
   chooseUniqueOcc tcName ('R' : ':' : str) set
 \end{code}
 
 \begin{code}
-mkDFunOcc :: String		-- ^ Typically the class and type glommed together e.g. @OrdMaybe@.
-				-- Only used in debug mode, for extra clarity
-	  -> Bool		-- ^ Is this a hs-boot instance DFun?
+mkDFunOcc :: String             -- ^ Typically the class and type glommed together e.g. @OrdMaybe@.
+                                -- Only used in debug mode, for extra clarity
+          -> Bool               -- ^ Is this a hs-boot instance DFun?
           -> OccSet             -- ^ avoid these Occs
-	  -> OccName		-- ^ E.g. @$f3OrdMaybe@
+          -> OccName            -- ^ E.g. @$f3OrdMaybe@
 
 -- In hs-boot files we make dict funs like $fx7ClsTy, which get bound to the real
 -- thing when we compile the mother module. Reason: we don't know exactly
@@ -695,7 +689,7 @@ mkDFunOcc info_str is_boot set
   = chooseUniqueOcc VarName (prefix ++ info_str) set
   where
     prefix | is_boot   = "$fx"
-	   | otherwise = "$f"
+           | otherwise = "$f"
 \end{code}
 
 Sometimes we need to pick an OccName that has not already been used,
@@ -724,7 +718,7 @@ because overloaded constructors (blarg) generate methods too.
 And convert to VarName space
 
 e.g. a call to constructor MkFoo where
-	data (Ord a) => Foo a = MkFoo a
+        data (Ord a) => Foo a = MkFoo a
 
 If this is necessary, we do it by prefixing '$m'.  These 
 guys never show up in error messages.  What a hack.
@@ -737,9 +731,9 @@ mkMethodOcc occ                     = mk_simple_deriv varName "$m" occ
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Tidying them up}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Before we print chunks of code we like to rename it so that
@@ -769,13 +763,13 @@ type TidyOccEnv = UniqFM Int
   with "foo".  Otherwise if we tidy twice we get silly names like foo23.
 
 \begin{code}
-type TidyOccEnv = UniqFM Int	-- The in-scope OccNames
+type TidyOccEnv = UniqFM Int    -- The in-scope OccNames
   -- See Note [TidyOccEnv]
 
 emptyTidyOccEnv :: TidyOccEnv
 emptyTidyOccEnv = emptyUFM
 
-initTidyOccEnv :: [OccName] -> TidyOccEnv	-- Initialise with names to avoid!
+initTidyOccEnv :: [OccName] -> TidyOccEnv       -- Initialise with names to avoid!
 initTidyOccEnv = foldl add emptyUFM
   where
     add env (OccName _ fs) = addToUFM env fs 1
@@ -783,8 +777,8 @@ initTidyOccEnv = foldl add emptyUFM
 tidyOccName :: TidyOccEnv -> OccName -> (TidyOccEnv, OccName)
 tidyOccName env occ@(OccName occ_sp fs)
   = case lookupUFM env fs of
-	Just n  -> find n
-	Nothing -> (addToUFM env fs 1, occ)
+        Just n  -> find n
+        Nothing -> (addToUFM env fs 1, occ)
   where
     base :: String  -- Drop trailing digits (see Note [TidyOccEnv])
     base = reverse (dropWhile isDigit (reverse (unpackFS fs)))
@@ -804,20 +798,20 @@ tidyOccName env occ@(OccName occ_sp fs)
 \end{code}
 
 %************************************************************************
-%*									*
-		Stuff for dealing with tuples
-%*									*
+%*                                                                      *
+                Stuff for dealing with tuples
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 mkTupleOcc :: NameSpace -> TupleSort -> Arity -> OccName
 mkTupleOcc ns sort ar = OccName ns (mkFastString str)
   where
- 	-- no need to cache these, the caching is done in the caller
-	-- (TysWiredIn.mk_tuple)
+        -- no need to cache these, the caching is done in the caller
+        -- (TysWiredIn.mk_tuple)
     str = case sort of
-		UnboxedTuple    -> '(' : '#' : commas ++ "#)"
-		BoxedTuple      -> '(' : commas ++ ")"
+                UnboxedTuple    -> '(' : '#' : commas ++ "#)"
+                BoxedTuple      -> '(' : commas ++ ")"
                 ConstraintTuple -> '(' : commas ++ ")"
                   -- Cute hack: reuse the standard tuple OccNames (and hence code)
                   -- for fact tuples, but give them different Uniques so they are not equal.
@@ -844,18 +838,18 @@ isTupleOcc_maybe :: OccName -> Maybe (NameSpace, TupleSort, Arity)
 -- Tuples are special, because there are so many of them!
 isTupleOcc_maybe (OccName ns fs)
   = case unpackFS fs of
-	'(':'#':',':rest     -> Just (ns, UnboxedTuple, 2 + count_commas rest)
-	'(':',':rest         -> Just (ns, BoxedTuple,   2 + count_commas rest)
-	_other               -> Nothing
+        '(':'#':',':rest     -> Just (ns, UnboxedTuple, 2 + count_commas rest)
+        '(':',':rest         -> Just (ns, BoxedTuple,   2 + count_commas rest)
+        _other               -> Nothing
   where
     count_commas (',':rest) = 1 + count_commas rest
     count_commas _          = 0
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Lexical categories}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 These functions test strings to see if they fit the lexical categories
@@ -873,66 +867,66 @@ isLexSym cs = isLexConSym cs || isLexVarSym cs
 
 -------------
 
-isLexConId cs				-- Prefix type or data constructors
-  | nullFS cs	       = False		-- 	e.g. "Foo", "[]", "(,)" 
+isLexConId cs                           -- Prefix type or data constructors
+  | nullFS cs          = False          --      e.g. "Foo", "[]", "(,)" 
   | cs == (fsLit "[]") = True
-  | otherwise	       = startsConId (headFS cs)
+  | otherwise          = startsConId (headFS cs)
 
-isLexVarId cs				-- Ordinary prefix identifiers
-  | nullFS cs	      = False		-- 	e.g. "x", "_x"
+isLexVarId cs                           -- Ordinary prefix identifiers
+  | nullFS cs         = False           --      e.g. "x", "_x"
   | otherwise         = startsVarId (headFS cs)
 
-isLexConSym cs				-- Infix type or data constructors
-  | nullFS cs	       = False		--	e.g. ":-:", ":", "->"
+isLexConSym cs                          -- Infix type or data constructors
+  | nullFS cs          = False          --      e.g. ":-:", ":", "->"
   | cs == (fsLit "->") = True
-  | otherwise	       = startsConSym (headFS cs)
+  | otherwise          = startsConSym (headFS cs)
 
-isLexVarSym cs				-- Infix identifiers
-  | nullFS cs	      = False		-- 	e.g. "+"
+isLexVarSym cs                          -- Infix identifiers
+  | nullFS cs         = False           --      e.g. "+"
   | otherwise         = startsVarSym (headFS cs)
 
 -------------
 startsVarSym, startsVarId, startsConSym, startsConId :: Char -> Bool
 startsVarSym c = isSymbolASCII c || (ord c > 0x7f && isSymbol c) -- Infix Ids
-startsConSym c = c == ':'				-- Infix data constructors
-startsVarId c  = isLower c || c == '_'	-- Ordinary Ids
-startsConId c  = isUpper c || c == '('	-- Ordinary type constructors and data constructors
+startsConSym c = c == ':'                               -- Infix data constructors
+startsVarId c  = isLower c || c == '_'  -- Ordinary Ids
+startsConId c  = isUpper c || c == '('  -- Ordinary type constructors and data constructors
 
 isSymbolASCII :: Char -> Bool
 isSymbolASCII c = c `elem` "!#$%&*+./<=>?@\\^|~-"
 \end{code}
 
 %************************************************************************
-%*									*
-		Binary instance
+%*                                                                      *
+                Binary instance
     Here rather than BinIface because OccName is abstract
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 instance Binary NameSpace where
     put_ bh VarName = do
-	    putByte bh 0
+            putByte bh 0
     put_ bh DataName = do
-	    putByte bh 1
+            putByte bh 1
     put_ bh TvName = do
-	    putByte bh 2
+            putByte bh 2
     put_ bh TcClsName = do
-	    putByte bh 3
+            putByte bh 3
     get bh = do
-	    h <- getByte bh
-	    case h of
-	      0 -> do return VarName
-	      1 -> do return DataName
-	      2 -> do return TvName
-	      _ -> do return TcClsName
+            h <- getByte bh
+            case h of
+              0 -> do return VarName
+              1 -> do return DataName
+              2 -> do return TvName
+              _ -> do return TcClsName
 
 instance Binary OccName where
     put_ bh (OccName aa ab) = do
-	    put_ bh aa
-	    put_ bh ab
+            put_ bh aa
+            put_ bh ab
     get bh = do
-	  aa <- get bh
-	  ab <- get bh
-	  return (OccName aa ab)
+          aa <- get bh
+          ab <- get bh
+          return (OccName aa ab)
 \end{code}
diff --git a/compiler/basicTypes/Var.lhs b/compiler/basicTypes/Var.lhs
index e3dd2df..af62914 100644
--- a/compiler/basicTypes/Var.lhs
+++ b/compiler/basicTypes/Var.lhs
@@ -5,12 +5,6 @@
 \section{@Vars@: Variables}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- |
 -- #name_types#
@@ -42,32 +36,32 @@ module Var (
         Var, CoVar, Id, DictId, DFunId, EvVar, EqVar, EvId, IpId,
         TyVar, TypeVar, KindVar, TKVar,
 
-	-- ** Taking 'Var's apart
-	varName, varUnique, varType, 
+        -- ** Taking 'Var's apart
+        varName, varUnique, varType, 
 
-	-- ** Modifying 'Var's
-	setVarName, setVarUnique, setVarType,
+        -- ** Modifying 'Var's
+        setVarName, setVarUnique, setVarType,
 
-	-- ** Constructing, taking apart, modifying 'Id's
-	mkGlobalVar, mkLocalVar, mkExportedLocalVar, mkCoVar,
-	idInfo, idDetails,
-	lazySetIdInfo, setIdDetails, globaliseId,
-	setIdExported, setIdNotExported,
+        -- ** Constructing, taking apart, modifying 'Id's
+        mkGlobalVar, mkLocalVar, mkExportedLocalVar, mkCoVar,
+        idInfo, idDetails,
+        lazySetIdInfo, setIdDetails, globaliseId,
+        setIdExported, setIdNotExported,
 
         -- ** Predicates
         isId, isTKVar, isTyVar, isTcTyVar,
         isLocalVar, isLocalId,
-	isGlobalId, isExportedId,
-	mustHaveLocalBinding,
+        isGlobalId, isExportedId,
+        mustHaveLocalBinding,
 
-	-- ** Constructing 'TyVar's
-	mkTyVar, mkTcTyVar, mkKindVar,
+        -- ** Constructing 'TyVar's
+        mkTyVar, mkTcTyVar, mkKindVar,
 
-	-- ** Taking 'TyVar's apart
+        -- ** Taking 'TyVar's apart
         tyVarName, tyVarKind, tcTyVarDetails, setTcTyVarDetails,
 
-	-- ** Modifying 'TyVar's
-	setTyVarName, setTyVarUnique, setTyVarKind, updateTyVarKind,
+        -- ** Modifying 'TyVar's
+        setTyVarName, setTyVarUnique, setTyVarKind, updateTyVarKind,
         updateTyVarKindM
 
     ) where
@@ -75,9 +69,9 @@ module Var (
 #include "HsVersions.h"
 #include "Typeable.h"
 
-import {-# SOURCE #-}	TypeRep( Type, Kind, SuperKind )
-import {-# SOURCE #-}	TcType( TcTyVarDetails, pprTcTyVarDetails )
-import {-# SOURCE #-}	IdInfo( IdDetails, IdInfo, coVarDetails, vanillaIdInfo, pprIdDetails )
+import {-# SOURCE #-}   TypeRep( Type, Kind, SuperKind )
+import {-# SOURCE #-}   TcType( TcTyVarDetails, pprTcTyVarDetails )
+import {-# SOURCE #-}   IdInfo( IdDetails, IdInfo, coVarDetails, vanillaIdInfo, pprIdDetails )
 
 import Name hiding (varName)
 import Unique
@@ -91,9 +85,9 @@ import Data.Data
 
 
 %************************************************************************
-%*									*
-                     Synonyms									
-%*									*
+%*                                                                      *
+                     Synonyms                                                                   
+%*                                                                      *
 %************************************************************************
 -- These synonyms are here and not in Id because otherwise we need a very
 -- large number of SOURCE imports of Id.hs :-(
@@ -106,17 +100,17 @@ type TyVar   = Var     -- Type *or* kind variable (historical)
 type TKVar   = Var     -- Type *or* kind variable (historical)
 type TypeVar = Var     -- Definitely a type variable
 type KindVar = Var     -- Definitely a kind variable
-     	       	       -- See Note [Kind and type variables]
+                       -- See Note [Kind and type variables]
 
 -- See Note [Evidence: EvIds and CoVars]
 type EvId   = Id        -- Term-level evidence: DictId, IpId, or EqVar
-type EvVar  = EvId	-- ...historical name for EvId
-type DFunId = Id	-- A dictionary function
-type DictId = EvId	-- A dictionary variable
+type EvVar  = EvId      -- ...historical name for EvId
+type DFunId = Id        -- A dictionary function
+type DictId = EvId      -- A dictionary variable
 type IpId   = EvId      -- A term-level implicit parameter
 type EqVar  = EvId      -- Boxed equality evidence
 
-type CoVar = Id		-- See Note [Evidence: EvIds and CoVars]
+type CoVar = Id         -- See Note [Evidence: EvIds and CoVars]
 \end{code}
 
 Note [Evidence: EvIds and CoVars]
@@ -144,9 +138,9 @@ go over the whole compiler code to use:
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{The main data type declarations}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 
@@ -161,37 +155,37 @@ in its @VarDetails@.
 data Var
   = TyVar {  -- Type and kind variables
              -- see Note [Kind and type variables]
-	varName    :: !Name,
-	realUnique :: FastInt,	     -- Key for fast comparison
-				     -- Identical to the Unique in the name,
-				     -- cached here for speed
-	varType    :: Kind           -- ^ The type or kind of the 'Var' in question
+        varName    :: !Name,
+        realUnique :: FastInt,       -- Key for fast comparison
+                                     -- Identical to the Unique in the name,
+                                     -- cached here for speed
+        varType    :: Kind           -- ^ The type or kind of the 'Var' in question
  }
 
-  | TcTyVar { 				-- Used only during type inference
-					-- Used for kind variables during 
-					-- inference, as well
-	varName        :: !Name,
-	realUnique     :: FastInt,
-	varType        :: Kind,
-	tc_tv_details  :: TcTyVarDetails }
+  | TcTyVar {                           -- Used only during type inference
+                                        -- Used for kind variables during 
+                                        -- inference, as well
+        varName        :: !Name,
+        realUnique     :: FastInt,
+        varType        :: Kind,
+        tc_tv_details  :: TcTyVarDetails }
 
   | Id {
-	varName    :: !Name,
-	realUnique :: FastInt,
-   	varType    :: Type,
-	idScope    :: IdScope,
-	id_details :: IdDetails,	-- Stable, doesn't change
-	id_info    :: IdInfo }		-- Unstable, updated by simplifier
+        varName    :: !Name,
+        realUnique :: FastInt,
+        varType    :: Type,
+        idScope    :: IdScope,
+        id_details :: IdDetails,        -- Stable, doesn't change
+        id_info    :: IdInfo }          -- Unstable, updated by simplifier
     deriving Typeable
 
-data IdScope	-- See Note [GlobalId/LocalId]
+data IdScope    -- See Note [GlobalId/LocalId]
   = GlobalId 
   | LocalId ExportFlag
 
 data ExportFlag 
-  = NotExported	-- ^ Not exported: may be discarded as dead code.
-  | Exported	-- ^ Exported: kept alive
+  = NotExported -- ^ Not exported: may be discarded as dead code.
+  | Exported    -- ^ Exported: kept alive
 \end{code}
 
 Note [GlobalId/LocalId]
@@ -202,7 +196,7 @@ A GlobalId is
   * has a Unique that is globally unique across the whole
     GHC invocation (a single invocation may compile multiple modules)
   * never treated as a candidate by the free-variable finder;
-	it's a constant!
+        it's a constant!
 
 A LocalId is 
   * bound within an expression (lambda, case, local let(rec))
@@ -240,9 +234,9 @@ instance Eq Var where
 
 instance Ord Var where
     a <= b = realUnique a <=# realUnique b
-    a <	 b = realUnique a <#  realUnique b
+    a <  b = realUnique a <#  realUnique b
     a >= b = realUnique a >=# realUnique b
-    a >	 b = realUnique a >#  realUnique b
+    a >  b = realUnique a >#  realUnique b
     a `compare` b = varUnique a `compare` varUnique b
 
 instance Data Var where
@@ -260,12 +254,12 @@ varUnique var = mkUniqueGrimily (iBox (realUnique var))
 setVarUnique :: Var -> Unique -> Var
 setVarUnique var uniq 
   = var { realUnique = getKeyFastInt uniq, 
-	  varName = setNameUnique (varName var) uniq }
+          varName = setNameUnique (varName var) uniq }
 
 setVarName :: Var -> Name -> Var
 setVarName var new_name
   = var { realUnique = getKeyFastInt (getUnique new_name), 
-   	  varName = new_name }
+          varName = new_name }
 
 setVarType :: Id -> Type -> Id
 setVarType id ty = id { varType = ty }
@@ -273,9 +267,9 @@ setVarType id ty = id { varType = ty }
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Type and kind variables}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -306,18 +300,18 @@ updateTyVarKindM update tv
 \begin{code}
 mkTyVar :: Name -> Kind -> TyVar
 mkTyVar name kind = TyVar { varName    = name
-			  , realUnique = getKeyFastInt (nameUnique name)
-			  , varType  = kind
-			}
+                          , realUnique = getKeyFastInt (nameUnique name)
+                          , varType  = kind
+                        }
 
 mkTcTyVar :: Name -> Kind -> TcTyVarDetails -> TyVar
 mkTcTyVar name kind details
   = -- NB: 'kind' may be a coercion kind; cf, 'TcMType.newMetaCoVar'
-    TcTyVar {	varName    = name,
-		realUnique = getKeyFastInt (nameUnique name),
-		varType  = kind,
-		tc_tv_details = details
-	}
+    TcTyVar {   varName    = name,
+                realUnique = getKeyFastInt (nameUnique name),
+                varType  = kind,
+                tc_tv_details = details
+        }
 
 tcTyVarDetails :: TyVar -> TcTyVarDetails
 tcTyVarDetails (TcTyVar { tc_tv_details = details }) = details
@@ -337,19 +331,19 @@ mkKindVar name kind = TyVar
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Ids}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 idInfo :: Id -> IdInfo
 idInfo (Id { id_info = info }) = info
-idInfo other 	       	       = pprPanic "idInfo" (ppr other)
+idInfo other                   = pprPanic "idInfo" (ppr other)
 
 idDetails :: Id -> IdDetails
 idDetails (Id { id_details = details }) = details
-idDetails other 	       	        = pprPanic "idDetails" (ppr other)
+idDetails other                         = pprPanic "idDetails" (ppr other)
 
 -- The next three have a 'Var' suffix even though they always build
 -- Ids, because Id.lhs uses 'mkGlobalId' etc with different types
@@ -373,11 +367,11 @@ mkExportedLocalVar details name ty info
 mk_id :: Name -> Type -> IdScope -> IdDetails -> IdInfo -> Id
 mk_id name ty scope details info
   = Id { varName    = name, 
-	 realUnique = getKeyFastInt (nameUnique name),
-	 varType    = ty,	
-	 idScope    = scope,
-	 id_details = details,
-	 id_info    = info }
+         realUnique = getKeyFastInt (nameUnique name),
+         varType    = ty,       
+         idScope    = scope,
+         id_details = details,
+         id_info    = info }
 
 -------------------
 lazySetIdInfo :: Id -> IdInfo -> Var
@@ -395,7 +389,7 @@ setIdExported :: Id -> Id
 -- and class operations, which are born as global 'Id's and automatically exported
 setIdExported id@(Id { idScope = LocalId {} }) = id { idScope = LocalId Exported }
 setIdExported id@(Id { idScope = GlobalId })   = id
-setIdExported tv	  	    	       = pprPanic "setIdExported" (ppr tv)
+setIdExported tv                               = pprPanic "setIdExported" (ppr tv)
 
 setIdNotExported :: Id -> Id
 -- ^ We can only do this to LocalIds
@@ -404,9 +398,9 @@ setIdNotExported id = ASSERT( isLocalId id )
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Predicates over variables}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -445,7 +439,7 @@ isGlobalId _                           = False
 -- is not quite right: there are some global 'Id's that must have
 -- bindings, such as record selectors.  But that doesn't matter,
 -- because it's only used for assertions
-mustHaveLocalBinding	    :: Var -> Bool
+mustHaveLocalBinding        :: Var -> Bool
 mustHaveLocalBinding var = isLocalVar var
 
 -- | 'isExportedIdVar' means \"don't throw this away\"
diff --git a/compiler/basicTypes/VarEnv.lhs b/compiler/basicTypes/VarEnv.lhs
index 9f88d0b..0d858f5 100644
--- a/compiler/basicTypes/VarEnv.lhs
+++ b/compiler/basicTypes/VarEnv.lhs
@@ -4,56 +4,50 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module VarEnv (
         -- * Var, Id and TyVar environments (maps)
-	VarEnv, IdEnv, TyVarEnv, CoVarEnv,
-	
-	-- ** Manipulating these environments
-	emptyVarEnv, unitVarEnv, mkVarEnv,
-	elemVarEnv, varEnvElts, varEnvKeys,
-	extendVarEnv, extendVarEnv_C, extendVarEnv_Acc, extendVarEnvList,
-	plusVarEnv, plusVarEnv_C, alterVarEnv,
-	delVarEnvList, delVarEnv,
+        VarEnv, IdEnv, TyVarEnv, CoVarEnv,
+        
+        -- ** Manipulating these environments
+        emptyVarEnv, unitVarEnv, mkVarEnv,
+        elemVarEnv, varEnvElts, varEnvKeys,
+        extendVarEnv, extendVarEnv_C, extendVarEnv_Acc, extendVarEnvList,
+        plusVarEnv, plusVarEnv_C, alterVarEnv,
+        delVarEnvList, delVarEnv,
         minusVarEnv, intersectsVarEnv,
-	lookupVarEnv, lookupVarEnv_NF, lookupWithDefaultVarEnv,
-	mapVarEnv, zipVarEnv,
-	modifyVarEnv, modifyVarEnv_Directly,
-	isEmptyVarEnv, foldVarEnv, 
-	elemVarEnvByKey, lookupVarEnv_Directly,
-	filterVarEnv_Directly, restrictVarEnv, 
+        lookupVarEnv, lookupVarEnv_NF, lookupWithDefaultVarEnv,
+        mapVarEnv, zipVarEnv,
+        modifyVarEnv, modifyVarEnv_Directly,
+        isEmptyVarEnv, foldVarEnv, 
+        elemVarEnvByKey, lookupVarEnv_Directly,
+        filterVarEnv_Directly, restrictVarEnv, 
         partitionVarEnv,
 
-	-- * The InScopeSet type
-	InScopeSet, 
-	
-	-- ** Operations on InScopeSets
-	emptyInScopeSet, mkInScopeSet, delInScopeSet,
-	extendInScopeSet, extendInScopeSetList, extendInScopeSetSet, 
-	getInScopeVars, lookupInScope, lookupInScope_Directly, 
+        -- * The InScopeSet type
+        InScopeSet, 
+        
+        -- ** Operations on InScopeSets
+        emptyInScopeSet, mkInScopeSet, delInScopeSet,
+        extendInScopeSet, extendInScopeSetList, extendInScopeSetSet, 
+        getInScopeVars, lookupInScope, lookupInScope_Directly, 
         unionInScope, elemInScopeSet, uniqAway,
 
-	-- * The RnEnv2 type
-	RnEnv2, 
-	
-	-- ** Operations on RnEnv2s
-	mkRnEnv2, rnBndr2, rnBndrs2,
-	rnOccL, rnOccR, inRnEnvL, inRnEnvR, rnOccL_maybe, rnOccR_maybe,
+        -- * The RnEnv2 type
+        RnEnv2, 
+        
+        -- ** Operations on RnEnv2s
+        mkRnEnv2, rnBndr2, rnBndrs2,
+        rnOccL, rnOccR, inRnEnvL, inRnEnvR, rnOccL_maybe, rnOccR_maybe,
         rnBndrL, rnBndrR, nukeRnEnvL, nukeRnEnvR,
         delBndrL, delBndrR, delBndrsL, delBndrsR,
         addRnInScopeSet,
         rnEtaL, rnEtaR,
-	rnInScope, rnInScopeSet, lookupRnInScope,
+        rnInScope, rnInScopeSet, lookupRnInScope,
 
-	-- * TidyEnv and its operation
-	TidyEnv, 
-	emptyTidyEnv
+        -- * TidyEnv and its operation
+        TidyEnv, 
+        emptyTidyEnv
     ) where
 
 import OccName
@@ -71,28 +65,28 @@ import FastString
 
 
 %************************************************************************
-%*									*
-		In-scope sets
-%*									*
+%*                                                                      *
+                In-scope sets
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 -- | A set of variables that are in scope at some point
 data InScopeSet = InScope (VarEnv Var) FastInt
-	-- The (VarEnv Var) is just a VarSet.  But we write it like
-	-- this to remind ourselves that you can look up a Var in 
-	-- the InScopeSet. Typically the InScopeSet contains the
-	-- canonical version of the variable (e.g. with an informative
-	-- unfolding), so this lookup is useful.
-	--
-	-- INVARIANT: the VarEnv maps (the Unique of) a variable to 
-	--	      a variable with the same Uniqua.  (This was not
-	--	      the case in the past, when we had a grevious hack
-	--	      mapping var1 to var2.	
-	-- 
-	-- The FastInt is a kind of hash-value used by uniqAway
-	-- For example, it might be the size of the set
-	-- INVARIANT: it's not zero; we use it as a multiplier in uniqAway
+        -- The (VarEnv Var) is just a VarSet.  But we write it like
+        -- this to remind ourselves that you can look up a Var in 
+        -- the InScopeSet. Typically the InScopeSet contains the
+        -- canonical version of the variable (e.g. with an informative
+        -- unfolding), so this lookup is useful.
+        --
+        -- INVARIANT: the VarEnv maps (the Unique of) a variable to 
+        --            a variable with the same Uniqua.  (This was not
+        --            the case in the past, when we had a grevious hack
+        --            mapping var1 to var2.     
+        -- 
+        -- The FastInt is a kind of hash-value used by uniqAway
+        -- For example, it might be the size of the set
+        -- INVARIANT: it's not zero; we use it as a multiplier in uniqAway
 
 instance Outputable InScopeSet where
   ppr (InScope s _) = ptext (sLit "InScope") <+> ppr s
@@ -112,7 +106,7 @@ extendInScopeSet (InScope in_scope n) v = InScope (extendVarEnv in_scope v v) (n
 extendInScopeSetList :: InScopeSet -> [Var] -> InScopeSet
 extendInScopeSetList (InScope in_scope n) vs
    = InScope (foldl (\s v -> extendVarEnv s v v) in_scope vs)
-		    (n +# iUnbox (length vs))
+                    (n +# iUnbox (length vs))
 
 extendInScopeSetSet :: InScopeSet -> VarEnv Var -> InScopeSet
 extendInScopeSetSet (InScope in_scope n) vs
@@ -146,8 +140,8 @@ uniqAway :: InScopeSet -> Var -> Var
 -- have to change, and thereafter uses a combination of that and the hash-code
 -- found in the in-scope set
 uniqAway in_scope var
-  | var `elemInScopeSet` in_scope = uniqAway' in_scope var	-- Make a new one
-  | otherwise 			  = var				-- Nothing to do
+  | var `elemInScopeSet` in_scope = uniqAway' in_scope var      -- Make a new one
+  | otherwise                     = var                         -- Nothing to do
 
 uniqAway' :: InScopeSet -> Var -> Var
 -- This one *always* makes up a new variable
@@ -156,28 +150,28 @@ uniqAway' (InScope set n) var
   where
     orig_unique = getUnique var
     try k 
-	  | debugIsOn && (k ># _ILIT(1000))
-	  = pprPanic "uniqAway loop:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) 
-	  | uniq `elemVarSetByKey` set = try (k +# _ILIT(1))
-	  | debugIsOn && opt_PprStyle_Debug && (k ># _ILIT(3))
-	  = pprTrace "uniqAway:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) 
-	    setVarUnique var uniq
-	  | otherwise = setVarUnique var uniq
-	  where
-	    uniq = deriveUnique orig_unique (iBox (n *# k))
+          | debugIsOn && (k ># _ILIT(1000))
+          = pprPanic "uniqAway loop:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) 
+          | uniq `elemVarSetByKey` set = try (k +# _ILIT(1))
+          | debugIsOn && opt_PprStyle_Debug && (k ># _ILIT(3))
+          = pprTrace "uniqAway:" (ppr (iBox k) <+> text "tries" <+> ppr var <+> int (iBox n)) 
+            setVarUnique var uniq
+          | otherwise = setVarUnique var uniq
+          where
+            uniq = deriveUnique orig_unique (iBox (n *# k))
 \end{code}
 
 %************************************************************************
-%*									*
-		Dual renaming
-%*									*
+%*                                                                      *
+                Dual renaming
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 -- | When we are comparing (or matching) types or terms, we are faced with 
 -- \"going under\" corresponding binders.  E.g. when comparing:
 --
--- > \x. e1	~   \y. e2
+-- > \x. e1     ~   \y. e2
 --
 -- Basically we want to rename [@x@ -> @y@] or [@y@ -> @x@], but there are lots of 
 -- things we must be careful of.  In particular, @x@ might be free in @e2@, or
@@ -201,9 +195,9 @@ uniqAway' (InScope set n) var
 --
 -- All of this information is bundled up in the 'RnEnv2'
 data RnEnv2
-  = RV2 { envL 	   :: VarEnv Var	-- Renaming for Left term
-	, envR 	   :: VarEnv Var	-- Renaming for Right term
-	, in_scope :: InScopeSet }	-- In scope in left or right terms
+  = RV2 { envL     :: VarEnv Var        -- Renaming for Left term
+        , envR     :: VarEnv Var        -- Renaming for Right term
+        , in_scope :: InScopeSet }      -- In scope in left or right terms
 
 -- The renamings envL and envR are *guaranteed* to contain a binding
 -- for every variable bound as we go into the term, even if it is not
@@ -211,9 +205,9 @@ data RnEnv2
 -- (inRnEnvL, inRnEnvR)
 
 mkRnEnv2 :: InScopeSet -> RnEnv2
-mkRnEnv2 vars = RV2	{ envL 	   = emptyVarEnv 
-			, envR 	   = emptyVarEnv
-			, in_scope = vars }
+mkRnEnv2 vars = RV2     { envL     = emptyVarEnv 
+                        , envR     = emptyVarEnv
+                        , in_scope = vars }
 
 addRnInScopeSet :: RnEnv2 -> VarEnv Var -> RnEnv2
 addRnInScopeSet env vs
@@ -232,26 +226,26 @@ rnBndrs2 env bsL bsR = foldl2 rnBndr2 env bsL bsR
 
 rnBndr2 :: RnEnv2 -> Var -> Var -> RnEnv2
 -- ^ @rnBndr2 env bL bR@ goes under a binder @bL@ in the Left term,
--- 		         and binder @bR@ in the Right term.
+--                       and binder @bR@ in the Right term.
 -- It finds a new binder, @new_b@,
 -- and returns an environment mapping @bL -> new_b@ and @bR -> new_b@
 rnBndr2 (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bL bR
-  = RV2 { envL 	   = extendVarEnv envL bL new_b	  -- See Note
-	, envR 	   = extendVarEnv envR bR new_b	  -- [Rebinding]
-	, in_scope = extendInScopeSet in_scope new_b }
+  = RV2 { envL     = extendVarEnv envL bL new_b   -- See Note
+        , envR     = extendVarEnv envR bR new_b   -- [Rebinding]
+        , in_scope = extendInScopeSet in_scope new_b }
   where
-	-- Find a new binder not in scope in either term
+        -- Find a new binder not in scope in either term
     new_b | not (bL `elemInScopeSet` in_scope) = bL
-      	  | not (bR `elemInScopeSet` in_scope) = bR
-      	  | otherwise			       = uniqAway' in_scope bL
+          | not (bR `elemInScopeSet` in_scope) = bR
+          | otherwise                          = uniqAway' in_scope bL
 
-	-- Note [Rebinding]
-	-- If the new var is the same as the old one, note that
-	-- the extendVarEnv *deletes* any current renaming
-	-- E.g.	  (\x. \x. ...)	 ~  (\y. \z. ...)
-	--
-	--   Inside \x  \y	{ [x->y], [y->y],       {y} }
-	-- 	 \x  \z	  	{ [x->x], [y->y, z->x], {y,x} }
+        -- Note [Rebinding]
+        -- If the new var is the same as the old one, note that
+        -- the extendVarEnv *deletes* any current renaming
+        -- E.g.   (\x. \x. ...)  ~  (\y. \z. ...)
+        --
+        --   Inside \x  \y      { [x->y], [y->y],       {y} }
+        --       \x  \z         { [x->x], [y->y, z->x], {y,x} }
 
 rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var)
 -- ^ Similar to 'rnBndr2' but used when there's a binder on the left
@@ -259,7 +253,7 @@ rnBndrL :: RnEnv2 -> Var -> (RnEnv2, Var)
 rnBndrL (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bL
   = (RV2 { envL     = extendVarEnv envL bL new_b
          , envR     = envR
-	 , in_scope = extendInScopeSet in_scope new_b }, new_b)
+         , in_scope = extendInScopeSet in_scope new_b }, new_b)
   where
     new_b = uniqAway in_scope bL
 
@@ -269,7 +263,7 @@ rnBndrR :: RnEnv2 -> Var -> (RnEnv2, Var)
 rnBndrR (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bR
   = (RV2 { envR     = extendVarEnv envR bR new_b
          , envL     = envL
-	 , in_scope = extendInScopeSet in_scope new_b }, new_b)
+         , in_scope = extendInScopeSet in_scope new_b }, new_b)
   where
     new_b = uniqAway in_scope bR
 
@@ -278,8 +272,8 @@ rnEtaL :: RnEnv2 -> Var -> (RnEnv2, Var)
 -- See Note [Eta expansion]
 rnEtaL (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bL
   = (RV2 { envL     = extendVarEnv envL bL new_b
-	 , envR     = extendVarEnv envR new_b new_b 	-- Note [Eta expansion]
-	 , in_scope = extendInScopeSet in_scope new_b }, new_b)
+         , envR     = extendVarEnv envR new_b new_b     -- Note [Eta expansion]
+         , in_scope = extendInScopeSet in_scope new_b }, new_b)
   where
     new_b = uniqAway in_scope bL
 
@@ -287,9 +281,9 @@ rnEtaR :: RnEnv2 -> Var -> (RnEnv2, Var)
 -- ^ Similar to 'rnBndr2' but used for eta expansion
 -- See Note [Eta expansion]
 rnEtaR (RV2 { envL = envL, envR = envR, in_scope = in_scope }) bR
-  = (RV2 { envL     = extendVarEnv envL new_b new_b	-- Note [Eta expansion]
-	 , envR     = extendVarEnv envR bR new_b
-	 , in_scope = extendInScopeSet in_scope new_b }, new_b)
+  = (RV2 { envL     = extendVarEnv envL new_b new_b     -- Note [Eta expansion]
+         , envR     = extendVarEnv envR bR new_b
+         , in_scope = extendInScopeSet in_scope new_b }, new_b)
   where
     new_b = uniqAway in_scope bR
 
@@ -340,14 +334,14 @@ Since x' isn't in scope in N, the form (\x'. N x') doesn't
 capture any variables in N.  But we must nevertheless extend
 the envR with a binding [x' -> x'], to support the occurs check.
 For example, if we don't do this, we can get silly matches like
-	forall a.  (\y.a)  ~   v
+        forall a.  (\y.a)  ~   v
 succeeding with [a -> v y], which is bogus of course.
 
 
 %************************************************************************
-%*									*
-		Tidying
-%*									*
+%*                                                                      *
+                Tidying
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -361,9 +355,9 @@ emptyTidyEnv = (emptyTidyOccEnv, emptyVarEnv)
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{@VarEnv@s}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -372,64 +366,64 @@ type IdEnv elt    = VarEnv elt
 type TyVarEnv elt = VarEnv elt
 type CoVarEnv elt = VarEnv elt
 
-emptyVarEnv	  :: VarEnv a
-mkVarEnv	  :: [(Var, a)] -> VarEnv a
-zipVarEnv	  :: [Var] -> [a] -> VarEnv a
-unitVarEnv	  :: Var -> a -> VarEnv a
-alterVarEnv	  :: (Maybe a -> Maybe a) -> VarEnv a -> Var -> VarEnv a
-extendVarEnv	  :: VarEnv a -> Var -> a -> VarEnv a
-extendVarEnv_C	  :: (a->a->a) -> VarEnv a -> Var -> a -> VarEnv a
+emptyVarEnv       :: VarEnv a
+mkVarEnv          :: [(Var, a)] -> VarEnv a
+zipVarEnv         :: [Var] -> [a] -> VarEnv a
+unitVarEnv        :: Var -> a -> VarEnv a
+alterVarEnv       :: (Maybe a -> Maybe a) -> VarEnv a -> Var -> VarEnv a
+extendVarEnv      :: VarEnv a -> Var -> a -> VarEnv a
+extendVarEnv_C    :: (a->a->a) -> VarEnv a -> Var -> a -> VarEnv a
 extendVarEnv_Acc  :: (a->b->b) -> (a->b) -> VarEnv b -> Var -> a -> VarEnv b
-plusVarEnv	  :: VarEnv a -> VarEnv a -> VarEnv a
+plusVarEnv        :: VarEnv a -> VarEnv a -> VarEnv a
 extendVarEnvList  :: VarEnv a -> [(Var, a)] -> VarEnv a
-		  
+                  
 lookupVarEnv_Directly :: VarEnv a -> Unique -> Maybe a
 filterVarEnv_Directly :: (Unique -> a -> Bool) -> VarEnv a -> VarEnv a
 partitionVarEnv   :: (a -> Bool) -> VarEnv a -> (VarEnv a, VarEnv a)
 restrictVarEnv    :: VarEnv a -> VarSet -> VarEnv a
 delVarEnvList     :: VarEnv a -> [Var] -> VarEnv a
-delVarEnv	  :: VarEnv a -> Var -> VarEnv a
+delVarEnv         :: VarEnv a -> Var -> VarEnv a
 minusVarEnv       :: VarEnv a -> VarEnv b -> VarEnv a
 intersectsVarEnv  :: VarEnv a -> VarEnv a -> Bool
-plusVarEnv_C	  :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a
-mapVarEnv	  :: (a -> b) -> VarEnv a -> VarEnv b
-modifyVarEnv	  :: (a -> a) -> VarEnv a -> Var -> VarEnv a
-varEnvElts	  :: VarEnv a -> [a]
-varEnvKeys	  :: VarEnv a -> [Unique]
-		  
-isEmptyVarEnv	  :: VarEnv a -> Bool
-lookupVarEnv	  :: VarEnv a -> Var -> Maybe a
+plusVarEnv_C      :: (a -> a -> a) -> VarEnv a -> VarEnv a -> VarEnv a
+mapVarEnv         :: (a -> b) -> VarEnv a -> VarEnv b
+modifyVarEnv      :: (a -> a) -> VarEnv a -> Var -> VarEnv a
+varEnvElts        :: VarEnv a -> [a]
+varEnvKeys        :: VarEnv a -> [Unique]
+                  
+isEmptyVarEnv     :: VarEnv a -> Bool
+lookupVarEnv      :: VarEnv a -> Var -> Maybe a
 lookupVarEnv_NF   :: VarEnv a -> Var -> a
 lookupWithDefaultVarEnv :: VarEnv a -> a -> Var -> a
-elemVarEnv	  :: Var -> VarEnv a -> Bool
+elemVarEnv        :: Var -> VarEnv a -> Bool
 elemVarEnvByKey   :: Unique -> VarEnv a -> Bool
-foldVarEnv	  :: (a -> b -> b) -> b -> VarEnv a -> b
+foldVarEnv        :: (a -> b -> b) -> b -> VarEnv a -> b
 \end{code}
 
 \begin{code}
 elemVarEnv       = elemUFM
 elemVarEnvByKey  = elemUFM_Directly
 alterVarEnv      = alterUFM
-extendVarEnv	 = addToUFM
-extendVarEnv_C	 = addToUFM_C
+extendVarEnv     = addToUFM
+extendVarEnv_C   = addToUFM_C
 extendVarEnv_Acc = addToUFM_Acc
 extendVarEnvList = addListToUFM
-plusVarEnv_C	 = plusUFM_C
-delVarEnvList	 = delListFromUFM
-delVarEnv	 = delFromUFM
+plusVarEnv_C     = plusUFM_C
+delVarEnvList    = delListFromUFM
+delVarEnv        = delFromUFM
 minusVarEnv      = minusUFM
 intersectsVarEnv e1 e2 = not (isEmptyVarEnv (e1 `intersectUFM` e2))
-plusVarEnv	 = plusUFM
-lookupVarEnv	 = lookupUFM
+plusVarEnv       = plusUFM
+lookupVarEnv     = lookupUFM
 lookupWithDefaultVarEnv = lookupWithDefaultUFM
-mapVarEnv	 = mapUFM
-mkVarEnv	 = listToUFM
-emptyVarEnv	 = emptyUFM
-varEnvElts	 = eltsUFM
-varEnvKeys	 = keysUFM
-unitVarEnv	 = unitUFM
-isEmptyVarEnv	 = isNullUFM
-foldVarEnv	 = foldUFM
+mapVarEnv        = mapUFM
+mkVarEnv         = listToUFM
+emptyVarEnv      = emptyUFM
+varEnvElts       = eltsUFM
+varEnvKeys       = keysUFM
+unitVarEnv       = unitUFM
+isEmptyVarEnv    = isNullUFM
+foldVarEnv       = foldUFM
 lookupVarEnv_Directly = lookupUFM_Directly
 filterVarEnv_Directly = filterUFM_Directly
 partitionVarEnv       = partitionUFM
diff --git a/compiler/basicTypes/VarSet.lhs b/compiler/basicTypes/VarSet.lhs
index b756283..c27444e 100644
--- a/compiler/basicTypes/VarSet.lhs
+++ b/compiler/basicTypes/VarSet.lhs
@@ -4,27 +4,21 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module VarSet (
         -- * Var, Id and TyVar set types
-	VarSet, IdSet, TyVarSet, CoVarSet,
-	
-	-- ** Manipulating these sets
-	emptyVarSet, unitVarSet, mkVarSet,
-	extendVarSet, extendVarSetList, extendVarSet_C,
-	elemVarSet, varSetElems, subVarSet,
-	unionVarSet, unionVarSets,
-	intersectVarSet, intersectsVarSet, disjointVarSet,
-	isEmptyVarSet, delVarSet, delVarSetList, delVarSetByKey,
-	minusVarSet, foldVarSet, filterVarSet, fixVarSet,
-	lookupVarSet, mapVarSet, sizeVarSet, seqVarSet,
-	elemVarSetByKey, partitionVarSet
+        VarSet, IdSet, TyVarSet, CoVarSet,
+        
+        -- ** Manipulating these sets
+        emptyVarSet, unitVarSet, mkVarSet,
+        extendVarSet, extendVarSetList, extendVarSet_C,
+        elemVarSet, varSetElems, subVarSet,
+        unionVarSet, unionVarSets,
+        intersectVarSet, intersectsVarSet, disjointVarSet,
+        isEmptyVarSet, delVarSet, delVarSetList, delVarSetByKey,
+        minusVarSet, foldVarSet, filterVarSet, fixVarSet,
+        lookupVarSet, mapVarSet, sizeVarSet, seqVarSet,
+        elemVarSetByKey, partitionVarSet
     ) where
 
 #include "HsVersions.h"
@@ -35,74 +29,74 @@ import UniqSet
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{@VarSet@s}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 type VarSet       = UniqSet Var
-type IdSet 	  = UniqSet Id
-type TyVarSet	  = UniqSet TyVar
+type IdSet        = UniqSet Id
+type TyVarSet     = UniqSet TyVar
 type CoVarSet     = UniqSet CoVar
 
-emptyVarSet	:: VarSet
-intersectVarSet	:: VarSet -> VarSet -> VarSet
-unionVarSet	:: VarSet -> VarSet -> VarSet
-unionVarSets	:: [VarSet] -> VarSet
-varSetElems	:: VarSet -> [Var]
-unitVarSet	:: Var -> VarSet
-extendVarSet	:: VarSet -> Var -> VarSet
+emptyVarSet     :: VarSet
+intersectVarSet :: VarSet -> VarSet -> VarSet
+unionVarSet     :: VarSet -> VarSet -> VarSet
+unionVarSets    :: [VarSet] -> VarSet
+varSetElems     :: VarSet -> [Var]
+unitVarSet      :: Var -> VarSet
+extendVarSet    :: VarSet -> Var -> VarSet
 extendVarSetList:: VarSet -> [Var] -> VarSet
-elemVarSet	:: Var -> VarSet -> Bool
-delVarSet	:: VarSet -> Var -> VarSet
-delVarSetList	:: VarSet -> [Var] -> VarSet
-minusVarSet	:: VarSet -> VarSet -> VarSet
-isEmptyVarSet	:: VarSet -> Bool
-mkVarSet	:: [Var] -> VarSet
-foldVarSet	:: (Var -> a -> a) -> a -> VarSet -> a
-lookupVarSet	:: VarSet -> Var -> Maybe Var
-			-- Returns the set element, which may be
-			-- (==) to the argument, but not the same as
-mapVarSet 	:: (Var -> Var) -> VarSet -> VarSet
-sizeVarSet	:: VarSet -> Int
-filterVarSet	:: (Var -> Bool) -> VarSet -> VarSet
+elemVarSet      :: Var -> VarSet -> Bool
+delVarSet       :: VarSet -> Var -> VarSet
+delVarSetList   :: VarSet -> [Var] -> VarSet
+minusVarSet     :: VarSet -> VarSet -> VarSet
+isEmptyVarSet   :: VarSet -> Bool
+mkVarSet        :: [Var] -> VarSet
+foldVarSet      :: (Var -> a -> a) -> a -> VarSet -> a
+lookupVarSet    :: VarSet -> Var -> Maybe Var
+                        -- Returns the set element, which may be
+                        -- (==) to the argument, but not the same as
+mapVarSet       :: (Var -> Var) -> VarSet -> VarSet
+sizeVarSet      :: VarSet -> Int
+filterVarSet    :: (Var -> Bool) -> VarSet -> VarSet
 extendVarSet_C  :: (Var->Var->Var) -> VarSet -> Var -> VarSet
 
-delVarSetByKey	:: VarSet -> Unique -> VarSet
+delVarSetByKey  :: VarSet -> Unique -> VarSet
 elemVarSetByKey :: Unique -> VarSet -> Bool
 fixVarSet       :: (VarSet -> VarSet) -> VarSet -> VarSet
 partitionVarSet :: (Var -> Bool) -> VarSet -> (VarSet, VarSet)
 
-emptyVarSet	= emptyUniqSet
-unitVarSet	= unitUniqSet
-extendVarSet	= addOneToUniqSet
+emptyVarSet     = emptyUniqSet
+unitVarSet      = unitUniqSet
+extendVarSet    = addOneToUniqSet
 extendVarSetList= addListToUniqSet
-intersectVarSet	= intersectUniqSets
+intersectVarSet = intersectUniqSets
 
-intersectsVarSet:: VarSet -> VarSet -> Bool 	-- True if non-empty intersection
-disjointVarSet  :: VarSet -> VarSet -> Bool 	-- True if empty intersection
-subVarSet	:: VarSet -> VarSet -> Bool	-- True if first arg is subset of second
-	-- (s1 `intersectsVarSet` s2) doesn't compute s2 if s1 is empty; 
-	-- ditto disjointVarSet, subVarSet
+intersectsVarSet:: VarSet -> VarSet -> Bool     -- True if non-empty intersection
+disjointVarSet  :: VarSet -> VarSet -> Bool     -- True if empty intersection
+subVarSet       :: VarSet -> VarSet -> Bool     -- True if first arg is subset of second
+        -- (s1 `intersectsVarSet` s2) doesn't compute s2 if s1 is empty; 
+        -- ditto disjointVarSet, subVarSet
 
-unionVarSet	= unionUniqSets
-unionVarSets	= unionManyUniqSets
-varSetElems	= uniqSetToList
-elemVarSet	= elementOfUniqSet
-minusVarSet	= minusUniqSet
-delVarSet	= delOneFromUniqSet
-delVarSetList	= delListFromUniqSet
-isEmptyVarSet	= isEmptyUniqSet
-mkVarSet	= mkUniqSet
-foldVarSet	= foldUniqSet
-lookupVarSet	= lookupUniqSet
-mapVarSet	= mapUniqSet
-sizeVarSet	= sizeUniqSet
-filterVarSet	= filterUniqSet
+unionVarSet     = unionUniqSets
+unionVarSets    = unionManyUniqSets
+varSetElems     = uniqSetToList
+elemVarSet      = elementOfUniqSet
+minusVarSet     = minusUniqSet
+delVarSet       = delOneFromUniqSet
+delVarSetList   = delListFromUniqSet
+isEmptyVarSet   = isEmptyUniqSet
+mkVarSet        = mkUniqSet
+foldVarSet      = foldUniqSet
+lookupVarSet    = lookupUniqSet
+mapVarSet       = mapUniqSet
+sizeVarSet      = sizeUniqSet
+filterVarSet    = filterUniqSet
 extendVarSet_C = addOneToUniqSet_C
-delVarSetByKey	= delOneFromUniqSet_Directly
-elemVarSetByKey	= elemUniqSet_Directly
+delVarSetByKey  = delOneFromUniqSet_Directly
+elemVarSetByKey = elemUniqSet_Directly
 partitionVarSet = partitionUniqSet
 \end{code}
 
@@ -114,9 +108,9 @@ subVarSet        s1 s2 = isEmptyVarSet (s1 `minusVarSet` s2)
 
 -- Iterate f to a fixpoint
 fixVarSet f s | new_s `subVarSet` s = s
-	      | otherwise	    = fixVarSet f new_s 
-	      where
-		new_s = f s
+              | otherwise           = fixVarSet f new_s 
+              where
+                new_s = f s
 \end{code}
 
 \begin{code}
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
index 2851a47..4d64d8b 100644
--- a/compiler/cmm/CmmInfo.hs
+++ b/compiler/cmm/CmmInfo.hs
@@ -1,9 +1,3 @@
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module CmmInfo (
   mkEmptyContInfoTable,
@@ -82,31 +76,31 @@ cmmToRawCmm dflags cmms
 -- represented by a label+offset expression).
 --
 -- With tablesNextToCode, the layout is
---	<reversed variable part>
---	<normal forward StgInfoTable, but without 
---		an entry point at the front>
---	<code>
+--      <reversed variable part>
+--      <normal forward StgInfoTable, but without 
+--              an entry point at the front>
+--      <code>
 --
 -- Without tablesNextToCode, the layout of an info table is
---	<entry label>
---	<normal forward rest of StgInfoTable>
---	<forward variable part>
+--      <entry label>
+--      <normal forward rest of StgInfoTable>
+--      <forward variable part>
 --
---	See includes/rts/storage/InfoTables.h
+--      See includes/rts/storage/InfoTables.h
 --
 -- For return-points these are as follows
 --
 -- Tables next to code:
 --
---			<srt slot>
---			<standard info table>
---  	ret-addr -->	<entry code (if any)>
+--                      <srt slot>
+--                      <standard info table>
+--      ret-addr -->    <entry code (if any)>
 --
 -- Not tables-next-to-code:
 --
---	ret-addr -->	<ptr to entry code>
---			<standard info table>
---			<srt slot>
+--      ret-addr -->    <ptr to entry code>
+--                      <standard info table>
+--                      <srt slot>
 --
 --  * The SRT slot is only there if there is SRT info to record
 
@@ -166,15 +160,15 @@ mkInfoTable dflags proc@(CmmProc infos entry_lbl live blocks)
                               reverse rel_extra_bits ++ rel_std_info))
 
 -----------------------------------------------------
-type InfoTableContents = ( [CmmLit]	     -- The standard part
-                         , [CmmLit] )	     -- The "extra bits"
+type InfoTableContents = ( [CmmLit]          -- The standard part
+                         , [CmmLit] )        -- The "extra bits"
 -- These Lits have *not* had mkRelativeTo applied to them
 
 mkInfoTableContents :: DynFlags
                     -> CmmInfoTable
                     -> Maybe Int               -- Override default RTS type tag?
                     -> UniqSM ([RawCmmDecl],             -- Auxiliary top decls
-                               InfoTableContents)	-- Info tbl + extra bits
+                               InfoTableContents)       -- Info tbl + extra bits
 
 mkInfoTableContents dflags
                     info@(CmmInfoTable { cit_lbl  = info_lbl
@@ -214,9 +208,9 @@ mkInfoTableContents dflags
   where
     mk_pieces :: ClosureTypeInfo -> [CmmLit]
               -> UniqSM ( Maybe StgHalfWord  -- Override the SRT field with this
-                 	, Maybe CmmLit       -- Override the layout field with this
-                 	, [CmmLit]           -- "Extra bits" for info table
-                 	, [RawCmmDecl])	     -- Auxiliary data decls 
+                        , Maybe CmmLit       -- Override the layout field with this
+                        , [CmmLit]           -- "Extra bits" for info table
+                        , [RawCmmDecl])      -- Auxiliary data decls 
     mk_pieces (Constr con_tag con_descr) _no_srt    -- A data constructor
       = do { (descr_lit, decl) <- newStringLit con_descr
            ; return ( Just (toStgHalfWord dflags (fromIntegral con_tag))
@@ -279,7 +273,7 @@ mkSRTLit dflags (C_SRT lbl off bitmap) = ([cmmLabelOffW dflags lbl off], bitmap)
 
 -------------------------------------------------------------------------
 --
---	Position independent code
+--      Position independent code
 --
 -------------------------------------------------------------------------
 -- In order to support position independent code, we mustn't put absolute
@@ -303,16 +297,16 @@ makeRelativeRefTo _ _ lit = lit
 
 -------------------------------------------------------------------------
 --
---		Build a liveness mask for the stack layout
+--              Build a liveness mask for the stack layout
 --
 -------------------------------------------------------------------------
 
 -- There are four kinds of things on the stack:
 --
---	- pointer variables (bound in the environment)
--- 	- non-pointer variables (bound in the environment)
--- 	- free slots (recorded in the stack free list)
--- 	- non-pointer data slots (recorded in the stack free list)
+--      - pointer variables (bound in the environment)
+--      - non-pointer variables (bound in the environment)
+--      - free slots (recorded in the stack free list)
+--      - non-pointer data slots (recorded in the stack free list)
 --
 -- The first two are represented with a 'Just' of a 'LocalReg'.
 -- The last two with one or more 'Nothing' constructors.
@@ -344,7 +338,7 @@ mkLivenessBits dflags liveness
     small_bitmap = case bitmap of 
                      []  -> toStgWord dflags 0
                      [b] -> b
-		     _   -> panic "mkLiveness"
+                     _   -> panic "mkLiveness"
     bitmap_word = toStgWord dflags (fromIntegral n_bits)
               .|. (small_bitmap `shiftL` bITMAP_BITS_SHIFT dflags)
 
@@ -355,7 +349,7 @@ mkLivenessBits dflags liveness
 
 -------------------------------------------------------------------------
 --
---	Generating a standard info table
+--      Generating a standard info table
 --
 -------------------------------------------------------------------------
 
@@ -368,23 +362,23 @@ mkLivenessBits dflags liveness
 
 mkStdInfoTable
    :: DynFlags
-   -> (CmmLit,CmmLit)	-- Closure type descr and closure descr  (profiling)
+   -> (CmmLit,CmmLit)   -- Closure type descr and closure descr  (profiling)
    -> Int               -- Closure RTS tag
    -> StgHalfWord       -- SRT length
-   -> CmmLit		-- layout field
+   -> CmmLit            -- layout field
    -> [CmmLit]
 
 mkStdInfoTable dflags (type_descr, closure_descr) cl_type srt_len layout_lit
- = 	-- Parallel revertible-black hole field
+ =      -- Parallel revertible-black hole field
     prof_info
-	-- Ticky info (none at present)
-	-- Debug info (none at present)
+        -- Ticky info (none at present)
+        -- Debug info (none at present)
  ++ [layout_lit, type_lit]
 
  where  
     prof_info 
-	| gopt Opt_SccProfilingOn dflags = [type_descr, closure_descr]
-	| otherwise = []
+        | gopt Opt_SccProfilingOn dflags = [type_descr, closure_descr]
+        | otherwise = []
 
     type_lit = packHalfWordsCLit dflags (toStgHalfWord dflags (fromIntegral cl_type)) srt_len
 
@@ -415,7 +409,7 @@ srtEscape dflags = toStgHalfWord dflags (-1)
 
 -------------------------------------------------------------------------
 --
---	Accessing fields of an info table
+--      Accessing fields of an info table
 --
 -------------------------------------------------------------------------
 
@@ -490,14 +484,14 @@ funInfoTable dflags info_ptr
   = cmmOffsetB dflags info_ptr (- stdInfoTableSizeB dflags - sIZEOF_StgFunInfoExtraRev dflags)
   | otherwise
   = cmmOffsetW dflags info_ptr (1 + stdInfoTableSizeW dflags)
-				-- Past the entry code pointer
+                                -- Past the entry code pointer
 
 -----------------------------------------------------------------------------
 --
 --      Info table sizes & offsets
 --
 -----------------------------------------------------------------------------
-	
+        
 stdInfoTableSizeW :: DynFlags -> WordOff
 -- The size of a standard info table varies with profiling/ticky etc,
 -- so we can't get it from Constants
diff --git a/compiler/coreSyn/CoreArity.lhs b/compiler/coreSyn/CoreArity.lhs
index 62f9b7e..e31c361 100644
--- a/compiler/coreSyn/CoreArity.lhs
+++ b/compiler/coreSyn/CoreArity.lhs
@@ -3,20 +3,14 @@
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
 
-	Arity and ete expansion
+        Arity and ete expansion
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Arit and eta expansion
 module CoreArity (
-	manifestArity, exprArity, exprBotStrictness_maybe,
-	exprEtaExpandArity, CheapFun, etaExpand
+        manifestArity, exprArity, exprBotStrictness_maybe,
+        exprEtaExpandArity, CheapFun, etaExpand
     ) where
 
 #include "HsVersions.h"
@@ -30,7 +24,7 @@ import Var
 import VarEnv
 import Id
 import Type
-import TyCon	( initRecTc, checkRecTc )
+import TyCon    ( initRecTc, checkRecTc )
 import Coercion
 import BasicTypes
 import Unique
@@ -41,9 +35,9 @@ import Pair
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
               manifestArity and exprArity
-%*									*
+%*                                                                      *
 %************************************************************************
 
 exprArity is a cheap-and-cheerful version of exprEtaExpandArity.
@@ -56,46 +50,46 @@ compute the ArityInfo for the Id.
 Originally I thought that it was enough just to look for top-level lambdas, but
 it isn't.  I've seen this
 
-	foo = PrelBase.timesInt
+        foo = PrelBase.timesInt
 
 We want foo to get arity 2 even though the eta-expander will leave it
 unchanged, in the expectation that it'll be inlined.  But occasionally it
 isn't, because foo is blacklisted (used in a rule).  
 
 Similarly, see the ok_note check in exprEtaExpandArity.  So 
-	f = __inline_me (\x -> e)
+        f = __inline_me (\x -> e)
 won't be eta-expanded.
 
 And in any case it seems more robust to have exprArity be a bit more intelligent.
-But note that 	(\x y z -> f x y z)
+But note that   (\x y z -> f x y z)
 should have arity 3, regardless of f's arity.
 
 \begin{code}
 manifestArity :: CoreExpr -> Arity
 -- ^ manifestArity sees how many leading value lambdas there are
-manifestArity (Lam v e) | isId v    	= 1 + manifestArity e
-			| otherwise 	= manifestArity e
+manifestArity (Lam v e) | isId v        = 1 + manifestArity e
+                        | otherwise     = manifestArity e
 manifestArity (Tick t e) | not (tickishIsCode t) =  manifestArity e
-manifestArity (Cast e _)            	= manifestArity e
-manifestArity _                     	= 0
+manifestArity (Cast e _)                = manifestArity e
+manifestArity _                         = 0
 
 ---------------
 exprArity :: CoreExpr -> Arity
 -- ^ An approximate, fast, version of 'exprEtaExpandArity'
 exprArity e = go e
   where
-    go (Var v) 	       	           = idArity v
-    go (Lam x e) | isId x    	   = go e + 1
-    		 | otherwise 	   = go e
+    go (Var v)                     = idArity v
+    go (Lam x e) | isId x          = go e + 1
+                 | otherwise       = go e
     go (Tick t e) | not (tickishIsCode t) = go e
     go (Cast e co)                 = trim_arity (go e) (pSnd (coercionKind co))
                                         -- Note [exprArity invariant]
     go (App e (Type _))            = go e
     go (App f a) | exprIsTrivial a = (go f - 1) `max` 0
         -- See Note [exprArity for applications]
-	-- NB: coercions count as a value argument
+        -- NB: coercions count as a value argument
 
-    go _		       	   = 0
+    go _                           = 0
 
     trim_arity :: Arity -> Type -> Arity
     trim_arity arity ty = arity `min` length (typeArity ty)
@@ -119,13 +113,13 @@ typeArity ty
       , Just (ty', _) <- instNewTyCon_maybe tc tys
       , Just rec_nts' <- checkRecTc rec_nts tc  -- See Note [Expanding newtypes]
                                                 -- in TyCon
---   , not (isClassTyCon tc)	-- Do not eta-expand through newtype classes
---    		      		-- See Note [Newtype classes and eta expansion]
+--   , not (isClassTyCon tc)    -- Do not eta-expand through newtype classes
+--                              -- See Note [Newtype classes and eta expansion]
 --                              (no longer required)
       = go rec_nts' ty'
-  	-- Important to look through non-recursive newtypes, so that, eg 
-  	--	(f x)   where f has arity 2, f :: Int -> IO ()
-  	-- Here we want to get arity 1 for the result!
+        -- Important to look through non-recursive newtypes, so that, eg 
+        --      (f x)   where f has arity 2, f :: Int -> IO ()
+        -- Here we want to get arity 1 for the result!
         --
         -- AND through a layer of recursive newtypes
         -- e.g. newtype Stream m a b = Stream (m (Either b (a, Stream m a b)))
@@ -140,8 +134,8 @@ exprBotStrictness_maybe :: CoreExpr -> Maybe (Arity, StrictSig)
 -- float-out
 exprBotStrictness_maybe e
   = case getBotArity (arityType env e) of
-	Nothing -> Nothing
-	Just ar -> Just (ar, sig ar)
+        Nothing -> Nothing
+        Just ar -> Just (ar, sig ar)
   where
     env    = AE { ae_bndrs = [], ae_ped_bot = True, ae_cheap_fn = \ _ _ -> False }
     sig ar = mkStrictSig (mkTopDmdType (replicate ar topDmd) botRes)
@@ -243,9 +237,9 @@ When we come to an application we check that the arg is trivial.
 
 
 %************************************************************************
-%*									*
-	   Computing the "arity" of an expression
-%*									*
+%*                                                                      *
+           Computing the "arity" of an expression
+%*                                                                      *
 %************************************************************************
 
 Note [Definition of arity]
@@ -273,7 +267,7 @@ It's all a bit more subtle than it looks:
 Note [One-shot lambdas]
 ~~~~~~~~~~~~~~~~~~~~~~~
 Consider one-shot lambdas
-		let x = expensive in \y z -> E
+                let x = expensive in \y z -> E
 We want this to have arity 1 if the \y-abstraction is a 1-shot lambda.
 
 Note [Dealing with bottom]
@@ -289,7 +283,7 @@ In this case we do eta-expand, in order to get that \s to the
 top, and give f arity 2.
 
 This isn't really right in the presence of seq.  Consider
-	(f bot) `seq` 1
+        (f bot) `seq` 1
 
 This should diverge!  But if we eta-expand, it won't.  We ignore this
 "problem" (unless -fpedantic-bottoms is on), because being scrupulous
@@ -297,13 +291,13 @@ would lose an important transformation for many programs. (See
 Trac #5587 for an example.)
 
 Consider also
-	f = \x -> error "foo"
+        f = \x -> error "foo"
 Here, arity 1 is fine.  But if it is
-	f = \x -> case x of 
-			True  -> error "foo"
-			False -> \y -> x+y
+        f = \x -> case x of 
+                        True  -> error "foo"
+                        False -> \y -> x+y
 then we want to get arity 2.  Technically, this isn't quite right, because
-	(f True) `seq` 1
+        (f True) `seq` 1
 should diverge, but it'll converge if we eta-expand f.  Nevertheless, we
 do so; it improves some programs significantly, and increasing convergence
 isn't a bad thing.  Hence the ABot/ATop in ArityType.
@@ -339,34 +333,34 @@ Of course both (1) and (2) are readily defeated by disguising the bottoms.
 Non-recursive newtypes are transparent, and should not get in the way.
 We do (currently) eta-expand recursive newtypes too.  So if we have, say
 
-	newtype T = MkT ([T] -> Int)
+        newtype T = MkT ([T] -> Int)
 
 Suppose we have
-	e = coerce T f
+        e = coerce T f
 where f has arity 1.  Then: etaExpandArity e = 1; 
 that is, etaExpandArity looks through the coerce.
 
 When we eta-expand e to arity 1: eta_expand 1 e T
-we want to get: 		 coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
+we want to get:                  coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
 
   HOWEVER, note that if you use coerce bogusly you can ge
-  	coerce Int negate
+        coerce Int negate
   And since negate has arity 2, you might try to eta expand.  But you can't
   decopose Int to a function type.   Hence the final case in eta_expand.
   
 Note [The state-transformer hack]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Suppose we have 
-	f = e
+        f = e
 where e has arity n.  Then, if we know from the context that f has
 a usage type like
-	t1 -> ... -> tn -1-> t(n+1) -1-> ... -1-> tm -> ...
+        t1 -> ... -> tn -1-> t(n+1) -1-> ... -1-> tm -> ...
 then we can expand the arity to m.  This usage type says that
 any application (x e1 .. en) will be applied to uniquely to (m-n) more args
 Consider f = \x. let y = <expensive> 
-		 in case x of
-		      True  -> foo
-		      False -> \(s:RealWorld) -> e
+                 in case x of
+                      True  -> foo
+                      False -> \(s:RealWorld) -> e
 where foo has arity 1.  Then we want the state hack to
 apply to foo too, so we can eta expand the case.
 
@@ -469,8 +463,8 @@ Example:
 
 Suppose f = \xy. x+y
 Then  f             :: AT [False,False] ATop
-      f v           :: AT [False] 	ATop
-      f <expensive> :: AT [] 	        ATop
+      f v           :: AT [False]       ATop
+      f <expensive> :: AT []            ATop
 
 -------------------- Main arity code ----------------------------
 \begin{code}
@@ -481,22 +475,22 @@ data ArityType = ATop [OneShot] | ABot Arity
 
 type OneShot = Bool    -- False <=> Know nothing
                        -- True  <=> Can definitely float inside this lambda
-	               -- The 'True' case can arise either because a binder
-		       -- is marked one-shot, or because it's a state lambda
-		       -- and we have the state hack on
+                       -- The 'True' case can arise either because a binder
+                       -- is marked one-shot, or because it's a state lambda
+                       -- and we have the state hack on
 
 vanillaArityType :: ArityType
-vanillaArityType = ATop []	-- Totally uninformative
+vanillaArityType = ATop []      -- Totally uninformative
 
 -- ^ The Arity returned is the number of value args the
 -- expression can be applied to without doing much work
 exprEtaExpandArity :: DynFlags -> CheapAppFun -> CoreExpr -> Arity
 -- exprEtaExpandArity is used when eta expanding
--- 	e  ==>  \xy -> e x y
+--      e  ==>  \xy -> e x y
 exprEtaExpandArity dflags cheap_app e
   = case (arityType env e) of
       ATop (os:oss) 
-        | os || has_lam e -> 1 + length oss	-- Note [Eta expanding thunks]
+        | os || has_lam e -> 1 + length oss     -- Note [Eta expanding thunks]
         | otherwise       -> 0
       ATop []             -> 0
       ABot n              -> n
@@ -532,9 +526,9 @@ dictionary bindings.  This improves arities. Thereby, it also
 means that full laziness is less prone to floating out the
 application of a function to its dictionary arguments, which
 can thereby lose opportunities for fusion.  Example:
-	foo :: Ord a => a -> ...
+        foo :: Ord a => a -> ...
      foo = /\a \(d:Ord a). let d' = ...d... in \(x:a). ....
-     	-- So foo has arity 1
+        -- So foo has arity 1
 
      f = \x. foo dInt $ bar x
 
@@ -555,7 +549,7 @@ should we eta-expand it? Well, if 'x' is a one-shot state token
 then 'yes' because 'f' will only be applied once.  But otherwise
 we (conservatively) say no.  My main reason is to avoid expanding
 PAPSs
-	f = g d  ==>  f = \x. g d x
+        f = g d  ==>  f = \x. g d x
 because that might in turn make g inline (if it has an inline pragma), 
 which we might not want.  After all, INLINE pragmas say "inline only
 when saturated" so we don't want to be too gung-ho about saturating!
@@ -587,7 +581,7 @@ andArityType (ABot n1) (ABot n2)
 andArityType (ATop as)  (ABot _)  = ATop as
 andArityType (ABot _)   (ATop bs) = ATop bs
 andArityType (ATop as)  (ATop bs) = ATop (as `combine` bs)
-  where	     -- See Note [Combining case branches]
+  where      -- See Note [Combining case branches]
     combine (a:as) (b:bs) = (a && b) : combine as bs
     combine []     bs     = take_one_shots bs
     combine as     []     = take_one_shots as
@@ -617,9 +611,9 @@ lambda wasn't one-shot we don't want to do this.
 \begin{code}
 ---------------------------
 type CheapFun = CoreExpr -> Maybe Type -> Bool
-     	-- How to decide if an expression is cheap
-	-- If the Maybe is Just, the type is the type
-	-- of the expression; Nothing means "don't know"
+        -- How to decide if an expression is cheap
+        -- If the Maybe is Just, the type is the type
+        -- of the expression; Nothing means "don't know"
 
 data ArityEnv 
   = AE { ae_bndrs :: [Id]          -- Enclosing value-lambda Ids
@@ -653,17 +647,17 @@ arityType _ (Var v)
   | otherwise
   = ATop (take (idArity v) one_shots)
   where
-    one_shots :: [Bool]	    -- One-shot-ness derived from the type
+    one_shots :: [Bool]     -- One-shot-ness derived from the type
     one_shots = typeArity (idType v)
 
-	-- Lambdas; increase arity
+        -- Lambdas; increase arity
 arityType env (Lam x e)
   | isId x    = arityLam x (arityType env' e)
   | otherwise = arityType env e
   where
     env' = env { ae_bndrs = x : ae_bndrs env }
 
-	-- Applications; decrease arity, except for types
+        -- Applications; decrease arity, except for types
 arityType env (App fun (Type _))
    = arityType env fun
 arityType env (App fun arg )
@@ -672,14 +666,14 @@ arityType env (App fun arg )
      env' = env { ae_bndrs = case ae_bndrs env of
                                 { [] -> []; (_:xs) -> xs } }
 
-	-- Case/Let; keep arity if either the expression is cheap
-	-- or it's a 1-shot lambda
-	-- The former is not really right for Haskell
-	--	f x = case x of { (a,b) -> \y. e }
-	--  ===>
-	--	f x y = case x of { (a,b) -> e }
-	-- The difference is observable using 'seq'
-	--
+        -- Case/Let; keep arity if either the expression is cheap
+        -- or it's a 1-shot lambda
+        -- The former is not really right for Haskell
+        --      f x = case x of { (a,b) -> \y. e }
+        --  ===>
+        --      f x y = case x of { (a,b) -> e }
+        -- The difference is observable using 'seq'
+        --
 arityType env (Case scrut _ _ alts)
   | exprIsBottom scrut || null alts
   = ABot 0     -- Do not eta expand
@@ -687,13 +681,13 @@ arityType env (Case scrut _ _ alts)
   | otherwise
   = case alts_type of
      ABot n  | n>0       -> ATop []    -- Don't eta expand 
-     	     | otherwise -> ABot 0     -- if RHS is bottomming
-    			               -- See Note [Dealing with bottom (2)]
+             | otherwise -> ABot 0     -- if RHS is bottomming
+                                       -- See Note [Dealing with bottom (2)]
 
      ATop as | not (ae_ped_bot env)    -- Check -fpedantic-bottoms
              , is_under scrut             -> ATop as
              | exprOkForSpeculation scrut -> ATop as
-             | otherwise                  -> ATop (takeWhile id as)	    
+             | otherwise                  -> ATop (takeWhile id as)         
   where
     -- is_under implements Note [Dealing with bottom (3)]
     is_under (Var f)           = f `elem` ae_bndrs env
@@ -718,29 +712,29 @@ arityType _ _ = vanillaArityType
   
   
 %************************************************************************
-%*									*
-              The main eta-expander								
-%*									*
+%*                                                                      *
+              The main eta-expander                                                             
+%*                                                                      *
 %************************************************************************
 
 We go for:
    f = \x1..xn -> N  ==>   f = \x1..xn y1..ym -> N y1..ym
-				 (n >= 0)
+                                 (n >= 0)
 
 where (in both cases) 
 
-	* The xi can include type variables
+        * The xi can include type variables
 
-	* The yi are all value variables
+        * The yi are all value variables
 
-	* N is a NORMAL FORM (i.e. no redexes anywhere)
-	  wanting a suitable number of extra args.
+        * N is a NORMAL FORM (i.e. no redexes anywhere)
+          wanting a suitable number of extra args.
 
 The biggest reason for doing this is for cases like
 
-	f = \x -> case x of
-		    True  -> \y -> e1
-		    False -> \y -> e2
+        f = \x -> case x of
+                    True  -> \y -> e1
+                    False -> \y -> e2
 
 Here we want to get the lambdas together.  A good example is the nofib
 program fibheaps, which gets 25% more allocation if you don't do this
@@ -766,8 +760,8 @@ means you can't really use it in CorePrep, which is painful.
 Note [Eta expansion and SCCs]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Note that SCCs are not treated specially by etaExpand.  If we have
-	etaExpand 2 (\x -> scc "foo" e)
-	= (\xy -> (scc "foo" e) y)
+        etaExpand 2 (\x -> scc "foo" e)
+        = (\xy -> (scc "foo" e) y)
 So the costs of evaluating 'e' (not 'e y') are attributed to "foo"
 
 \begin{code}
@@ -781,14 +775,14 @@ So the costs of evaluating 'e' (not 'e y') are attributed to "foo"
 -- We should have that:
 --
 -- > ty = exprType e = exprType e'
-etaExpand :: Arity	  	-- ^ Result should have this number of value args
-	  -> CoreExpr	        -- ^ Expression to expand
-	  -> CoreExpr
+etaExpand :: Arity              -- ^ Result should have this number of value args
+          -> CoreExpr           -- ^ Expression to expand
+          -> CoreExpr
 -- etaExpand deals with for-alls. For example:
---		etaExpand 1 E
+--              etaExpand 1 E
 -- where  E :: forall a. a -> a
 -- would return
---	(/\b. \y::a -> E b y)
+--      (/\b. \y::a -> E b y)
 --
 -- It deals with coerces too, though they are now rare
 -- so perhaps the extra code isn't worth it
@@ -800,20 +794,20 @@ etaExpand n orig_expr
       -- Note [Eta expansion and SCCs]
     go 0 expr = expr
     go n (Lam v body) | isTyVar v = Lam v (go n     body)
-       	              | otherwise = Lam v (go (n-1) body)
+                      | otherwise = Lam v (go (n-1) body)
     go n (Cast expr co) = Cast (go n expr) co
     go n expr           = -- pprTrace "ee" (vcat [ppr orig_expr, ppr expr, ppr etas]) $
-       	 		  etaInfoAbs etas (etaInfoApp subst' expr etas)
-    	  		where
-			    in_scope = mkInScopeSet (exprFreeVars expr)
-			    (in_scope', etas) = mkEtaWW n orig_expr in_scope (exprType expr)
-			    subst' = mkEmptySubst in_scope'
+                          etaInfoAbs etas (etaInfoApp subst' expr etas)
+                        where
+                            in_scope = mkInScopeSet (exprFreeVars expr)
+                            (in_scope', etas) = mkEtaWW n orig_expr in_scope (exprType expr)
+                            subst' = mkEmptySubst in_scope'
 
-      	      	       	        -- Wrapper    Unwrapper
+                                -- Wrapper    Unwrapper
 --------------
-data EtaInfo = EtaVar Var	-- /\a. [],   [] a
-     	                 	-- \x.  [],   [] x
-	     | EtaCo Coercion   -- [] |> co,  [] |> (sym co)
+data EtaInfo = EtaVar Var       -- /\a. [],   [] a
+                                -- \x.  [],   [] x
+             | EtaCo Coercion   -- [] |> co,  [] |> (sym co)
 
 instance Outputable EtaInfo where
    ppr (EtaVar v) = ptext (sLit "EtaVar") <+> ppr v
@@ -822,7 +816,7 @@ instance Outputable EtaInfo where
 pushCoercion :: Coercion -> [EtaInfo] -> [EtaInfo]
 pushCoercion co1 (EtaCo co2 : eis)
   | isReflCo co = eis
-  | otherwise	= EtaCo co : eis
+  | otherwise   = EtaCo co : eis
   where
     co = co1 `mkTransCo` co2
 
@@ -837,7 +831,7 @@ etaInfoAbs (EtaCo co : eis) expr = Cast (etaInfoAbs eis expr) (mkSymCo co)
 --------------
 etaInfoApp :: Subst -> CoreExpr -> [EtaInfo] -> CoreExpr
 -- (etaInfoApp s e eis) returns something equivalent to 
--- 	       ((substExpr s e) `appliedto` eis)
+--             ((substExpr s e) `appliedto` eis)
 
 etaInfoApp subst (Lam v1 e) (EtaVar v2 : eis) 
   = etaInfoApp (CoreSubst.extendSubstWithVar subst v1 v2) e eis
@@ -853,8 +847,8 @@ etaInfoApp subst (Case e b ty alts) eis
     (subst1, b1) = substBndr subst b
     alts' = map subst_alt alts
     subst_alt (con, bs, rhs) = (con, bs', etaInfoApp subst2 rhs eis) 
-    	      where
-	      	 (subst2,bs') = substBndrs subst1 bs
+              where
+                 (subst2,bs') = substBndrs subst1 bs
 
     mk_alts_ty ty []               = ty
     mk_alts_ty ty (EtaVar v : eis) = mk_alts_ty (applyTypeToArg ty (varToCoreExpr v)) eis
@@ -877,18 +871,18 @@ etaInfoApp subst e eis
 
 --------------
 mkEtaWW :: Arity -> CoreExpr -> InScopeSet -> Type
-	-> (InScopeSet, [EtaInfo])
-	-- EtaInfo contains fresh variables,
-	--   not free in the incoming CoreExpr
-	-- Outgoing InScopeSet includes the EtaInfo vars
-	--   and the original free vars
+        -> (InScopeSet, [EtaInfo])
+        -- EtaInfo contains fresh variables,
+        --   not free in the incoming CoreExpr
+        -- Outgoing InScopeSet includes the EtaInfo vars
+        --   and the original free vars
 
 mkEtaWW orig_n orig_expr in_scope orig_ty
   = go orig_n empty_subst orig_ty []
   where
     empty_subst = TvSubst in_scope emptyTvSubstEnv
 
-    go n subst ty eis	    -- See Note [exprArity invariant]
+    go n subst ty eis       -- See Note [exprArity invariant]
        | n == 0
        = (getTvInScope subst, reverse eis)
 
@@ -901,25 +895,25 @@ mkEtaWW orig_n orig_expr in_scope orig_ty
        , let (subst', eta_id') = freshEtaId n subst arg_ty 
            -- Avoid free vars of the original expression
        = go (n-1) subst' res_ty (EtaVar eta_id' : eis)
-       				   
+                                   
        | Just(ty',co) <- splitNewTypeRepCo_maybe ty
-       = 	-- Given this:
-       		-- 	newtype T = MkT ([T] -> Int)
-       		-- Consider eta-expanding this
-       		--  	eta_expand 1 e T
-       		-- We want to get
-       		--	coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
+       =        -- Given this:
+                --      newtype T = MkT ([T] -> Int)
+                -- Consider eta-expanding this
+                --      eta_expand 1 e T
+                -- We want to get
+                --      coerce T (\x::[T] -> (coerce ([T]->Int) e) x)
          go n subst ty' (EtaCo co : eis)
 
-       | otherwise	 -- We have an expression of arity > 0, 
-       	 		 -- but its type isn't a function. 		   
+       | otherwise       -- We have an expression of arity > 0, 
+                         -- but its type isn't a function.                 
        = WARN( True, (ppr orig_n <+> ppr orig_ty) $$ ppr orig_expr )
          (getTvInScope subst, reverse eis)
-    	-- This *can* legitmately happen:
-    	-- e.g.  coerce Int (\x. x) Essentially the programmer is
-	-- playing fast and loose with types (Happy does this a lot).
-	-- So we simply decline to eta-expand.  Otherwise we'd end up
-	-- with an explicit lambda having a non-function type
+        -- This *can* legitmately happen:
+        -- e.g.  coerce Int (\x. x) Essentially the programmer is
+        -- playing fast and loose with types (Happy does this a lot).
+        -- So we simply decline to eta-expand.  Otherwise we'd end up
+        -- with an explicit lambda having a non-function type
    
 
 --------------
@@ -945,8 +939,8 @@ freshEtaId n subst ty
       = (subst', eta_id')
       where
         ty'     = Type.substTy subst ty
-	eta_id' = uniqAway (getTvInScope subst) $
-		  mkSysLocal (fsLit "eta") (mkBuiltinUnique n) ty'
-	subst'  = extendTvInScope subst eta_id'		  
+        eta_id' = uniqAway (getTvInScope subst) $
+                  mkSysLocal (fsLit "eta") (mkBuiltinUnique n) ty'
+        subst'  = extendTvInScope subst eta_id'           
 \end{code}
 
diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index 2b76a4a..3222ee7 100644
--- a/compiler/coreSyn/CoreLint.lhs
+++ b/compiler/coreSyn/CoreLint.lhs
@@ -7,12 +7,6 @@
 A ``lint'' pass to check for Core correctness
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# OPTIONS_GHC -fprof-auto #-}
 
@@ -70,9 +64,9 @@ the Core language (all signposted to this note), you should update that
 formalism. See docs/core-spec/README for more info about how to do so.
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lintCoreBindings]{@lintCoreBindings@: Top-level interface}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Checks that a set of core bindings is well-formed.  The PprStyle and String
@@ -81,13 +75,13 @@ indicates whether we have done any specialisation yet (in which case we do
 some extra checks).
 
 We check for
-	(a) type errors
-	(b) Out-of-scope type variables
-	(c) Out-of-scope local variables
-	(d) Ill-kinded types
+        (a) type errors
+        (b) Out-of-scope type variables
+        (c) Out-of-scope local variables
+        (d) Ill-kinded types
 
 If we have done specialisation the we check that there are
-	(a) No top-level bindings of primitive (unboxed type)
+        (a) No top-level bindings of primitive (unboxed type)
 
 Outstanding issues:
 
@@ -103,13 +97,13 @@ Outstanding issues:
 Note [Linting type lets]
 ~~~~~~~~~~~~~~~~~~~~~~~~
 In the desugarer, it's very very convenient to be able to say (in effect)
-	let a = Type Int in <body>
+        let a = Type Int in <body>
 That is, use a type let.   See Note [Type let] in CoreSyn.
 
 However, when linting <body> we need to remember that a=Int, else we might
 reject a correct program.  So we carry a type substitution (in this example 
 [a -> Int]) and apply this substitution before comparing types.  The functin
-	lintInTy :: Type -> LintM Type
+        lintInTy :: Type -> LintM Type
 returns a substituted type; that's the only reason it returns anything.
 
 When we encounter a binder (like x::a) we must apply the substitution
@@ -130,9 +124,9 @@ lintCoreBindings local_in_scope binds
     addLoc TopLevelBindings        $
     addInScopeVars local_in_scope  $
     addInScopeVars binders         $
-	-- Put all the top-level binders in scope at the start
-	-- This is because transformation rules can bring something
-	-- into use 'unexpectedly'
+        -- Put all the top-level binders in scope at the start
+        -- This is because transformation rules can bring something
+        -- into use 'unexpectedly'
     do { checkL (null dups) (dupVars dups)
        ; checkL (null ext_dups) (dupExtVars ext_dups)
        ; mapM lint_bind binds }
@@ -154,14 +148,14 @@ lintCoreBindings local_in_scope binds
 
     -- If you edit this function, you may need to update the GHC formalism
     -- See Note [GHC Formalism]
-    lint_bind (Rec prs)		= mapM_ (lintSingleBinding TopLevel Recursive) prs
+    lint_bind (Rec prs)         = mapM_ (lintSingleBinding TopLevel Recursive) prs
     lint_bind (NonRec bndr rhs) = lintSingleBinding TopLevel NonRecursive (bndr,rhs)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lintUnfolding]{lintUnfolding}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 We use this to check all unfoldings that come in from interfaces
@@ -169,35 +163,35 @@ We use this to check all unfoldings that come in from interfaces
 
 \begin{code}
 lintUnfolding :: SrcLoc
-	      -> [Var]		-- Treat these as in scope
-	      -> CoreExpr
-	      -> Maybe MsgDoc	-- Nothing => OK
+              -> [Var]          -- Treat these as in scope
+              -> CoreExpr
+              -> Maybe MsgDoc   -- Nothing => OK
 
 lintUnfolding locn vars expr
   | isEmptyBag errs = Nothing
   | otherwise       = Just (pprMessageBag errs)
   where
     (_warns, errs) = initL (addLoc (ImportedUnfolding locn) $
-                            addInScopeVars vars	           $
+                            addInScopeVars vars            $
                             lintCoreExpr expr)
 
-lintExpr :: [Var]		-- Treat these as in scope
-	 -> CoreExpr
-	 -> Maybe MsgDoc	-- Nothing => OK
+lintExpr :: [Var]               -- Treat these as in scope
+         -> CoreExpr
+         -> Maybe MsgDoc        -- Nothing => OK
 
 lintExpr vars expr
   | isEmptyBag errs = Nothing
   | otherwise       = Just (pprMessageBag errs)
   where
     (_warns, errs) = initL (addLoc TopLevelBindings $
-                            addInScopeVars vars	    $
+                            addInScopeVars vars     $
                             lintCoreExpr expr)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lintCoreBinding]{lintCoreBinding}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Check a core binding, returning the list of variables bound.
@@ -209,7 +203,7 @@ lintSingleBinding :: TopLevelFlag -> RecFlag -> (Id, CoreExpr) -> LintM ()
 lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
   = addLoc (RhsOf binder) $
          -- Check the rhs 
-    do { ty <- lintCoreExpr rhs	
+    do { ty <- lintCoreExpr rhs 
        ; lintBinder binder -- Check match to RHS type
        ; binder_ty <- applySubstTy binder_ty
        ; checkTys binder_ty ty (mkRhsMsg binder (ptext (sLit "RHS")) ty)
@@ -217,7 +211,7 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
         -- Check (not isUnLiftedType) (also checks for bogus unboxed tuples)
        ; checkL (not (isUnLiftedType binder_ty)
             || (isNonRec rec_flag && exprOkForSpeculation rhs))
- 	   (mkRhsPrimMsg binder rhs)
+           (mkRhsPrimMsg binder rhs)
 
         -- Check that if the binder is top-level or recursive, it's not demanded
        ; checkL (not (isStrictId binder)
@@ -236,7 +230,7 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
 
        ; when (isStrongLoopBreaker (idOccInfo binder) && isInlinePragma (idInlinePragma binder))
               (addWarnL (ptext (sLit "INLINE binder is (non-rule) loop breaker:") <+> ppr binder))
-	      -- Only non-rule loop breakers inhibit inlining
+              -- Only non-rule loop breakers inhibit inlining
 
       -- Check whether arity and demand type are consistent (only if demand analysis
       -- already happened)
@@ -245,9 +239,9 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
            (mkArityMsg binder)
 
        ; lintIdUnfolding binder binder_ty (idUnfolding binder) }
-	  
-	-- We should check the unfolding, if any, but this is tricky because
- 	-- the unfolding is a SimplifiableCoreExpr. Give up for now.
+          
+        -- We should check the unfolding, if any, but this is tricky because
+        -- the unfolding is a SimplifiableCoreExpr. Give up for now.
    where
     binder_ty                  = idType binder
     dmdTy                      = idStrictness binder
@@ -256,7 +250,7 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
     -- If you edit this function, you may need to update the GHC formalism
     -- See Note [GHC Formalism]
     lintBinder var | isId var  = lintIdBndr var $ \_ -> (return ())
-	           | otherwise = return ()
+                   | otherwise = return ()
 
 lintIdUnfolding :: Id -> Type -> Unfolding -> LintM ()
 lintIdUnfolding bndr bndr_ty (CoreUnfolding { uf_tmpl = rhs, uf_src = src })
@@ -268,23 +262,23 @@ lintIdUnfolding  _ _ _
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lintCoreExpr]{lintCoreExpr}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
---type InKind      = Kind	-- Substitution not yet applied
-type InType      = Type	
+--type InKind      = Kind       -- Substitution not yet applied
+type InType      = Type 
 type InCoercion  = Coercion
 type InVar       = Var
 type InTyVar     = TyVar
 
-type OutKind     = Kind	-- Substitution has been applied to this,
+type OutKind     = Kind -- Substitution has been applied to this,
                         -- but has not been linted yet
 type LintedKind  = Kind -- Substitution applied, and type is linted
 
-type OutType     = Type	-- Substitution has been applied to this,
+type OutType     = Type -- Substitution has been applied to this,
                         -- but has not been linted yet
 
 type LintedType  = Type -- Substitution applied, and type is linted
@@ -296,21 +290,21 @@ type OutTyVar    = TyVar
 lintCoreExpr :: CoreExpr -> LintM OutType
 -- The returned type has the substitution from the monad 
 -- already applied to it:
---	lintCoreExpr e subst = exprType (subst e)
+--      lintCoreExpr e subst = exprType (subst e)
 --
 -- The returned "type" can be a kind, if the expression is (Type ty)
 
 -- If you edit this function, you may need to update the GHC formalism
 -- See Note [GHC Formalism]
 lintCoreExpr (Var var)
-  = do	{ checkL (not (var == oneTupleDataConId))
-		 (ptext (sLit "Illegal one-tuple"))
+  = do  { checkL (not (var == oneTupleDataConId))
+                 (ptext (sLit "Illegal one-tuple"))
 
         ; checkL (isId var && not (isCoVar var))
                  (ptext (sLit "Non term variable") <+> ppr var)
 
         ; checkDeadIdOcc var
-	; var' <- lookupIdInScope var
+        ; var' <- lookupIdInScope var
         ; return (idType var') }
 
 lintCoreExpr (Lit lit)
@@ -335,30 +329,30 @@ lintCoreExpr (Tick _other_tickish expr)
 
 lintCoreExpr (Let (NonRec tv (Type ty)) body)
   | isTyVar tv
-  =	-- See Note [Linting type lets]
-    do	{ ty' <- applySubstTy ty
+  =     -- See Note [Linting type lets]
+    do  { ty' <- applySubstTy ty
         ; lintTyBndr tv              $ \ tv' -> 
     do  { addLoc (RhsOf tv) $ checkTyKind tv' ty'
-		-- Now extend the substitution so we 
-		-- take advantage of it in the body
+                -- Now extend the substitution so we 
+                -- take advantage of it in the body
         ; extendSubstL tv' ty'       $ 
           addLoc (BodyOfLetRec [tv]) $ 
           lintCoreExpr body } }
 
 lintCoreExpr (Let (NonRec bndr rhs) body)
   | isId bndr
-  = do	{ lintSingleBinding NotTopLevel NonRecursive (bndr,rhs)
-	; addLoc (BodyOfLetRec [bndr]) 
-		 (lintAndScopeId bndr $ \_ -> (lintCoreExpr body)) }
+  = do  { lintSingleBinding NotTopLevel NonRecursive (bndr,rhs)
+        ; addLoc (BodyOfLetRec [bndr]) 
+                 (lintAndScopeId bndr $ \_ -> (lintCoreExpr body)) }
 
   | otherwise
-  = failWithL (mkLetErr bndr rhs)	-- Not quite accurate
+  = failWithL (mkLetErr bndr rhs)       -- Not quite accurate
 
 lintCoreExpr (Let (Rec pairs) body) 
-  = lintAndScopeIds bndrs	$ \_ ->
-    do	{ checkL (null dups) (dupVars dups)
-        ; mapM_ (lintSingleBinding NotTopLevel Recursive) pairs	
-	; addLoc (BodyOfLetRec bndrs) (lintCoreExpr body) }
+  = lintAndScopeIds bndrs       $ \_ ->
+    do  { checkL (null dups) (dupVars dups)
+        ; mapM_ (lintSingleBinding NotTopLevel Recursive) pairs 
+        ; addLoc (BodyOfLetRec bndrs) (lintCoreExpr body) }
   where
     bndrs = map fst pairs
     (_, dups) = removeDups compare bndrs
@@ -375,29 +369,29 @@ lintCoreExpr (Lam var expr)
     do { body_ty <- lintCoreExpr expr
        ; if isId var' then 
              return (mkFunTy (idType var') body_ty) 
-	 else
-	     return (mkForAllTy var' body_ty)
+         else
+             return (mkForAllTy var' body_ty)
        }
-	-- The applySubstTy is needed to apply the subst to var
+        -- The applySubstTy is needed to apply the subst to var
 
 lintCoreExpr e@(Case scrut var alt_ty alts) =
        -- Check the scrutinee
   do { scrut_ty <- lintCoreExpr scrut
      ; alt_ty   <- lintInTy alt_ty  
-     ; var_ty   <- lintInTy (idType var)	
+     ; var_ty   <- lintInTy (idType var)        
 
      ; case tyConAppTyCon_maybe (idType var) of 
          Just tycon
               | debugIsOn &&
                 isAlgTyCon tycon && 
-		not (isFamilyTyCon tycon || isAbstractTyCon tycon) &&
+                not (isFamilyTyCon tycon || isAbstractTyCon tycon) &&
                 null (tyConDataCons tycon) -> 
                   pprTrace "Lint warning: case binder's type has no constructors" (ppr var <+> ppr (idType var))
-			-- This can legitimately happen for type families
+                        -- This can legitimately happen for type families
                       $ return ()
          _otherwise -> return ()
 
-	-- Don't use lintIdBndr on var, because unboxed tuple is legitimate
+        -- Don't use lintIdBndr on var, because unboxed tuple is legitimate
 
      ; subst <- getTvSubst 
      ; checkTys var_ty scrut_ty (mkScrutMsg var var_ty scrut_ty subst)
@@ -439,9 +433,9 @@ applied in the type variables:
   k_ag   ~~>   * -> *
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lintCoreArgs]{lintCoreArgs}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The basic version of these functions checks that the argument is a
@@ -459,7 +453,7 @@ lintCoreArg fun_ty arg
 
 -----------------
 lintAltBinders :: OutType     -- Scrutinee type
-	       -> OutType     -- Constructor type
+               -> OutType     -- Constructor type
                -> [OutVar]    -- Binders
                -> LintM ()
 -- If you edit this function, you may need to update the GHC formalism
@@ -479,7 +473,7 @@ lintTyApp :: OutType -> OutType -> LintM OutType
 lintTyApp fun_ty arg_ty
   | Just (tyvar,body_ty) <- splitForAllTy_maybe fun_ty
   , isTyVar tyvar
-  = do	{ checkTyKind tyvar arg_ty
+  = do  { checkTyKind tyvar arg_ty
         ; return (substTyWith [tyvar] [arg_ty] body_ty) }
 
   | otherwise
@@ -507,10 +501,10 @@ checkTyKind :: OutTyVar -> OutType -> LintM ()
 checkTyKind tyvar arg_ty
   | isSuperKind tyvar_kind  -- kind forall
   = lintKind arg_ty
-	-- Arg type might be boxed for a function with an uncommitted
-	-- tyvar; notably this is used so that we can give
-	-- 	error :: forall a:*. String -> a
-	-- and then apply it to both boxed and unboxed types.
+        -- Arg type might be boxed for a function with an uncommitted
+        -- tyvar; notably this is used so that we can give
+        --      error :: forall a:*. String -> a
+        -- and then apply it to both boxed and unboxed types.
   | otherwise  -- type forall
   = do { arg_kind <- lintType arg_ty
        ; unless (arg_kind `isSubKind` tyvar_kind)
@@ -525,16 +519,16 @@ checkDeadIdOcc id
   | isDeadOcc (idOccInfo id)
   = do { in_case <- inCasePat
        ; checkL in_case
-		(ptext (sLit "Occurrence of a dead Id") <+> ppr id) }
+                (ptext (sLit "Occurrence of a dead Id") <+> ppr id) }
   | otherwise
   = return ()
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lintCoreAlts]{lintCoreAlts}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -551,11 +545,11 @@ checkCaseAlts e ty alts =
   do { checkL (all non_deflt con_alts) (mkNonDefltMsg e)
      ; checkL (increasing_tag con_alts) (mkNonIncreasingAltsMsg e)
      ; checkL (isJust maybe_deflt || not is_infinite_ty)
-	   (nonExhaustiveAltsMsg e) }
+           (nonExhaustiveAltsMsg e) }
   where
     (con_alts, maybe_deflt) = findDefault alts
 
-	-- Check that successive alternatives have increasing tags 
+        -- Check that successive alternatives have increasing tags 
     increasing_tag (alt1 : rest@( alt2 : _)) = alt1 `ltAlt` alt2 && increasing_tag rest
     increasing_tag _                         = True
 
@@ -573,10 +567,10 @@ checkAltExpr expr ann_ty
   = do { actual_ty <- lintCoreExpr expr 
        ; checkTys actual_ty ann_ty (mkCaseAltMsg expr actual_ty ann_ty) }
 
-lintCoreAlt :: OutType 		-- Type of scrutinee
+lintCoreAlt :: OutType          -- Type of scrutinee
             -> OutType          -- Type of the alternative
-	    -> CoreAlt
-	    -> LintM ()
+            -> CoreAlt
+            -> LintM ()
 -- If you edit this function, you may need to update the GHC formalism
 -- See Note [GHC Formalism]
 lintCoreAlt _ alt_ty (DEFAULT, args, rhs) =
@@ -599,24 +593,24 @@ lintCoreAlt scrut_ty alt_ty alt@(DataAlt con, args, rhs)
   | Just (tycon, tycon_arg_tys) <- splitTyConApp_maybe scrut_ty
   = addLoc (CaseAlt alt) $  do
     {   -- First instantiate the universally quantified 
-	-- type variables of the data constructor
-	-- We've already check
+        -- type variables of the data constructor
+        -- We've already check
       checkL (tycon == dataConTyCon con) (mkBadConMsg tycon con)
     ; let con_payload_ty = applyTys (dataConRepType con) tycon_arg_tys
 
-	-- And now bring the new binders into scope
+        -- And now bring the new binders into scope
     ; lintBinders args $ \ args' -> do
     { addLoc (CasePat alt) (lintAltBinders scrut_ty con_payload_ty args')
     ; checkAltExpr rhs alt_ty } }
 
-  | otherwise	-- Scrut-ty is wrong shape
+  | otherwise   -- Scrut-ty is wrong shape
   = addErrL (mkBadAltMsg scrut_ty alt)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lint-types]{Types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -627,8 +621,8 @@ lintCoreAlt scrut_ty alt_ty alt@(DataAlt con, args, rhs)
 lintBinders :: [Var] -> ([Var] -> LintM a) -> LintM a
 lintBinders [] linterF = linterF []
 lintBinders (var:vars) linterF = lintBinder var $ \var' ->
-				 lintBinders vars $ \ vars' ->
-				 linterF (var':vars')
+                                 lintBinders vars $ \ vars' ->
+                                 linterF (var':vars')
 
 -- If you edit this function, you may need to update the GHC formalism
 -- See Note [GHC Formalism]
@@ -650,7 +644,7 @@ lintIdBndr :: Id -> (Id -> LintM a) -> LintM a
 -- ToDo: lint its rules
 
 lintIdBndr id linterF 
-  = do 	{ lintAndScopeId id $ \id' -> linterF id' }
+  = do  { lintAndScopeId id $ \id' -> linterF id' }
 
 lintAndScopeIds :: [Var] -> ([Var] -> LintM a) -> LintM a
 lintAndScopeIds ids linterF 
@@ -670,9 +664,9 @@ lintAndScopeId id linterF
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Types and kinds
-%*									*
+%*                                                                      *
 %************************************************************************
 
 We have a single linter for types and kinds.  That is convenient
@@ -686,9 +680,9 @@ lintInTy :: InType -> LintM LintedType
 -- See Note [Linting type lets]
 lintInTy ty 
   = addLoc (InType ty) $
-    do	{ ty' <- applySubstTy ty
-	; _k  <- lintType ty'
-	; return ty' }
+    do  { ty' <- applySubstTy ty
+        ; _k  <- lintType ty'
+        ; return ty' }
 
 -------------------
 lintTyBndrKind :: OutTyVar -> LintM ()
@@ -811,9 +805,9 @@ lint_app doc kfn kas
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
          Linting coercions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -947,7 +941,7 @@ lintCoercion (InstCo co arg_ty)
                           substTyWith [tv2] [arg_ty] ty2, r) 
             | otherwise
             -> failWithL (ptext (sLit "Kind mis-match in inst coercion"))
-	  _ -> failWithL (ptext (sLit "Bad argument of inst")) }
+          _ -> failWithL (ptext (sLit "Bad argument of inst")) }
 
 lintCoercion co@(AxiomInstCo con ind cos)
   = do { unless (0 <= ind && ind < brListLength (coAxiomBranches con))
@@ -1038,9 +1032,9 @@ lintCoercion this@(AxiomRuleCo co ts cs)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[lint-monad]{The Lint monad}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1051,25 +1045,25 @@ newtype LintM a =
    LintM { unLintM :: 
             [LintLocInfo] ->         -- Locations
             TvSubst ->               -- Current type substitution; we also use this
-				     -- to keep track of all the variables in scope,
-				     -- both Ids and TyVars
-	    WarnsAndErrs ->           -- Error and warning messages so far
-	    (Maybe a, WarnsAndErrs) } -- Result and messages (if any)
+                                     -- to keep track of all the variables in scope,
+                                     -- both Ids and TyVars
+            WarnsAndErrs ->           -- Error and warning messages so far
+            (Maybe a, WarnsAndErrs) } -- Result and messages (if any)
 
 type WarnsAndErrs = (Bag MsgDoc, Bag MsgDoc)
 
-{-	Note [Type substitution]
-	~~~~~~~~~~~~~~~~~~~~~~~~
+{-      Note [Type substitution]
+        ~~~~~~~~~~~~~~~~~~~~~~~~
 Why do we need a type substitution?  Consider
-	/\(a:*). \(x:a). /\(a:*). id a x
+        /\(a:*). \(x:a). /\(a:*). id a x
 This is ill typed, because (renaming variables) it is really
-	/\(a:*). \(x:a). /\(b:*). id b x
+        /\(a:*). \(x:a). /\(b:*). id b x
 Hence, when checking an application, we can't naively compare x's type
 (at its binding site) with its expected type (at a use site).  So we
 rename type binders as we go, maintaining a substitution.
 
 The same substitution also supports let-type, current expressed as
-	(/\(a:*). body) ty
+        (/\(a:*). body) ty
 Here we substitute 'ty' for 'a' in 'body', on the fly.
 -}
 
@@ -1090,15 +1084,15 @@ instance Monad LintM where
                            Nothing -> (Nothing, errs'))
 
 data LintLocInfo
-  = RhsOf Id		-- The variable bound
-  | LambdaBodyOf Id	-- The lambda-binder
-  | BodyOfLetRec [Id]	-- One of the binders
-  | CaseAlt CoreAlt	-- Case alternative
-  | CasePat CoreAlt	-- The *pattern* of the case alternative
-  | AnExpr CoreExpr	-- Some expression
+  = RhsOf Id            -- The variable bound
+  | LambdaBodyOf Id     -- The lambda-binder
+  | BodyOfLetRec [Id]   -- One of the binders
+  | CaseAlt CoreAlt     -- Case alternative
+  | CasePat CoreAlt     -- The *pattern* of the case alternative
+  | AnExpr CoreExpr     -- Some expression
   | ImportedUnfolding SrcLoc -- Some imported unfolding (ToDo: say which)
   | TopLevelBindings
-  | InType Type		-- Inside a type
+  | InType Type         -- Inside a type
   | InCo   Coercion     -- Inside a coercion
 \end{code}
 
@@ -1135,8 +1129,8 @@ addMsg subst msgs msg locs
    (loc, cxt1) = dumpLoc (head locs)
    cxts        = [snd (dumpLoc loc) | loc <- locs]   
    context     | opt_PprStyle_Debug = vcat (reverse cxts) $$ cxt1 $$
-				      ptext (sLit "Substitution:") <+> ppr subst
-	       | otherwise	    = cxt1
+                                      ptext (sLit "Substitution:") <+> ppr subst
+               | otherwise          = cxt1
  
    mk_msg msg = mkLocMessage SevWarning (mkSrcSpan loc loc) (context $$ msg)
 
@@ -1144,7 +1138,7 @@ addLoc :: LintLocInfo -> LintM a -> LintM a
 addLoc extra_loc m =
   LintM (\ loc subst errs -> unLintM m (extra_loc:loc) subst errs)
 
-inCasePat :: LintM Bool		-- A slight hack; see the unique call site
+inCasePat :: LintM Bool         -- A slight hack; see the unique call site
 inCasePat = LintM $ \ loc _ errs -> (Just (is_case_pat loc), errs)
   where
     is_case_pat (CasePat {} : _) = True
@@ -1183,18 +1177,18 @@ extendSubstL tv ty m
 lookupIdInScope :: Id -> LintM Id
 lookupIdInScope id 
   | not (mustHaveLocalBinding id)
-  = return id	-- An imported Id
-  | otherwise	
-  = do	{ subst <- getTvSubst
-	; case lookupInScope (getTvInScope subst) id of
-		Just v  -> return v
-		Nothing -> do { addErrL out_of_scope
-			      ; return id } }
+  = return id   -- An imported Id
+  | otherwise   
+  = do  { subst <- getTvSubst
+        ; case lookupInScope (getTvInScope subst) id of
+                Just v  -> return v
+                Nothing -> do { addErrL out_of_scope
+                              ; return id } }
   where
     out_of_scope = pprBndr LetBind id <+> ptext (sLit "is out of scope")
 
 
-oneTupleDataConId :: Id	-- Should not happen
+oneTupleDataConId :: Id -- Should not happen
 oneTupleDataConId = dataConWorkId (tupleCon BoxedTuple 1)
 
 checkBndrIdInScope :: Var -> Var -> LintM ()
@@ -1202,7 +1196,7 @@ checkBndrIdInScope binder id
   = checkInScope msg id
     where
      msg = ptext (sLit "is out of scope inside info for") <+> 
-	   ppr binder
+           ppr binder
 
 checkTyCoVarInScope :: Var -> LintM ()
 checkTyCoVarInScope v = checkInScope (ptext (sLit "is out of scope")) v
@@ -1232,9 +1226,9 @@ checkRole co r1 r2
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Error messages}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1280,23 +1274,23 @@ pp_binder b | isId b    = hsep [ppr b, dcolon, ppr (idType b)]
 
 \begin{code}
 ------------------------------------------------------
---	Messages for case expressions
+--      Messages for case expressions
 
 mkDefaultArgsMsg :: [Var] -> MsgDoc
 mkDefaultArgsMsg args 
   = hang (text "DEFAULT case with binders")
-	 4 (ppr args)
+         4 (ppr args)
 
 mkCaseAltMsg :: CoreExpr -> Type -> Type -> MsgDoc
 mkCaseAltMsg e ty1 ty2
   = hang (text "Type of case alternatives not the same as the annotation on case:")
-	 4 (vcat [ppr ty1, ppr ty2, ppr e])
+         4 (vcat [ppr ty1, ppr ty2, ppr e])
 
 mkScrutMsg :: Id -> Type -> Type -> TvSubst -> MsgDoc
 mkScrutMsg var var_ty scrut_ty subst
   = vcat [text "Result binder in case doesn't match scrutinee:" <+> ppr var,
-	  text "Result binder type:" <+> ppr var_ty,--(idType var),
-	  text "Scrutinee type:" <+> ppr scrut_ty,
+          text "Result binder type:" <+> ppr var_ty,--(idType var),
+          text "Scrutinee type:" <+> ppr scrut_ty,
      hsep [ptext (sLit "Current TV subst"), ppr subst]]
 
 mkNonDefltMsg, mkNonIncreasingAltsMsg :: CoreExpr -> MsgDoc
@@ -1312,17 +1306,17 @@ nonExhaustiveAltsMsg e
 mkBadConMsg :: TyCon -> DataCon -> MsgDoc
 mkBadConMsg tycon datacon
   = vcat [
-	text "In a case alternative, data constructor isn't in scrutinee type:",
-	text "Scrutinee type constructor:" <+> ppr tycon,
-	text "Data con:" <+> ppr datacon
+        text "In a case alternative, data constructor isn't in scrutinee type:",
+        text "Scrutinee type constructor:" <+> ppr tycon,
+        text "Data con:" <+> ppr datacon
     ]
 
 mkBadPatMsg :: Type -> Type -> MsgDoc
 mkBadPatMsg con_result_ty scrut_ty
   = vcat [
-	text "In a case alternative, pattern result type doesn't match scrutinee type:",
-	text "Pattern result type:" <+> ppr con_result_ty,
-	text "Scrutinee type:" <+> ppr scrut_ty
+        text "In a case alternative, pattern result type doesn't match scrutinee type:",
+        text "Pattern result type:" <+> ppr con_result_ty,
+        text "Scrutinee type:" <+> ppr scrut_ty
     ]
 
 integerScrutinisedMsg :: MsgDoc
@@ -1332,70 +1326,70 @@ integerScrutinisedMsg
 mkBadAltMsg :: Type -> CoreAlt -> MsgDoc
 mkBadAltMsg scrut_ty alt
   = vcat [ text "Data alternative when scrutinee is not a tycon application",
-	   text "Scrutinee type:" <+> ppr scrut_ty,
-	   text "Alternative:" <+> pprCoreAlt alt ]
+           text "Scrutinee type:" <+> ppr scrut_ty,
+           text "Alternative:" <+> pprCoreAlt alt ]
 
 mkNewTyDataConAltMsg :: Type -> CoreAlt -> MsgDoc
 mkNewTyDataConAltMsg scrut_ty alt
   = vcat [ text "Data alternative for newtype datacon",
-	   text "Scrutinee type:" <+> ppr scrut_ty,
-	   text "Alternative:" <+> pprCoreAlt alt ]
+           text "Scrutinee type:" <+> ppr scrut_ty,
+           text "Alternative:" <+> pprCoreAlt alt ]
 
 
 ------------------------------------------------------
---	Other error messages
+--      Other error messages
 
 mkAppMsg :: Type -> Type -> CoreExpr -> MsgDoc
 mkAppMsg fun_ty arg_ty arg
   = vcat [ptext (sLit "Argument value doesn't match argument type:"),
-	      hang (ptext (sLit "Fun type:")) 4 (ppr fun_ty),
-	      hang (ptext (sLit "Arg type:")) 4 (ppr arg_ty),
-	      hang (ptext (sLit "Arg:")) 4 (ppr arg)]
+              hang (ptext (sLit "Fun type:")) 4 (ppr fun_ty),
+              hang (ptext (sLit "Arg type:")) 4 (ppr arg_ty),
+              hang (ptext (sLit "Arg:")) 4 (ppr arg)]
 
 mkNonFunAppMsg :: Type -> Type -> CoreExpr -> MsgDoc
 mkNonFunAppMsg fun_ty arg_ty arg
   = vcat [ptext (sLit "Non-function type in function position"),
-	      hang (ptext (sLit "Fun type:")) 4 (ppr fun_ty),
-	      hang (ptext (sLit "Arg type:")) 4 (ppr arg_ty),
-	      hang (ptext (sLit "Arg:")) 4 (ppr arg)]
+              hang (ptext (sLit "Fun type:")) 4 (ppr fun_ty),
+              hang (ptext (sLit "Arg type:")) 4 (ppr arg_ty),
+              hang (ptext (sLit "Arg:")) 4 (ppr arg)]
 
 mkLetErr :: TyVar -> CoreExpr -> MsgDoc
 mkLetErr bndr rhs
   = vcat [ptext (sLit "Bad `let' binding:"),
-	  hang (ptext (sLit "Variable:"))
-		 4 (ppr bndr <+> dcolon <+> ppr (varType bndr)),
-	  hang (ptext (sLit "Rhs:"))   
-	         4 (ppr rhs)]
+          hang (ptext (sLit "Variable:"))
+                 4 (ppr bndr <+> dcolon <+> ppr (varType bndr)),
+          hang (ptext (sLit "Rhs:"))   
+                 4 (ppr rhs)]
 
 mkTyAppMsg :: Type -> Type -> MsgDoc
 mkTyAppMsg ty arg_ty
   = vcat [text "Illegal type application:",
-	      hang (ptext (sLit "Exp type:"))
-		 4 (ppr ty <+> dcolon <+> ppr (typeKind ty)),
-	      hang (ptext (sLit "Arg type:"))   
-	         4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))]
+              hang (ptext (sLit "Exp type:"))
+                 4 (ppr ty <+> dcolon <+> ppr (typeKind ty)),
+              hang (ptext (sLit "Arg type:"))   
+                 4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))]
 
 mkRhsMsg :: Id -> SDoc -> Type -> MsgDoc
 mkRhsMsg binder what ty
   = vcat
     [hsep [ptext (sLit "The type of this binder doesn't match the type of its") <+> what <> colon,
-	    ppr binder],
+            ppr binder],
      hsep [ptext (sLit "Binder's type:"), ppr (idType binder)],
      hsep [ptext (sLit "Rhs type:"), ppr ty]]
 
 mkRhsPrimMsg :: Id -> CoreExpr -> MsgDoc
 mkRhsPrimMsg binder _rhs
   = vcat [hsep [ptext (sLit "The type of this binder is primitive:"),
-		     ppr binder],
-	      hsep [ptext (sLit "Binder's type:"), ppr (idType binder)]
-	     ]
+                     ppr binder],
+              hsep [ptext (sLit "Binder's type:"), ppr (idType binder)]
+             ]
 
 mkStrictMsg :: Id -> MsgDoc
 mkStrictMsg binder
   = vcat [hsep [ptext (sLit "Recursive or top-level binder has strict demand info:"),
-		     ppr binder],
-	      hsep [ptext (sLit "Binder's demand info:"), ppr (idDemandInfo binder)]
-	     ]
+                     ppr binder],
+              hsep [ptext (sLit "Binder's demand info:"), ppr (idDemandInfo binder)]
+             ]
 
 mkNonTopExportedMsg :: Id -> MsgDoc
 mkNonTopExportedMsg binder
@@ -1408,20 +1402,20 @@ mkNonTopExternalNameMsg binder
 mkKindErrMsg :: TyVar -> Type -> MsgDoc
 mkKindErrMsg tyvar arg_ty
   = vcat [ptext (sLit "Kinds don't match in type application:"),
-	  hang (ptext (sLit "Type variable:"))
-		 4 (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar)),
-	  hang (ptext (sLit "Arg type:"))   
-	         4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))]
+          hang (ptext (sLit "Type variable:"))
+                 4 (ppr tyvar <+> dcolon <+> ppr (tyVarKind tyvar)),
+          hang (ptext (sLit "Arg type:"))   
+                 4 (ppr arg_ty <+> dcolon <+> ppr (typeKind arg_ty))]
 
 mkArityMsg :: Id -> MsgDoc
 mkArityMsg binder
   = vcat [hsep [ptext (sLit "Demand type has"),
-               	ppr (dmdTypeDepth dmd_ty),
-               	ptext (sLit "arguments, rhs has"),
-               	ppr (idArity binder),
-               	ptext (sLit "arguments,"),
-	       	ppr binder],
-	      hsep [ptext (sLit "Binder's strictness signature:"), ppr dmd_ty]
+                ppr (dmdTypeDepth dmd_ty),
+                ptext (sLit "arguments, rhs has"),
+                ppr (idArity binder),
+                ptext (sLit "arguments,"),
+                ppr binder],
+              hsep [ptext (sLit "Binder's strictness signature:"), ppr dmd_ty]
 
          ]
            where (StrictSig dmd_ty) = idStrictness binder
@@ -1429,8 +1423,8 @@ mkArityMsg binder
 mkCastErr :: CoreExpr -> Coercion -> Type -> Type -> MsgDoc
 mkCastErr expr co from_ty expr_ty
   = vcat [ptext (sLit "From-type of Cast differs from type of enclosed expression"),
-	  ptext (sLit "From-type:") <+> ppr from_ty,
-	  ptext (sLit "Type of enclosed expr:") <+> ppr expr_ty,
+          ptext (sLit "From-type:") <+> ppr from_ty,
+          ptext (sLit "Type of enclosed expr:") <+> ppr expr_ty,
           ptext (sLit "Actual enclosed expr:") <+> ppr expr,
           ptext (sLit "Coercion used in cast:") <+> ppr co
          ]
diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs
index fa397bc..b012961 100644
--- a/compiler/coreSyn/CoreSubst.lhs
+++ b/compiler/coreSyn/CoreSubst.lhs
@@ -6,39 +6,33 @@
 Utility functions on @Core@ syntax
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module CoreSubst (
-	-- * Main data types
-	Subst(..), -- Implementation exported for supercompiler's Renaming.hs only
-	TvSubstEnv, IdSubstEnv, InScopeSet,
+        -- * Main data types
+        Subst(..), -- Implementation exported for supercompiler's Renaming.hs only
+        TvSubstEnv, IdSubstEnv, InScopeSet,
 
         -- ** Substituting into expressions and related types
-	deShadowBinds, substSpec, substRulesForImportedIds,
-	substTy, substCo, substExpr, substExprSC, substBind, substBindSC,
+        deShadowBinds, substSpec, substRulesForImportedIds,
+        substTy, substCo, substExpr, substExprSC, substBind, substBindSC,
         substUnfolding, substUnfoldingSC,
-	lookupIdSubst, lookupTvSubst, lookupCvSubst, substIdOcc,
+        lookupIdSubst, lookupTvSubst, lookupCvSubst, substIdOcc,
         substTickish,
 
         -- ** Operations on substitutions
-	emptySubst, mkEmptySubst, mkSubst, mkOpenSubst, substInScope, isEmptySubst, 
- 	extendIdSubst, extendIdSubstList, extendTvSubst, extendTvSubstList,
+        emptySubst, mkEmptySubst, mkSubst, mkOpenSubst, substInScope, isEmptySubst, 
+        extendIdSubst, extendIdSubstList, extendTvSubst, extendTvSubstList,
         extendCvSubst, extendCvSubstList,
-	extendSubst, extendSubstList, extendSubstWithVar, zapSubstEnv,
+        extendSubst, extendSubstList, extendSubstWithVar, zapSubstEnv,
         addInScopeSet, extendInScope, extendInScopeList, extendInScopeIds,
         isInScope, setInScope,
         delBndr, delBndrs,
 
-	-- ** Substituting and cloning binders
-	substBndr, substBndrs, substRecBndrs,
-	cloneBndr, cloneBndrs, cloneIdBndr, cloneIdBndrs, cloneRecIdBndrs,
+        -- ** Substituting and cloning binders
+        substBndr, substBndrs, substRecBndrs,
+        cloneBndr, cloneBndrs, cloneIdBndr, cloneIdBndrs, cloneRecIdBndrs,
 
-	-- ** Simple expression optimiser
+        -- ** Simple expression optimiser
         simpleOptPgm, simpleOptExpr, simpleOptExprWith,
         exprIsConApp_maybe, exprIsLiteral_maybe
     ) where
@@ -54,7 +48,7 @@ import OccurAnal( occurAnalyseExpr, occurAnalysePgm )
 import qualified Type
 import qualified Coercion
 
-	-- We are defining local versions
+        -- We are defining local versions
 import Type     hiding ( substTy, extendTvSubst, extendTvSubstList
                        , isInScope, substTyVarBndr, cloneTyVarBndr )
 import Coercion hiding ( substTy, substCo, extendTvSubst, substTyVarBndr, substCoVarBndr )
@@ -64,11 +58,11 @@ import DataCon
 import PrelNames   ( eqBoxDataConKey )
 import OptCoercion ( optCoercion )
 import PprCore     ( pprCoreBindings, pprRules )
-import Module	   ( Module )
+import Module      ( Module )
 import VarSet
 import VarEnv
 import Id
-import Name	( Name )
+import Name     ( Name )
 import Var
 import IdInfo
 import Unique
@@ -80,7 +74,7 @@ import BasicTypes ( isAlwaysActive )
 import Util
 import Pair
 import Outputable
-import PprCore		()		-- Instances
+import PprCore          ()              -- Instances
 import FastString
 
 import Data.List
@@ -88,9 +82,9 @@ import Data.List
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Substitutions}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -118,14 +112,14 @@ data Subst
           TvSubstEnv  -- Substitution from TyVars to Types
           CvSubstEnv  -- Substitution from CoVars to Coercions
 
-	-- INVARIANT 1: See #in_scope_invariant#
-	-- This is what lets us deal with name capture properly
-	-- It's a hard invariant to check...
-	--
-	-- INVARIANT 2: The substitution is apply-once; see Note [Apply once] with
-	--		Types.TvSubstEnv
-	--
-	-- INVARIANT 3: See Note [Extending the Subst]
+        -- INVARIANT 1: See #in_scope_invariant#
+        -- This is what lets us deal with name capture properly
+        -- It's a hard invariant to check...
+        --
+        -- INVARIANT 2: The substitution is apply-once; see Note [Apply once] with
+        --              Types.TvSubstEnv
+        --
+        -- INVARIANT 3: See Note [Extending the Subst]
 \end{code}
 
 Note [Extending the Subst]
@@ -136,8 +130,8 @@ than we do for TyVars.
 For TyVars, see Note [Extending the TvSubst] with Type.TvSubstEnv
 
 For Ids, we have a different invariant
-	The IdSubstEnv is extended *only* when the Unique on an Id changes
-	Otherwise, we just extend the InScopeSet
+        The IdSubstEnv is extended *only* when the Unique on an Id changes
+        Otherwise, we just extend the InScopeSet
 
 In consequence:
 
@@ -157,7 +151,7 @@ In consequence:
 
 * In lookupIdSubst, we *must* look up the Id in the in-scope set, because
   it may contain non-trivial changes.  Example:
-	(/\a. \x:a. ...x...) Int
+        (/\a. \x:a. ...x...) Int
   We extend the TvSubstEnv with [a |-> Int]; but x's unique does not change
   so we only extend the in-scope set.  Then we must look up in the in-scope
   set when we find the occurrence of x.
@@ -258,7 +252,7 @@ extendSubstWithVar subst v1 v2
 --   substituted (whether expressions, types, or coercions). See also
 --   'extendSubst'.
 extendSubstList :: Subst -> [(Var,CoreArg)] -> Subst
-extendSubstList subst []	      = subst
+extendSubstList subst []              = subst
 extendSubstList subst ((var,rhs):prs) = extendSubstList (extendSubst subst var rhs) prs
 
 -- | Find the substitution for an 'Id' in the 'Subst'
@@ -267,10 +261,10 @@ lookupIdSubst doc (Subst in_scope ids _ _) v
   | not (isLocalId v) = Var v
   | Just e  <- lookupVarEnv ids       v = e
   | Just v' <- lookupInScope in_scope v = Var v'
-	-- Vital! See Note [Extending the Subst]
+        -- Vital! See Note [Extending the Subst]
   | otherwise = WARN( True, ptext (sLit "CoreSubst.lookupIdSubst") <+> doc <+> ppr v 
                             $$ ppr in_scope) 
-		Var v
+                Var v
 
 -- | Find the substitution for a 'TyVar' in the 'Subst'
 lookupTvSubst :: Subst -> TyVar -> Type
@@ -297,8 +291,8 @@ delBndrs (Subst in_scope ids tvs cvs) vs
 --      so neither x nor y scope over a1 a2
 mkOpenSubst :: InScopeSet -> [(Var,CoreArg)] -> Subst
 mkOpenSubst in_scope pairs = Subst in_scope
-	    	          	   (mkVarEnv [(id,e)  | (id, e) <- pairs, isId id])
-			  	   (mkVarEnv [(tv,ty) | (tv, Type ty) <- pairs])
+                                   (mkVarEnv [(id,e)  | (id, e) <- pairs, isId id])
+                                   (mkVarEnv [(tv,ty) | (tv, Type ty) <- pairs])
                                    (mkVarEnv [(v,co)  | (v, Coercion co) <- pairs])
 
 ------------------------------
@@ -316,20 +310,20 @@ addInScopeSet (Subst in_scope ids tvs cvs) vs
 extendInScope :: Subst -> Var -> Subst
 extendInScope (Subst in_scope ids tvs cvs) v
   = Subst (in_scope `extendInScopeSet` v) 
-	  (ids `delVarEnv` v) (tvs `delVarEnv` v) (cvs `delVarEnv` v)
+          (ids `delVarEnv` v) (tvs `delVarEnv` v) (cvs `delVarEnv` v)
 
 -- | Add the 'Var's to the in-scope set: see also 'extendInScope'
 extendInScopeList :: Subst -> [Var] -> Subst
 extendInScopeList (Subst in_scope ids tvs cvs) vs
   = Subst (in_scope `extendInScopeSetList` vs) 
-	  (ids `delVarEnvList` vs) (tvs `delVarEnvList` vs) (cvs `delVarEnvList` vs)
+          (ids `delVarEnvList` vs) (tvs `delVarEnvList` vs) (cvs `delVarEnvList` vs)
 
 -- | Optimized version of 'extendInScopeList' that can be used if you are certain 
 -- all the things being added are 'Id's and hence none are 'TyVar's or 'CoVar's
 extendInScopeIds :: Subst -> [Id] -> Subst
 extendInScopeIds (Subst in_scope ids tvs cvs) vs 
   = Subst (in_scope `extendInScopeSetList` vs) 
-	  (ids `delVarEnvList` vs) tvs cvs
+          (ids `delVarEnvList` vs) tvs cvs
 
 setInScope :: Subst -> InScopeSet -> Subst
 setInScope (Subst _ ids tvs cvs) in_scope = Subst in_scope ids tvs cvs
@@ -340,18 +334,18 @@ Pretty printing, for debugging only
 \begin{code}
 instance Outputable Subst where
   ppr (Subst in_scope ids tvs cvs) 
-	=  ptext (sLit "<InScope =") <+> braces (fsep (map ppr (varEnvElts (getInScopeVars in_scope))))
-	$$ ptext (sLit " IdSubst   =") <+> ppr ids
-	$$ ptext (sLit " TvSubst   =") <+> ppr tvs
+        =  ptext (sLit "<InScope =") <+> braces (fsep (map ppr (varEnvElts (getInScopeVars in_scope))))
+        $$ ptext (sLit " IdSubst   =") <+> ppr ids
+        $$ ptext (sLit " TvSubst   =") <+> ppr tvs
         $$ ptext (sLit " CvSubst   =") <+> ppr cvs   
- 	 <> char '>'
+         <> char '>'
 \end{code}
 
 
 %************************************************************************
-%*									*
-	Substituting expressions
-%*									*
+%*                                                                      *
+        Substituting expressions
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -373,7 +367,7 @@ subst_expr :: Subst -> CoreExpr -> CoreExpr
 subst_expr subst expr
   = go expr
   where
-    go (Var v)	       = lookupIdSubst (text "subst_expr") subst v 
+    go (Var v)         = lookupIdSubst (text "subst_expr") subst v 
     go (Type ty)       = Type (substTy subst ty)
     go (Coercion co)   = Coercion (substCo subst co)
     go (Lit lit)       = Lit lit
@@ -387,49 +381,49 @@ subst_expr subst expr
        --         construction time
 
     go (Lam bndr body) = Lam bndr' (subst_expr subst' body)
-		       where
-			 (subst', bndr') = substBndr subst bndr
+                       where
+                         (subst', bndr') = substBndr subst bndr
 
     go (Let bind body) = Let bind' (subst_expr subst' body)
-		       where
-			 (subst', bind') = substBind subst bind
+                       where
+                         (subst', bind') = substBind subst bind
 
     go (Case scrut bndr ty alts) = Case (go scrut) bndr' (substTy subst ty) (map (go_alt subst') alts)
-			         where
-			  	 (subst', bndr') = substBndr subst bndr
+                                 where
+                                 (subst', bndr') = substBndr subst bndr
 
     go_alt subst (con, bndrs, rhs) = (con, bndrs', subst_expr subst' rhs)
-				 where
-				   (subst', bndrs') = substBndrs subst bndrs
+                                 where
+                                   (subst', bndrs') = substBndrs subst bndrs
 
 -- | Apply a substititon to an entire 'CoreBind', additionally returning an updated 'Subst'
 -- that should be used by subsequent substitutons.
 substBind, substBindSC :: Subst -> CoreBind -> (Subst, CoreBind)
 
-substBindSC subst bind 	  -- Short-cut if the substitution is empty
+substBindSC subst bind    -- Short-cut if the substitution is empty
   | not (isEmptySubst subst)
   = substBind subst bind
   | otherwise
   = case bind of
        NonRec bndr rhs -> (subst', NonRec bndr' rhs)
           where
-      	    (subst', bndr') = substBndr subst bndr
+            (subst', bndr') = substBndr subst bndr
        Rec pairs -> (subst', Rec (bndrs' `zip` rhss'))
           where
             (bndrs, rhss)    = unzip pairs
-      	    (subst', bndrs') = substRecBndrs subst bndrs
-      	    rhss' | isEmptySubst subst' = rhss
-                  | otherwise	        = map (subst_expr subst') rhss
+            (subst', bndrs') = substRecBndrs subst bndrs
+            rhss' | isEmptySubst subst' = rhss
+                  | otherwise           = map (subst_expr subst') rhss
 
 substBind subst (NonRec bndr rhs) = (subst', NonRec bndr' (subst_expr subst rhs))
-				  where
-				    (subst', bndr') = substBndr subst bndr
+                                  where
+                                    (subst', bndr') = substBndr subst bndr
 
 substBind subst (Rec pairs) = (subst', Rec (bndrs' `zip` rhss'))
-			    where
+                            where
                                 (bndrs, rhss)    = unzip pairs
-				(subst', bndrs') = substRecBndrs subst bndrs
-				rhss' = map (subst_expr subst') rhss
+                                (subst', bndrs') = substRecBndrs subst bndrs
+                                rhss' = map (subst_expr subst') rhss
 \end{code}
 
 \begin{code}
@@ -448,9 +442,9 @@ deShadowBinds binds = snd (mapAccumL substBind emptySubst binds)
 
 
 %************************************************************************
-%*									*
-	Substituting binders
-%*									*
+%*                                                                      *
+        Substituting binders
+%*                                                                      *
 %************************************************************************
 
 Remember that substBndr and friends are used when doing expression
@@ -476,45 +470,45 @@ substBndrs subst bndrs = mapAccumL substBndr subst bndrs
 substRecBndrs :: Subst -> [Id] -> (Subst, [Id])
 substRecBndrs subst bndrs 
   = (new_subst, new_bndrs)
-  where		-- Here's the reason we need to pass rec_subst to subst_id
+  where         -- Here's the reason we need to pass rec_subst to subst_id
     (new_subst, new_bndrs) = mapAccumL (substIdBndr (text "rec-bndr") new_subst) subst bndrs
 \end{code}
 
 
 \begin{code}
 substIdBndr :: SDoc 
-            -> Subst		-- ^ Substitution to use for the IdInfo
-	    -> Subst -> Id 	-- ^ Substitition and Id to transform
-	    -> (Subst, Id)	-- ^ Transformed pair
-				-- NB: unfolding may be zapped
+            -> Subst            -- ^ Substitution to use for the IdInfo
+            -> Subst -> Id      -- ^ Substitition and Id to transform
+            -> (Subst, Id)      -- ^ Transformed pair
+                                -- NB: unfolding may be zapped
 
 substIdBndr _doc rec_subst subst@(Subst in_scope env tvs cvs) old_id
   = -- pprTrace "substIdBndr" (doc $$ ppr old_id $$ ppr in_scope) $
     (Subst (in_scope `extendInScopeSet` new_id) new_env tvs cvs, new_id)
   where
-    id1 = uniqAway in_scope old_id	-- id1 is cloned if necessary
+    id1 = uniqAway in_scope old_id      -- id1 is cloned if necessary
     id2 | no_type_change = id1
-	| otherwise	 = setIdType id1 (substTy subst old_ty)
+        | otherwise      = setIdType id1 (substTy subst old_ty)
 
     old_ty = idType old_id
     no_type_change = isEmptyVarEnv tvs || 
                      isEmptyVarSet (Type.tyVarsOfType old_ty)
 
-	-- new_id has the right IdInfo
-	-- The lazy-set is because we're in a loop here, with 
-	-- rec_subst, when dealing with a mutually-recursive group
+        -- new_id has the right IdInfo
+        -- The lazy-set is because we're in a loop here, with 
+        -- rec_subst, when dealing with a mutually-recursive group
     new_id = maybeModifyIdInfo mb_new_info id2
     mb_new_info = substIdInfo rec_subst id2 (idInfo id2)
-	-- NB: unfolding info may be zapped
+        -- NB: unfolding info may be zapped
 
-	-- Extend the substitution if the unique has changed
-	-- See the notes with substTyVarBndr for the delVarEnv
+        -- Extend the substitution if the unique has changed
+        -- See the notes with substTyVarBndr for the delVarEnv
     new_env | no_change = delVarEnv env old_id
-	    | otherwise = extendVarEnv env old_id (Var new_id)
+            | otherwise = extendVarEnv env old_id (Var new_id)
 
     no_change = id1 == old_id
-	-- See Note [Extending the Subst]
-	-- it's /not/ necessary to check mb_new_info and no_type_change
+        -- See Note [Extending the Subst]
+        -- it's /not/ necessary to check mb_new_info and no_type_change
 \end{code}
 
 Now a variant that unconditionally allocates a new unique.
@@ -550,18 +544,18 @@ cloneRecIdBndrs subst us ids
   = (subst', ids')
   where
     (subst', ids') = mapAccumL (clone_id subst') subst
-			       (ids `zip` uniqsFromSupply us)
+                               (ids `zip` uniqsFromSupply us)
 
 -- Just like substIdBndr, except that it always makes a new unique
 -- It is given the unique to use
-clone_id    :: Subst			-- Substitution for the IdInfo
-	    -> Subst -> (Id, Unique)	-- Substitition and Id to transform
-	    -> (Subst, Id)		-- Transformed pair
+clone_id    :: Subst                    -- Substitution for the IdInfo
+            -> Subst -> (Id, Unique)    -- Substitition and Id to transform
+            -> (Subst, Id)              -- Transformed pair
 
 clone_id rec_subst subst@(Subst in_scope idvs tvs cvs) (old_id, uniq)
   = (Subst (in_scope `extendInScopeSet` new_id) new_idvs tvs new_cvs, new_id)
   where
-    id1	    = setVarUnique old_id uniq
+    id1     = setVarUnique old_id uniq
     id2     = substIdType subst id1
     new_id  = maybeModifyIdInfo (substIdInfo rec_subst id2 (idInfo old_id)) id2
     (new_idvs, new_cvs) | isCoVar old_id = (idvs, extendVarEnv cvs old_id (mkCoVarCo new_id))
@@ -570,9 +564,9 @@ clone_id rec_subst subst@(Subst in_scope idvs tvs cvs) (old_id, uniq)
 
 
 %************************************************************************
-%*									*
-		Types and Coercions
-%*									*
+%*                                                                      *
+                Types and Coercions
+%*                                                                      *
 %************************************************************************
 
 For types and coercions we just call the corresponding functions in
@@ -583,20 +577,20 @@ Subst to a TvSubst.
 substTyVarBndr :: Subst -> TyVar -> (Subst, TyVar)
 substTyVarBndr (Subst in_scope id_env tv_env cv_env) tv
   = case Type.substTyVarBndr (TvSubst in_scope tv_env) tv of
-	(TvSubst in_scope' tv_env', tv') 
-	   -> (Subst in_scope' id_env tv_env' cv_env, tv')
+        (TvSubst in_scope' tv_env', tv') 
+           -> (Subst in_scope' id_env tv_env' cv_env, tv')
 
 cloneTyVarBndr :: Subst -> TyVar -> Unique -> (Subst, TyVar)
 cloneTyVarBndr (Subst in_scope id_env tv_env cv_env) tv uniq
   = case Type.cloneTyVarBndr (TvSubst in_scope tv_env) tv uniq of
-	(TvSubst in_scope' tv_env', tv') 
-	   -> (Subst in_scope' id_env tv_env' cv_env, tv')
+        (TvSubst in_scope' tv_env', tv') 
+           -> (Subst in_scope' id_env tv_env' cv_env, tv')
 
 substCoVarBndr :: Subst -> TyVar -> (Subst, TyVar)
 substCoVarBndr (Subst in_scope id_env tv_env cv_env) cv
   = case Coercion.substCoVarBndr (CvSubst in_scope tv_env cv_env) cv of
-	(CvSubst in_scope' tv_env' cv_env', cv') 
-	   -> (Subst in_scope' id_env tv_env' cv_env', cv')
+        (CvSubst in_scope' tv_env' cv_env', cv') 
+           -> (Subst in_scope' id_env tv_env' cv_env', cv')
 
 -- | See 'Type.substTy'
 substTy :: Subst -> Type -> Type 
@@ -615,19 +609,19 @@ substCo subst co = Coercion.substCo (getCvSubst subst) co
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \section{IdInfo substitution}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 substIdType :: Subst -> Id -> Id
 substIdType subst@(Subst _ _ tv_env cv_env) id
   | (isEmptyVarEnv tv_env && isEmptyVarEnv cv_env) || isEmptyVarSet (Type.tyVarsOfType old_ty) = id
-  | otherwise	= setIdType id (substTy subst old_ty)
-		-- The tyVarsOfType is cheaper than it looks
-		-- because we cache the free tyvars of the type
-		-- in a Note in the id's type itself
+  | otherwise   = setIdType id (substTy subst old_ty)
+                -- The tyVarsOfType is cheaper than it looks
+                -- because we cache the free tyvars of the type
+                -- in a Note in the id's type itself
   where
     old_ty = idType id
 
@@ -637,20 +631,20 @@ substIdInfo :: Subst -> Id -> IdInfo -> Maybe IdInfo
 substIdInfo subst new_id info
   | nothing_to_do = Nothing
   | otherwise     = Just (info `setSpecInfo`      substSpec subst new_id old_rules
-			       `setUnfoldingInfo` substUnfolding subst old_unf)
+                               `setUnfoldingInfo` substUnfolding subst old_unf)
   where
-    old_rules 	  = specInfo info
-    old_unf	  = unfoldingInfo info
+    old_rules     = specInfo info
+    old_unf       = unfoldingInfo info
     nothing_to_do = isEmptySpecInfo old_rules && isClosedUnfolding old_unf
     
 
 ------------------
 -- | Substitutes for the 'Id's within an unfolding
 substUnfolding, substUnfoldingSC :: Subst -> Unfolding -> Unfolding
-	-- Seq'ing on the returned Unfolding is enough to cause
-	-- all the substitutions to happen completely
+        -- Seq'ing on the returned Unfolding is enough to cause
+        -- all the substitutions to happen completely
 
-substUnfoldingSC subst unf 	 -- Short-cut version
+substUnfoldingSC subst unf       -- Short-cut version
   | isEmptySubst subst = unf
   | otherwise          = substUnfolding subst unf
 
@@ -661,7 +655,7 @@ substUnfolding subst df@(DFunUnfolding { df_bndrs = bndrs, df_args = args })
     args'           = map (substExpr (text "subst-unf:dfun") subst') args
 
 substUnfolding subst unf@(CoreUnfolding { uf_tmpl = tmpl, uf_src = src })
-	-- Retain an InlineRule!
+        -- Retain an InlineRule!
   | not (isStableSource src)  -- Zap an unstable unfolding, to save substitution work
   = NoUnfolding
   | otherwise                 -- But keep a stable one!
@@ -670,14 +664,14 @@ substUnfolding subst unf@(CoreUnfolding { uf_tmpl = tmpl, uf_src = src })
   where
     new_tmpl = substExpr (text "subst-unf") subst tmpl
 
-substUnfolding _ unf = unf	-- NoUnfolding, OtherCon
+substUnfolding _ unf = unf      -- NoUnfolding, OtherCon
 
 ------------------
 substIdOcc :: Subst -> Id -> Id
 -- These Ids should not be substituted to non-Ids
 substIdOcc subst v = case lookupIdSubst (text "substIdOcc") subst v of
-	   	        Var v' -> v'
-			other  -> pprPanic "substIdOcc" (vcat [ppr v <+> ppr other, ppr subst])
+                        Var v' -> v'
+                        other  -> pprPanic "substIdOcc" (vcat [ppr v <+> ppr other, ppr subst])
 
 ------------------
 -- | Substitutes for the 'Id's within the 'WorkerInfo' given the new function 'Id'
@@ -767,8 +761,8 @@ Breakpoints can't handle free variables with unlifted types anyway.
 Note [Worker inlining]
 ~~~~~~~~~~~~~~~~~~~~~~
 A worker can get sustituted away entirely.
-	- it might be trivial
-	- it might simply be very small
+        - it might be trivial
+        - it might simply be very small
 We do not treat an InlWrapper as an 'occurrence' in the occurence 
 analyser, so it's possible that the worker is not even in scope any more.
 
@@ -777,9 +771,9 @@ InlVanilla.  The WARN is just so I can see if it happens a lot.
 
 
 %************************************************************************
-%*									*
-	The Very Simple Optimiser
-%*									*
+%*                                                                      *
+        The Very Simple Optimiser
+%*                                                                      *
 %************************************************************************
 
 Note [Optimise coercion boxes agressively]
@@ -852,15 +846,15 @@ simpleOptExpr expr
     simpleOptExprWith init_subst expr
   where
     init_subst = mkEmptySubst (mkInScopeSet (exprFreeVars expr))
-	-- It's potentially important to make a proper in-scope set
-	-- Consider  let x = ..y.. in \y. ...x...
-	-- Then we should remember to clone y before substituting
-	-- for x.  It's very unlikely to occur, because we probably
-	-- won't *be* substituting for x if it occurs inside a
-	-- lambda.  
-	--
+        -- It's potentially important to make a proper in-scope set
+        -- Consider  let x = ..y.. in \y. ...x...
+        -- Then we should remember to clone y before substituting
+        -- for x.  It's very unlikely to occur, because we probably
+        -- won't *be* substituting for x if it occurs inside a
+        -- lambda.  
+        --
         -- It's a bit painful to call exprFreeVars, because it makes
-	-- three passes instead of two (occ-anal, and go)
+        -- three passes instead of two (occ-anal, and go)
 
 simpleOptExprWith :: Subst -> InExpr -> OutExpr
 simpleOptExprWith subst expr = simple_opt_expr subst (occurAnalyseExpr expr)
@@ -908,7 +902,7 @@ simple_opt_expr subst expr
     go (Lit lit)        = Lit lit
     go (Tick tickish e) = Tick (substTickish subst tickish) (go e)
     go (Cast e co)      | isReflCo co' = go e
-       	                | otherwise    = Cast (go e) co' 
+                        | otherwise    = Cast (go e) co' 
                         where
                           co' = optCoercion (getCvSubst subst) co
 
@@ -930,7 +924,7 @@ simple_opt_expr subst expr
 
       | otherwise
       = Case e' b' (substTy subst ty)
-       		   (map (go_alt subst') as)
+                   (map (go_alt subst') as)
         where
           e' = go e
           (subst', b') = subst_opt_bndr subst b
@@ -939,7 +933,7 @@ simple_opt_expr subst expr
     go_alt subst (con, bndrs, rhs) 
       = (con, bndrs', simple_opt_expr subst' rhs)
       where
-	(subst', bndrs') = subst_opt_bndrs subst bndrs
+        (subst', bndrs') = subst_opt_bndrs subst bndrs
 
     ----------------------
     -- go_lam tries eta reduction
@@ -971,7 +965,7 @@ simple_app subst e as
 
 ----------------------
 simple_opt_bind,simple_opt_bind' :: Subst -> CoreBind -> (Subst, Maybe CoreBind)
-simple_opt_bind s b 		  -- Can add trace stuff here
+simple_opt_bind s b               -- Can add trace stuff here
   = simple_opt_bind' s b
 
 simple_opt_bind' subst (Rec prs)
@@ -1008,7 +1002,7 @@ maybe_substitute :: Subst -> InVar -> OutExpr -> Maybe Subst
     --   either extends subst with (in_var -> out_rhs)
     --   or     returns Nothing
 maybe_substitute subst b r
-  | Type ty <- r 	-- let a::* = TYPE ty in <body>
+  | Type ty <- r        -- let a::* = TYPE ty in <body>
   = ASSERT( isTyVar b )
     Just (extendTvSubst subst b ty)
 
@@ -1017,10 +1011,10 @@ maybe_substitute subst b r
     Just (extendCvSubst subst b co)
 
   | isId b              -- let x = e in <body>
-  , not (isCoVar b)	-- See Note [Do not inline CoVars unconditionally]
-    		 	-- in SimplUtils
+  , not (isCoVar b)     -- See Note [Do not inline CoVars unconditionally]
+                        -- in SimplUtils
   , safe_to_inline (idOccInfo b) 
-  , isAlwaysActive (idInlineActivation b)	-- Note [Inline prag in simplOpt]
+  , isAlwaysActive (idInlineActivation b)       -- Note [Inline prag in simplOpt]
   , not (isStableUnfolding (idUnfolding b))
   , not (isExportedId b)
   , not (isUnLiftedType (idType b)) || exprOkForSpeculation r
@@ -1029,7 +1023,7 @@ maybe_substitute subst b r
   | otherwise
   = Nothing
   where
-	-- Unconditionally safe to inline
+        -- Unconditionally safe to inline
     safe_to_inline :: OccInfo -> Bool
     safe_to_inline (IAmALoopBreaker {})     = False
     safe_to_inline IAmDead                  = True
@@ -1061,19 +1055,19 @@ subst_opt_id_bndr :: Subst -> InId -> (Subst, OutId)
 subst_opt_id_bndr subst@(Subst in_scope id_subst tv_subst cv_subst) old_id
   = (Subst new_in_scope new_id_subst tv_subst cv_subst, new_id)
   where
-    id1	   = uniqAway in_scope old_id
+    id1    = uniqAway in_scope old_id
     id2    = setIdType id1 (substTy subst (idType old_id))
-    new_id = zapFragileIdInfo id2	-- Zaps rules, worker-info, unfolding
-					-- and fragile OccInfo
+    new_id = zapFragileIdInfo id2       -- Zaps rules, worker-info, unfolding
+                                        -- and fragile OccInfo
     new_in_scope = in_scope `extendInScopeSet` new_id
 
-	-- Extend the substitution if the unique has changed,
-	-- or there's some useful occurrence information
-	-- See the notes with substTyVarBndr for the delSubstEnv
+        -- Extend the substitution if the unique has changed,
+        -- or there's some useful occurrence information
+        -- See the notes with substTyVarBndr for the delSubstEnv
     new_id_subst | new_id /= old_id
-	         = extendVarEnv id_subst old_id (Var new_id)
-	         | otherwise 
-	         = delVarEnv id_subst old_id
+                 = extendVarEnv id_subst old_id (Var new_id)
+                 | otherwise 
+                 = delVarEnv id_subst old_id
 
 ----------------------
 subst_opt_bndrs :: Subst -> [InVar] -> (Subst, [OutVar])
@@ -1171,10 +1165,10 @@ exprIsConApp_maybe (in_scope, id_unf) expr
         = dealWithCoercion co con (map (substExpr (text "exprIsConApp1") subst) dfun_args)
 
         -- Look through unfoldings, but only arity-zero one; 
-	-- if arity > 0 we are effectively inlining a function call,
-	-- and that is the business of callSiteInline.
-	-- In practice, without this test, most of the "hits" were
-	-- CPR'd workers getting inlined back into their wrappers,
+        -- if arity > 0 we are effectively inlining a function call,
+        -- and that is the business of callSiteInline.
+        -- In practice, without this test, most of the "hits" were
+        -- CPR'd workers getting inlined back into their wrappers,
         | Just rhs <- expandUnfolding_maybe unfolding
         , unfoldingArity unfolding == 0 
         , let in_scope' = extendInScopeSetSet in_scope (exprFreeVars rhs)
diff --git a/compiler/coreSyn/CoreSyn.lhs b/compiler/coreSyn/CoreSyn.lhs
index d77d5dc..d272ecf 100644
--- a/compiler/coreSyn/CoreSyn.lhs
+++ b/compiler/coreSyn/CoreSyn.lhs
@@ -6,39 +6,33 @@
 \begin{code}
 {-# LANGUAGE DeriveDataTypeable, DeriveFunctor #-}
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | CoreSyn holds all the main data types for use by for the Glasgow Haskell Compiler midsection
 module CoreSyn (
-	-- * Main data types
+        -- * Main data types
         Expr(..), Alt, Bind(..), AltCon(..), Arg, Tickish(..),
         CoreProgram, CoreExpr, CoreAlt, CoreBind, CoreArg, CoreBndr,
         TaggedExpr, TaggedAlt, TaggedBind, TaggedArg, TaggedBndr(..),
 
         -- ** 'Expr' construction
-	mkLets, mkLams,
-	mkApps, mkTyApps, mkCoApps, mkVarApps,
-	
-	mkIntLit, mkIntLitInt,
-	mkWordLit, mkWordLitWord,
-	mkWord64LitWord64, mkInt64LitInt64,
-	mkCharLit, mkStringLit,
-	mkFloatLit, mkFloatLitFloat,
-	mkDoubleLit, mkDoubleLitDouble,
-	
-	mkConApp, mkConApp2, mkTyBind, mkCoBind,
-	varToCoreExpr, varsToCoreExprs,
+        mkLets, mkLams,
+        mkApps, mkTyApps, mkCoApps, mkVarApps,
+        
+        mkIntLit, mkIntLitInt,
+        mkWordLit, mkWordLitWord,
+        mkWord64LitWord64, mkInt64LitInt64,
+        mkCharLit, mkStringLit,
+        mkFloatLit, mkFloatLitFloat,
+        mkDoubleLit, mkDoubleLitDouble,
+        
+        mkConApp, mkConApp2, mkTyBind, mkCoBind,
+        varToCoreExpr, varsToCoreExprs,
 
         isId, cmpAltCon, cmpAlt, ltAlt,
-	
-	-- ** Simple 'Expr' access functions and predicates
-	bindersOf, bindersOfBinds, rhssOfBind, rhssOfAlts, 
-	collectBinders, collectTyBinders, collectValBinders, collectTyAndValBinders,
+        
+        -- ** Simple 'Expr' access functions and predicates
+        bindersOf, bindersOfBinds, rhssOfBind, rhssOfAlts, 
+        collectBinders, collectTyBinders, collectValBinders, collectTyAndValBinders,
         collectArgs, flattenBinds,
 
         isValArg, isTypeArg, isTyCoArg, valArgCount, valBndrCount,
@@ -50,42 +44,42 @@ module CoreSyn (
         -- * Unfolding data types
         Unfolding(..),  UnfoldingGuidance(..), UnfoldingSource(..),
 
-	-- ** Constructing 'Unfolding's
-	noUnfolding, evaldUnfolding, mkOtherCon,
+        -- ** Constructing 'Unfolding's
+        noUnfolding, evaldUnfolding, mkOtherCon,
         unSaturatedOk, needSaturated, boringCxtOk, boringCxtNotOk,
-	
-	-- ** Predicates and deconstruction on 'Unfolding'
-	unfoldingTemplate, setUnfoldingTemplate, expandUnfolding_maybe,
-	maybeUnfoldingTemplate, otherCons, unfoldingArity,
-	isValueUnfolding, isEvaldUnfolding, isCheapUnfolding,
+        
+        -- ** Predicates and deconstruction on 'Unfolding'
+        unfoldingTemplate, setUnfoldingTemplate, expandUnfolding_maybe,
+        maybeUnfoldingTemplate, otherCons, unfoldingArity,
+        isValueUnfolding, isEvaldUnfolding, isCheapUnfolding,
         isExpandableUnfolding, isConLikeUnfolding, isCompulsoryUnfolding,
         isStableUnfolding, isStableCoreUnfolding_maybe,
         isClosedUnfolding, hasSomeUnfolding, 
-	canUnfold, neverUnfoldGuidance, isStableSource,
+        canUnfold, neverUnfoldGuidance, isStableSource,
 
-	-- * Strictness
-	seqExpr, seqExprs, seqUnfolding, 
+        -- * Strictness
+        seqExpr, seqExprs, seqUnfolding, 
 
-	-- * Annotated expression data types
-	AnnExpr, AnnExpr'(..), AnnBind(..), AnnAlt,
-	
+        -- * Annotated expression data types
+        AnnExpr, AnnExpr'(..), AnnBind(..), AnnAlt,
+        
         -- ** Operations on annotated expressions
         collectAnnArgs,
 
-	-- ** Operations on annotations
-	deAnnotate, deAnnotate', deAnnAlt, collectAnnBndrs,
+        -- ** Operations on annotations
+        deAnnotate, deAnnotate', deAnnAlt, collectAnnBndrs,
 
-	-- * Core rule data types
-	CoreRule(..),	-- CoreSubst, CoreTidy, CoreFVs, PprCore only
-	RuleName, RuleFun, IdUnfoldingFun, InScopeEnv,
-	
-	-- ** Operations on 'CoreRule's 
-	seqRules, ruleArity, ruleName, ruleIdName, ruleActivation,
-	setRuleIdName,
-	isBuiltinRule, isLocalRule,
+        -- * Core rule data types
+        CoreRule(..),   -- CoreSubst, CoreTidy, CoreFVs, PprCore only
+        RuleName, RuleFun, IdUnfoldingFun, InScopeEnv,
+        
+        -- ** Operations on 'CoreRule's 
+        seqRules, ruleArity, ruleName, ruleIdName, ruleActivation,
+        setRuleIdName,
+        isBuiltinRule, isLocalRule,
 
-	-- * Core vectorisation declarations data type
-	CoreVect(..)
+        -- * Core vectorisation declarations data type
+        CoreVect(..)
     ) where
 
 #include "HsVersions.h"
@@ -115,9 +109,9 @@ infixl 4 `mkApps`, `mkTyApps`, `mkVarApps`, `App`, `mkCoApps`
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{The main data types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 These data types are the heart of the compiler
@@ -231,25 +225,25 @@ These data types are the heart of the compiler
 --       if it occurs at all.
 --    
 --    3. The remaining cases are in order of increasing 
---         tag	(for 'DataAlts') or
---         lit	(for 'LitAlts').
+--         tag  (for 'DataAlts') or
+--         lit  (for 'LitAlts').
 --       This makes finding the relevant constructor easy, 
 --       and makes comparison easier too.
 --    
 --    4. The list of alternatives must be exhaustive. An /exhaustive/ case 
 --       does not necessarily mention all constructors:
 --    
---    	 @
---    	      data Foo = Red | Green | Blue
---    	 ... case x of 
---    	      Red   -> True
---    	      other -> f (case x of 
---    	                      Green -> ...
---    	                      Blue  -> ... ) ...
---    	 @
+--       @
+--            data Foo = Red | Green | Blue
+--       ... case x of 
+--            Red   -> True
+--            other -> f (case x of 
+--                            Green -> ...
+--                            Blue  -> ... ) ...
+--       @
 --    
---    	 The inner case does not need a @Red@ alternative, because @x@ 
---    	 can't be @Red@ at that program point.
+--       The inner case does not need a @Red@ alternative, because @x@ 
+--       can't be @Red@ at that program point.
 --
 -- *  Cast an expression to a particular type. 
 --    This is used to implement @newtype@s (a @newtype@ constructor or 
@@ -265,12 +259,12 @@ These data types are the heart of the compiler
 -- If you edit this type, you may need to update the GHC formalism
 -- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
 data Expr b
-  = Var	  Id
+  = Var   Id
   | Lit   Literal
   | App   (Expr b) (Arg b)
   | Lam   b (Expr b)
   | Let   (Bind b) (Expr b)
-  | Case  (Expr b) b Type [Alt b]	-- See #case_invariant#
+  | Case  (Expr b) b Type [Alt b]       -- See #case_invariant#
   | Cast  (Expr b) Coercion
   | Tick  (Tickish Id) (Expr b)
   | Type  Type
@@ -299,8 +293,8 @@ data AltCon
 
   | LitAlt  Literal   -- ^ A literal: @case e of { 1 -> ... }@
                       -- Invariant: always an *unlifted* literal
-		      -- See Note [Literal alternatives]
-	      	      
+                      -- See Note [Literal alternatives]
+                      
   | DEFAULT           -- ^ Trivial alternative: @case e of { _ -> ... }@
    deriving (Eq, Ord, Data, Typeable)
 
@@ -309,7 +303,7 @@ data AltCon
 -- If you edit this type, you may need to update the GHC formalism
 -- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
 data Bind b = NonRec b (Expr b)
-	    | Rec [(b, (Expr b))]
+            | Rec [(b, (Expr b))]
   deriving (Data, Typeable)
 \end{code}
 
@@ -428,9 +422,9 @@ unboxed type.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
               Ticks
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -520,9 +514,9 @@ tickishCanSplit _ = True
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Transformation rules}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The CoreRule type and its friends are dealt with mainly in CoreRules,
@@ -538,51 +532,51 @@ but CoreFVs, Subst, PprCore, CoreTidy also inspect the representation.
 --   as the rule itself
 data CoreRule
   = Rule { 
-	ru_name :: RuleName,            -- ^ Name of the rule, for communication with the user
-	ru_act  :: Activation,          -- ^ When the rule is active
-
-	-- Rough-matching stuff
-	-- see comments with InstEnv.ClsInst( is_cls, is_rough )
-	ru_fn    :: Name,	        -- ^ Name of the 'Id.Id' at the head of this rule
-	ru_rough :: [Maybe Name],	-- ^ Name at the head of each argument to the left hand side
-	
-	-- Proper-matching stuff
-	-- see comments with InstEnv.ClsInst( is_tvs, is_tys )
-	ru_bndrs :: [CoreBndr],         -- ^ Variables quantified over
-	ru_args  :: [CoreExpr],         -- ^ Left hand side arguments
-	
-	-- And the right-hand side
-	ru_rhs   :: CoreExpr,           -- ^ Right hand side of the rule
-		    			-- Occurrence info is guaranteed correct
-					-- See Note [OccInfo in unfoldings and rules]
-
-	-- Locality
-        ru_auto :: Bool,	-- ^ @True@  <=> this rule is auto-generated
-		   		--   @False@ <=> generated at the users behest
-				--   Main effect: reporting of orphan-hood
-
-	ru_local :: Bool	-- ^ @True@ iff the fn at the head of the rule is
-				-- defined in the same module as the rule
-				-- and is not an implicit 'Id' (like a record selector,
-				-- class operation, or data constructor)
-
-		-- NB: ru_local is *not* used to decide orphan-hood
-		--	c.g. MkIface.coreRuleToIfaceRule
+        ru_name :: RuleName,            -- ^ Name of the rule, for communication with the user
+        ru_act  :: Activation,          -- ^ When the rule is active
+
+        -- Rough-matching stuff
+        -- see comments with InstEnv.ClsInst( is_cls, is_rough )
+        ru_fn    :: Name,               -- ^ Name of the 'Id.Id' at the head of this rule
+        ru_rough :: [Maybe Name],       -- ^ Name at the head of each argument to the left hand side
+        
+        -- Proper-matching stuff
+        -- see comments with InstEnv.ClsInst( is_tvs, is_tys )
+        ru_bndrs :: [CoreBndr],         -- ^ Variables quantified over
+        ru_args  :: [CoreExpr],         -- ^ Left hand side arguments
+        
+        -- And the right-hand side
+        ru_rhs   :: CoreExpr,           -- ^ Right hand side of the rule
+                                        -- Occurrence info is guaranteed correct
+                                        -- See Note [OccInfo in unfoldings and rules]
+
+        -- Locality
+        ru_auto :: Bool,        -- ^ @True@  <=> this rule is auto-generated
+                                --   @False@ <=> generated at the users behest
+                                --   Main effect: reporting of orphan-hood
+
+        ru_local :: Bool        -- ^ @True@ iff the fn at the head of the rule is
+                                -- defined in the same module as the rule
+                                -- and is not an implicit 'Id' (like a record selector,
+                                -- class operation, or data constructor)
+
+                -- NB: ru_local is *not* used to decide orphan-hood
+                --      c.g. MkIface.coreRuleToIfaceRule
     }
 
   -- | Built-in rules are used for constant folding
   -- and suchlike.  They have no free variables.
   | BuiltinRule {               
-	ru_name  :: RuleName,   -- ^ As above
-	ru_fn    :: Name,       -- ^ As above
-	ru_nargs :: Int,	-- ^ Number of arguments that 'ru_try' consumes,
-				-- if it fires, including type arguments
-	ru_try   :: RuleFun
-		-- ^ This function does the rewrite.  It given too many
-		-- arguments, it simply discards them; the returned 'CoreExpr'
-		-- is just the rewrite of 'ru_fn' applied to the first 'ru_nargs' args
+        ru_name  :: RuleName,   -- ^ As above
+        ru_fn    :: Name,       -- ^ As above
+        ru_nargs :: Int,        -- ^ Number of arguments that 'ru_try' consumes,
+                                -- if it fires, including type arguments
+        ru_try   :: RuleFun
+                -- ^ This function does the rewrite.  It given too many
+                -- arguments, it simply discards them; the returned 'CoreExpr'
+                -- is just the rewrite of 'ru_fn' applied to the first 'ru_nargs' args
     }
-		-- See Note [Extra args in rule matching] in Rules.lhs
+                -- See Note [Extra args in rule matching] in Rules.lhs
 
 type RuleFun = DynFlags -> InScopeEnv -> Id -> [CoreExpr] -> Maybe CoreExpr
 type InScopeEnv = (InScopeSet, IdUnfoldingFun)
@@ -594,7 +588,7 @@ type IdUnfoldingFun = Id -> Unfolding
 
 isBuiltinRule :: CoreRule -> Bool
 isBuiltinRule (BuiltinRule {}) = True
-isBuiltinRule _		       = False
+isBuiltinRule _                = False
 
 -- | The number of arguments the 'ru_fn' must be applied 
 -- to before the rule can match on it
@@ -656,50 +650,50 @@ data Unfolding
   = NoUnfolding        -- ^ We have no information about the unfolding
 
   | OtherCon [AltCon]  -- ^ It ain't one of these constructors.
-		       -- @OtherCon xs@ also indicates that something has been evaluated
-		       -- and hence there's no point in re-evaluating it.
-		       -- @OtherCon []@ is used even for non-data-type values
-		       -- to indicated evaluated-ness.  Notably:
-		       --
-		       -- > data C = C !(Int -> Int)
-		       -- > case x of { C f -> ... }
-		       --
-		       -- Here, @f@ gets an @OtherCon []@ unfolding.
+                       -- @OtherCon xs@ also indicates that something has been evaluated
+                       -- and hence there's no point in re-evaluating it.
+                       -- @OtherCon []@ is used even for non-data-type values
+                       -- to indicated evaluated-ness.  Notably:
+                       --
+                       -- > data C = C !(Int -> Int)
+                       -- > case x of { C f -> ... }
+                       --
+                       -- Here, @f@ gets an @OtherCon []@ unfolding.
 
   | DFunUnfolding {     -- The Unfolding of a DFunId  
-    			-- See Note [DFun unfoldings]
-      		  	--     df = /\a1..am. \d1..dn. MkD t1 .. tk
+                        -- See Note [DFun unfoldings]
+                        --     df = /\a1..am. \d1..dn. MkD t1 .. tk
                         --                                 (op1 a1..am d1..dn)
-     		      	--     	    	      	       	   (op2 a1..am d1..dn)
+                        --                                 (op2 a1..am d1..dn)
         df_bndrs :: [Var],      -- The bound variables [a1..m],[d1..dn]
         df_con   :: DataCon,    -- The dictionary data constructor (never a newtype datacon)
         df_args  :: [CoreExpr]  -- Args of the data con: types, superclasses and methods,
     }                           -- in positional order
 
-  | CoreUnfolding {		-- An unfolding for an Id with no pragma, 
+  | CoreUnfolding {             -- An unfolding for an Id with no pragma, 
                                 -- or perhaps a NOINLINE pragma
-				-- (For NOINLINE, the phase, if any, is in the 
+                                -- (For NOINLINE, the phase, if any, is in the 
                                 -- InlinePragInfo for this Id.)
-	uf_tmpl       :: CoreExpr,	  -- Template; occurrence info is correct
-	uf_src        :: UnfoldingSource, -- Where the unfolding came from
-	uf_is_top     :: Bool,		-- True <=> top level binding
-	uf_arity      :: Arity,		-- Number of value arguments expected
-	uf_is_value   :: Bool,		-- exprIsHNF template (cached); it is ok to discard 
-		      			--	a `seq` on this variable
+        uf_tmpl       :: CoreExpr,        -- Template; occurrence info is correct
+        uf_src        :: UnfoldingSource, -- Where the unfolding came from
+        uf_is_top     :: Bool,          -- True <=> top level binding
+        uf_arity      :: Arity,         -- Number of value arguments expected
+        uf_is_value   :: Bool,          -- exprIsHNF template (cached); it is ok to discard 
+                                        --      a `seq` on this variable
         uf_is_conlike :: Bool,          -- True <=> applicn of constructor or CONLIKE function
                                         --      Cached version of exprIsConLike
-	uf_is_work_free :: Bool,		-- True <=> doesn't waste (much) work to expand 
+        uf_is_work_free :: Bool,                -- True <=> doesn't waste (much) work to expand 
                                         --          inside an inlining
-					-- 	Cached version of exprIsCheap
-	uf_expandable :: Bool,		-- True <=> can expand in RULE matching
-		      	 		--      Cached version of exprIsExpandable
-	uf_guidance   :: UnfoldingGuidance	-- Tells about the *size* of the template.
+                                        --      Cached version of exprIsCheap
+        uf_expandable :: Bool,          -- True <=> can expand in RULE matching
+                                        --      Cached version of exprIsExpandable
+        uf_guidance   :: UnfoldingGuidance      -- Tells about the *size* of the template.
     }
   -- ^ An unfolding with redundant cached information. Parameters:
   --
   --  uf_tmpl: Template used to perform unfolding; 
   --           NB: Occurrence info is guaranteed correct: 
-  --	           see Note [OccInfo in unfoldings and rules]
+  --               see Note [OccInfo in unfoldings and rules]
   --
   --  uf_is_top: Is this a top level binding?
   --
@@ -717,7 +711,7 @@ data UnfoldingSource
   = -- See also Note [Historical note: unfoldings for wrappers]
    
     InlineRhs          -- The current rhs of the function
-    		       -- Replace uf_tmpl each time around
+                       -- Replace uf_tmpl each time around
 
   | InlineStable       -- From an INLINE or INLINABLE pragma 
                        --   INLINE     if guidance is UnfWhen
@@ -729,15 +723,15 @@ data UnfoldingSource
                        -- work so it is consistent with the intended
                        -- meaning of INLINABLE).
                        --
-    		       -- uf_tmpl may change, but only as a result of
+                       -- uf_tmpl may change, but only as a result of
                        -- gentle simplification, it doesn't get updated
                        -- to the current RHS during compilation as with
                        -- InlineRhs.
                        --
-    		       -- See Note [InlineRules]
+                       -- See Note [InlineRules]
 
   | InlineCompulsory   -- Something that *has* no binding, so you *must* inline it
-    		       -- Only a few primop-like things have this property 
+                       -- Only a few primop-like things have this property 
                        -- (see MkId.lhs, calls to mkCompulsoryUnfolding).
                        -- Inline absolutely always, however boring the context.
 
@@ -745,29 +739,29 @@ data UnfoldingSource
 
 -- | 'UnfoldingGuidance' says when unfolding should take place
 data UnfoldingGuidance
-  = UnfWhen {	-- Inline without thinking about the *size* of the uf_tmpl
-    		-- Used (a) for small *and* cheap unfoldings
- 		--      (b) for INLINE functions 
+  = UnfWhen {   -- Inline without thinking about the *size* of the uf_tmpl
+                -- Used (a) for small *and* cheap unfoldings
+                --      (b) for INLINE functions 
                 -- See Note [INLINE for small functions] in CoreUnfold
-      ug_unsat_ok  :: Bool,	-- True <=> ok to inline even if unsaturated
+      ug_unsat_ok  :: Bool,     -- True <=> ok to inline even if unsaturated
       ug_boring_ok :: Bool      -- True <=> ok to inline even if the context is boring
-      		-- So True,True means "always"
+                -- So True,True means "always"
     }
 
-  | UnfIfGoodArgs {	-- Arose from a normal Id; the info here is the
-    		     	-- result of a simple analysis of the RHS
+  | UnfIfGoodArgs {     -- Arose from a normal Id; the info here is the
+                        -- result of a simple analysis of the RHS
 
       ug_args ::  [Int],  -- Discount if the argument is evaluated.
-			  -- (i.e., a simplification will definitely
-			  -- be possible).  One elt of the list per *value* arg.
+                          -- (i.e., a simplification will definitely
+                          -- be possible).  One elt of the list per *value* arg.
 
-      ug_size :: Int,	  -- The "size" of the unfolding.
+      ug_size :: Int,     -- The "size" of the unfolding.
 
-      ug_res :: Int	  -- Scrutinee discount: the discount to substract if the thing is in
-    }			  -- a context (case (thing args) of ...),
-			  -- (where there are the right number of arguments.)
+      ug_res :: Int       -- Scrutinee discount: the discount to substract if the thing is in
+    }                     -- a context (case (thing args) of ...),
+                          -- (where there are the right number of arguments.)
 
-  | UnfNever	    -- The RHS is big, so don't inline it
+  | UnfNever        -- The RHS is big, so don't inline it
 \end{code}
 
 Note [Historical note: unfoldings for wrappers]
@@ -841,8 +835,8 @@ mkOtherCon = OtherCon
 
 seqUnfolding :: Unfolding -> ()
 seqUnfolding (CoreUnfolding { uf_tmpl = e, uf_is_top = top, 
-		uf_is_value = b1, uf_is_work_free = b2, 
-	   	uf_expandable = b3, uf_is_conlike = b4,
+                uf_is_value = b1, uf_is_work_free = b2, 
+                uf_expandable = b3, uf_is_conlike = b4,
                 uf_arity = a, uf_guidance = g})
   = seqExpr e `seq` top `seq` b1 `seq` a `seq` b2 `seq` b3 `seq` b4 `seq` seqGuidance g
 
@@ -870,7 +864,7 @@ setUnfoldingTemplate unf rhs = unf { uf_tmpl = rhs }
 -- | Retrieves the template of an unfolding if possible
 maybeUnfoldingTemplate :: Unfolding -> Maybe CoreExpr
 maybeUnfoldingTemplate (CoreUnfolding { uf_tmpl = expr })       = Just expr
-maybeUnfoldingTemplate _                            		= Nothing
+maybeUnfoldingTemplate _                                        = Nothing
 
 -- | The constructors that the unfolding could never be: 
 -- returns @[]@ if no information is available
@@ -881,7 +875,7 @@ otherCons _               = []
 -- | Determines if it is certainly the case that the unfolding will
 -- yield a value (something in HNF): returns @False@ if unsure
 isValueUnfolding :: Unfolding -> Bool
-	-- Returns False for OtherCon
+        -- Returns False for OtherCon
 isValueUnfolding (CoreUnfolding { uf_is_value = is_evald }) = is_evald
 isValueUnfolding _                                          = False
 
@@ -889,8 +883,8 @@ isValueUnfolding _                                          = False
 -- yield a value. Unlike 'isValueUnfolding' it returns @True@
 -- for 'OtherCon'
 isEvaldUnfolding :: Unfolding -> Bool
-	-- Returns True for OtherCon
-isEvaldUnfolding (OtherCon _)		                    = True
+        -- Returns True for OtherCon
+isEvaldUnfolding (OtherCon _)                               = True
 isEvaldUnfolding (CoreUnfolding { uf_is_value = is_evald }) = is_evald
 isEvaldUnfolding _                                          = False
 
@@ -930,14 +924,14 @@ isStableUnfolding :: Unfolding -> Bool
 -- True of unfoldings that should not be overwritten 
 -- by a CoreUnfolding for the RHS of a let-binding
 isStableUnfolding (CoreUnfolding { uf_src = src }) = isStableSource src
-isStableUnfolding (DFunUnfolding {})		   = True
+isStableUnfolding (DFunUnfolding {})               = True
 isStableUnfolding _                                = False
 
 unfoldingArity :: Unfolding -> Arity
 unfoldingArity (CoreUnfolding { uf_arity = arity }) = arity
-unfoldingArity _	      		   	    = panic "unfoldingArity"
+unfoldingArity _                                    = panic "unfoldingArity"
 
-isClosedUnfolding :: Unfolding -> Bool		-- No free variables
+isClosedUnfolding :: Unfolding -> Bool          -- No free variables
 isClosedUnfolding (CoreUnfolding {}) = False
 isClosedUnfolding (DFunUnfolding {}) = False
 isClosedUnfolding _                  = True
@@ -953,7 +947,7 @@ neverUnfoldGuidance _        = False
 
 canUnfold :: Unfolding -> Bool
 canUnfold (CoreUnfolding { uf_guidance = g }) = not (neverUnfoldGuidance g)
-canUnfold _  				      = False
+canUnfold _                                   = False
 \end{code}
 
 Note [InlineRules]
@@ -965,8 +959,8 @@ you intend that calls (f e) are replaced by <rhs>[e/x] So we
 should capture (\x.<rhs>) in the Unfolding of 'f', and never meddle
 with it.  Meanwhile, we can optimise <rhs> to our heart's content,
 leaving the original unfolding intact in Unfolding of 'f'. For example
-	all xs = foldr (&&) True xs
-	any p = all . map p  {-# INLINE any #-}
+        all xs = foldr (&&) True xs
+        any p = all . map p  {-# INLINE any #-}
 We optimise any's RHS fully, but leave the InlineRule saying "all . map p",
 which deforests well at the call site.
 
@@ -1000,9 +994,9 @@ the occurrence info is wrong
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                   AltCon
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1024,7 +1018,7 @@ ltAlt a1 a2 = (a1 `cmpAlt` a2) == LT
 
 cmpAltCon :: AltCon -> AltCon -> Ordering
 -- ^ Compares 'AltCon's within a single list of alternatives
-cmpAltCon DEFAULT      DEFAULT	   = EQ
+cmpAltCon DEFAULT      DEFAULT     = EQ
 cmpAltCon DEFAULT      _           = LT
 
 cmpAltCon (DataAlt d1) (DataAlt d2) = dataConTag d1 `compare` dataConTag d2
@@ -1033,14 +1027,14 @@ cmpAltCon (LitAlt  l1) (LitAlt  l2) = l1 `compare` l2
 cmpAltCon (LitAlt _)   DEFAULT      = GT
 
 cmpAltCon con1 con2 = WARN( True, text "Comparing incomparable AltCons" <+> 
-			 	  ppr con1 <+> ppr con2 )
-		      LT
+                                  ppr con1 <+> ppr con2 )
+                      LT
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Useful synonyms}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [CoreProgram]
@@ -1067,7 +1061,7 @@ a list of CoreBind
 
 -- If you edit this type, you may need to update the GHC formalism
 -- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
-type CoreProgram = [CoreBind]	-- See Note [CoreProgram]
+type CoreProgram = [CoreBind]   -- See Note [CoreProgram]
 
 -- | The common case for the type of binders and variables when
 -- we are manipulating the Core language within GHC
@@ -1083,14 +1077,14 @@ type CoreAlt  = Alt  CoreBndr
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Tagging}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 -- | Binders are /tagged/ with a t
-data TaggedBndr t = TB CoreBndr t	-- TB for "tagged binder"
+data TaggedBndr t = TB CoreBndr t       -- TB for "tagged binder"
 
 type TaggedBind t = Bind (TaggedBndr t)
 type TaggedExpr t = Expr (TaggedBndr t)
@@ -1101,16 +1095,16 @@ instance Outputable b => Outputable (TaggedBndr b) where
   ppr (TB b l) = char '<' <> ppr b <> comma <> ppr l <> char '>'
 
 instance Outputable b => OutputableBndr (TaggedBndr b) where
-  pprBndr _ b = ppr b	-- Simple
+  pprBndr _ b = ppr b   -- Simple
   pprInfixOcc  b = ppr b
   pprPrefixOcc b = ppr b
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Core-constructing functions with checking}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1127,7 +1121,7 @@ mkVarApps :: Expr b -> [Var] -> Expr b
 -- use 'MkCore.mkCoreConApps' if possible
 mkConApp      :: DataCon -> [Arg b] -> Expr b
 
-mkApps    f args = foldl App		  	   f args
+mkApps    f args = foldl App                       f args
 mkTyApps  f args = foldl (\ e a -> App e (Type a)) f args
 mkCoApps  f args = foldl (\ e a -> App e (Coercion a)) f args
 mkVarApps f vars = foldl (\ e a -> App e (varToCoreExpr a)) f vars
@@ -1197,10 +1191,10 @@ mkDoubleLitDouble d = Lit (mkMachDouble (toRational d))
 
 -- | Bind all supplied binding groups over an expression in a nested let expression. Prefer to
 -- use 'MkCore.mkCoreLets' if possible
-mkLets	      :: [Bind b] -> Expr b -> Expr b
+mkLets        :: [Bind b] -> Expr b -> Expr b
 -- | Bind all supplied binders over an expression in a nested lambda expression. Prefer to
 -- use 'MkCore.mkCoreLams' if possible
-mkLams	      :: [b] -> Expr b -> Expr b
+mkLams        :: [b] -> Expr b -> Expr b
 
 mkLams binders body = foldr Lam body binders
 mkLets binds body   = foldr Let body binds
@@ -1228,9 +1222,9 @@ varsToCoreExprs vs = map varToCoreExpr vs
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Simple access functions}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1257,27 +1251,27 @@ rhssOfAlts alts = [e | (_,_,e) <- alts]
 flattenBinds :: [Bind b] -> [(b, Expr b)]
 flattenBinds (NonRec b r : binds) = (b,r) : flattenBinds binds
 flattenBinds (Rec prs1   : binds) = prs1 ++ flattenBinds binds
-flattenBinds []			  = []
+flattenBinds []                   = []
 \end{code}
 
 \begin{code}
 -- | We often want to strip off leading lambdas before getting down to
 -- business. This function is your friend.
-collectBinders	             :: Expr b -> ([b],         Expr b)
+collectBinders               :: Expr b -> ([b],         Expr b)
 -- | Collect as many type bindings as possible from the front of a nested lambda
-collectTyBinders       	     :: CoreExpr -> ([TyVar],     CoreExpr)
+collectTyBinders             :: CoreExpr -> ([TyVar],     CoreExpr)
 -- | Collect as many value bindings as possible from the front of a nested lambda
-collectValBinders      	     :: CoreExpr -> ([Id],        CoreExpr)
+collectValBinders            :: CoreExpr -> ([Id],        CoreExpr)
 -- | Collect type binders from the front of the lambda first, 
 -- then follow up by collecting as many value bindings as possible
 -- from the resulting stripped expression
-collectTyAndValBinders 	     :: CoreExpr -> ([TyVar], [Id], CoreExpr)
+collectTyAndValBinders       :: CoreExpr -> ([TyVar], [Id], CoreExpr)
 
 collectBinders expr
   = go [] expr
   where
     go bs (Lam b e) = go (b:bs) e
-    go bs e	     = (reverse bs, e)
+    go bs e          = (reverse bs, e)
 
 collectTyAndValBinders expr
   = (tvs, ids, body)
@@ -1289,13 +1283,13 @@ collectTyBinders expr
   = go [] expr
   where
     go tvs (Lam b e) | isTyVar b = go (b:tvs) e
-    go tvs e			 = (reverse tvs, e)
+    go tvs e                     = (reverse tvs, e)
 
 collectValBinders expr
   = go [] expr
   where
     go ids (Lam b e) | isId b = go (b:ids) e
-    go ids body		      = (reverse ids, body)
+    go ids body               = (reverse ids, body)
 \end{code}
 
 \begin{code}
@@ -1306,13 +1300,13 @@ collectArgs expr
   = go expr []
   where
     go (App f a) as = go f (a:as)
-    go e 	 as = (e, as)
+    go e         as = (e, as)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Predicates}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 At one time we optionally carried type arguments through to runtime.
@@ -1359,9 +1353,9 @@ valArgCount = count isValArg
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Seq stuff}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1413,9 +1407,9 @@ seqRules (BuiltinRule {} : rules) = seqRules rules
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Annotated core}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1424,16 +1418,16 @@ type AnnExpr bndr annot = (annot, AnnExpr' bndr annot)
 
 -- | A clone of the 'Expr' type but allowing annotation at every tree node
 data AnnExpr' bndr annot
-  = AnnVar	Id
-  | AnnLit	Literal
-  | AnnLam	bndr (AnnExpr bndr annot)
-  | AnnApp	(AnnExpr bndr annot) (AnnExpr bndr annot)
-  | AnnCase	(AnnExpr bndr annot) bndr Type [AnnAlt bndr annot]
-  | AnnLet	(AnnBind bndr annot) (AnnExpr bndr annot)
+  = AnnVar      Id
+  | AnnLit      Literal
+  | AnnLam      bndr (AnnExpr bndr annot)
+  | AnnApp      (AnnExpr bndr annot) (AnnExpr bndr annot)
+  | AnnCase     (AnnExpr bndr annot) bndr Type [AnnAlt bndr annot]
+  | AnnLet      (AnnBind bndr annot) (AnnExpr bndr annot)
   | AnnCast     (AnnExpr bndr annot) (annot, Coercion)
-    		   -- Put an annotation on the (root of) the coercion
+                   -- Put an annotation on the (root of) the coercion
   | AnnTick     (Tickish Id) (AnnExpr bndr annot)
-  | AnnType	Type
+  | AnnType     Type
   | AnnCoercion Coercion
 
 -- | A clone of the 'Alt' type but allowing annotation at every tree node
@@ -1453,7 +1447,7 @@ collectAnnArgs expr
   = go expr []
   where
     go (_, AnnApp f a) as = go f (a:as)
-    go e 	       as = (e, as)
+    go e               as = (e, as)
 \end{code}
 
 \begin{code}
@@ -1490,5 +1484,5 @@ collectAnnBndrs e
   = collect [] e
   where
     collect bs (_, AnnLam b body) = collect (b:bs) body
-    collect bs body		  = (reverse bs, body)
+    collect bs body               = (reverse bs, body)
 \end{code}
diff --git a/compiler/coreSyn/CoreTidy.lhs b/compiler/coreSyn/CoreTidy.lhs
index 8c0ae4a..a547de3 100644
--- a/compiler/coreSyn/CoreTidy.lhs
+++ b/compiler/coreSyn/CoreTidy.lhs
@@ -7,15 +7,9 @@ This module contains "tidying" code for *nested* expressions, bindings, rules.
 The code for *top-level* bindings is in TidyPgm.
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module CoreTidy (
-	tidyExpr, tidyVarOcc, tidyRule, tidyRules, tidyUnfolding
+        tidyExpr, tidyVarOcc, tidyRule, tidyRules, tidyUnfolding
     ) where
 
 #include "HsVersions.h"
@@ -38,15 +32,15 @@ import Outputable
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Tidying expressions, rules}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 tidyBind :: TidyEnv
-	 -> CoreBind
-	 ->  (TidyEnv, CoreBind)
+         -> CoreBind
+         ->  (TidyEnv, CoreBind)
 
 tidyBind env (NonRec bndr rhs)
   = tidyLetBndr env env (bndr,rhs) =: \ (env', bndr') ->
@@ -56,37 +50,37 @@ tidyBind env (Rec prs)
   = let 
        (env', bndrs') = mapAccumL (tidyLetBndr env') env prs
     in
-    map (tidyExpr env') (map snd prs)	=: \ rhss' ->
+    map (tidyExpr env') (map snd prs)   =: \ rhss' ->
     (env', Rec (zip bndrs' rhss'))
 
 
 ------------  Expressions  --------------
 tidyExpr :: TidyEnv -> CoreExpr -> CoreExpr
-tidyExpr env (Var v)   	 =  Var (tidyVarOcc env v)
+tidyExpr env (Var v)     =  Var (tidyVarOcc env v)
 tidyExpr env (Type ty)  =  Type (tidyType env ty)
 tidyExpr env (Coercion co) = Coercion (tidyCo env co)
 tidyExpr _   (Lit lit)   =  Lit lit
-tidyExpr env (App f a) 	 =  App (tidyExpr env f) (tidyExpr env a)
+tidyExpr env (App f a)   =  App (tidyExpr env f) (tidyExpr env a)
 tidyExpr env (Tick t e) =  Tick (tidyTickish env t) (tidyExpr env e)
 tidyExpr env (Cast e co) =  Cast (tidyExpr env e) (tidyCo env co)
 
 tidyExpr env (Let b e) 
-  = tidyBind env b 	=: \ (env', b') ->
+  = tidyBind env b      =: \ (env', b') ->
     Let b' (tidyExpr env' e)
 
 tidyExpr env (Case e b ty alts)
-  = tidyBndr env b 	=: \ (env', b) ->
+  = tidyBndr env b      =: \ (env', b) ->
     Case (tidyExpr env e) b (tidyType env ty) 
-	 (map (tidyAlt b env') alts)
+         (map (tidyAlt b env') alts)
 
 tidyExpr env (Lam b e)
-  = tidyBndr env b 	=: \ (env', b) ->
+  = tidyBndr env b      =: \ (env', b) ->
     Lam b (tidyExpr env' e)
 
 ------------  Case alternatives  --------------
 tidyAlt :: CoreBndr -> TidyEnv -> CoreAlt -> CoreAlt
 tidyAlt _case_bndr env (con, vs, rhs)
-  = tidyBndrs env vs 	=: \ (env', vs) ->
+  = tidyBndrs env vs    =: \ (env', vs) ->
     (con, vs, tidyExpr env' rhs)
 
 ------------  Tickish  --------------
@@ -98,27 +92,27 @@ tidyTickish _   other_tickish       = other_tickish
 tidyRules :: TidyEnv -> [CoreRule] -> [CoreRule]
 tidyRules _   [] = []
 tidyRules env (rule : rules)
-  = tidyRule env rule  		=: \ rule ->
-    tidyRules env rules 	=: \ rules ->
+  = tidyRule env rule           =: \ rule ->
+    tidyRules env rules         =: \ rules ->
     (rule : rules)
 
 tidyRule :: TidyEnv -> CoreRule -> CoreRule
 tidyRule _   rule@(BuiltinRule {}) = rule
 tidyRule env rule@(Rule { ru_bndrs = bndrs, ru_args = args, ru_rhs = rhs,
-			  ru_fn = fn, ru_rough = mb_ns })
-  = tidyBndrs env bndrs		=: \ (env', bndrs) ->
-    map (tidyExpr env') args  	=: \ args ->
+                          ru_fn = fn, ru_rough = mb_ns })
+  = tidyBndrs env bndrs         =: \ (env', bndrs) ->
+    map (tidyExpr env') args    =: \ args ->
     rule { ru_bndrs = bndrs, ru_args = args, 
-	   ru_rhs   = tidyExpr env' rhs,
-	   ru_fn    = tidyNameOcc env fn, 
-	   ru_rough = map (fmap (tidyNameOcc env')) mb_ns }
+           ru_rhs   = tidyExpr env' rhs,
+           ru_fn    = tidyNameOcc env fn, 
+           ru_rough = map (fmap (tidyNameOcc env')) mb_ns }
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Tidying non-top-level binders}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -126,8 +120,8 @@ tidyNameOcc :: TidyEnv -> Name -> Name
 -- In rules and instances, we have Names, and we must tidy them too
 -- Fortunately, we can lookup in the VarEnv with a name
 tidyNameOcc (_, var_env) n = case lookupUFM var_env n of
-				Nothing -> n
-				Just v  -> idName v
+                                Nothing -> n
+                                Just v  -> idName v
 
 tidyVarOcc :: TidyEnv -> Var -> Var
 tidyVarOcc (_, var_env) v = lookupVarEnv var_env v `orElse` v
@@ -141,8 +135,8 @@ tidyBndr env var
 tidyBndrs :: TidyEnv -> [Var] -> (TidyEnv, [Var])
 tidyBndrs env vars = mapAccumL tidyBndr env vars
 
-tidyLetBndr :: TidyEnv	       -- Knot-tied version for unfoldings
-            -> TidyEnv 	       -- The one to extend
+tidyLetBndr :: TidyEnv         -- Knot-tied version for unfoldings
+            -> TidyEnv         -- The one to extend
             -> (Id, CoreExpr) -> (TidyEnv, Var)
 -- Used for local (non-top-level) let(rec)s
 tidyLetBndr rec_tidy_env env (id,rhs) 
@@ -153,32 +147,32 @@ tidyLetBndr rec_tidy_env env (id,rhs)
        -- Override the env we get back from tidyId with the 
        -- new IdInfo so it gets propagated to the usage sites.
 
-	-- We need to keep around any interesting strictness and
-	-- demand info because later on we may need to use it when
-	-- converting to A-normal form.
-	-- eg.
-	--	f (g x),  where f is strict in its argument, will be converted
-	--	into  case (g x) of z -> f z  by CorePrep, but only if f still
-	-- 	has its strictness info.
-	--
-	-- Similarly for the demand info - on a let binder, this tells 
-	-- CorePrep to turn the let into a case.
-	--
-	-- Similarly arity info for eta expansion in CorePrep
-	-- 
-	-- Set inline-prag info so that we preseve it across 
-	-- separate compilation boundaries
+        -- We need to keep around any interesting strictness and
+        -- demand info because later on we may need to use it when
+        -- converting to A-normal form.
+        -- eg.
+        --      f (g x),  where f is strict in its argument, will be converted
+        --      into  case (g x) of z -> f z  by CorePrep, but only if f still
+        --      has its strictness info.
+        --
+        -- Similarly for the demand info - on a let binder, this tells 
+        -- CorePrep to turn the let into a case.
+        --
+        -- Similarly arity info for eta expansion in CorePrep
+        -- 
+        -- Set inline-prag info so that we preseve it across 
+        -- separate compilation boundaries
     final_id = new_id `setIdInfo` new_info
     idinfo   = idInfo id
     new_info = idInfo new_id
-		`setArityInfo`		exprArity rhs
-                `setStrictnessInfo`	strictnessInfo idinfo
-                `setDemandInfo`	        demandInfo idinfo
-		`setInlinePragInfo`	inlinePragInfo idinfo
-		`setUnfoldingInfo`	new_unf
+                `setArityInfo`          exprArity rhs
+                `setStrictnessInfo`     strictnessInfo idinfo
+                `setDemandInfo`         demandInfo idinfo
+                `setInlinePragInfo`     inlinePragInfo idinfo
+                `setUnfoldingInfo`      new_unf
 
     new_unf | isStableUnfolding unf = tidyUnfolding rec_tidy_env unf (panic "tidy_unf")
-            | otherwise	            = noUnfolding
+            | otherwise             = noUnfolding
     unf = unfoldingInfo idinfo
 
 -- Non-top-level variables
@@ -188,18 +182,18 @@ tidyIdBndr env@(tidy_env, var_env) id
     -- stuff in the OccName.
     case tidyOccName tidy_env (getOccName id) of { (tidy_env', occ') -> 
     let 
-	-- Give the Id a fresh print-name, *and* rename its type
-	-- The SrcLoc isn't important now, 
-	-- though we could extract it from the Id
-	-- 
+        -- Give the Id a fresh print-name, *and* rename its type
+        -- The SrcLoc isn't important now, 
+        -- though we could extract it from the Id
+        -- 
         ty'      = tidyType env (idType id)
         name'    = mkInternalName (idUnique id) occ' noSrcSpan
-	id'      = mkLocalIdWithInfo name' ty' new_info
-	var_env' = extendVarEnv var_env id id'
+        id'      = mkLocalIdWithInfo name' ty' new_info
+        var_env' = extendVarEnv var_env id id'
 
-	-- Note [Tidy IdInfo]
+        -- Note [Tidy IdInfo]
         new_info = vanillaIdInfo `setOccInfo` occInfo old_info
-	old_info = idInfo id
+        old_info = idInfo id
     in
     ((tidy_env', var_env'), id')
    }
@@ -215,10 +209,10 @@ tidyUnfolding tidy_env
               unf@(CoreUnfolding { uf_tmpl = unf_rhs, uf_src = src })
               unf_from_rhs
   | isStableSource src
-  = unf { uf_tmpl = tidyExpr tidy_env unf_rhs }	   -- Preserves OccInfo
+  = unf { uf_tmpl = tidyExpr tidy_env unf_rhs }    -- Preserves OccInfo
   | otherwise
   = unf_from_rhs
-tidyUnfolding _ unf _ = unf	-- NoUnfolding or OtherCon
+tidyUnfolding _ unf _ = unf     -- NoUnfolding or OtherCon
 \end{code}
 
 Note [Tidy IdInfo]
diff --git a/compiler/coreSyn/CoreUnfold.lhs b/compiler/coreSyn/CoreUnfold.lhs
index 46ec56a..f06d3ca 100644
--- a/compiler/coreSyn/CoreUnfold.lhs
+++ b/compiler/coreSyn/CoreUnfold.lhs
@@ -15,28 +15,22 @@ literal'').  In the corner of a @CoreUnfolding@ unfolding, you will
 find, unsurprisingly, a Core expression.
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module CoreUnfold (
-	Unfolding, UnfoldingGuidance,	-- Abstract types
+        Unfolding, UnfoldingGuidance,   -- Abstract types
 
-	noUnfolding, mkImplicitUnfolding, 
+        noUnfolding, mkImplicitUnfolding, 
         mkUnfolding, mkCoreUnfolding,
-	mkTopUnfolding, mkSimpleUnfolding,
-	mkInlineUnfolding, mkInlinableUnfolding, mkWwInlineRule,
-	mkCompulsoryUnfolding, mkDFunUnfolding,
+        mkTopUnfolding, mkSimpleUnfolding,
+        mkInlineUnfolding, mkInlinableUnfolding, mkWwInlineRule,
+        mkCompulsoryUnfolding, mkDFunUnfolding,
 
-	interestingArg, ArgSummary(..),
+        interestingArg, ArgSummary(..),
 
-	couldBeSmallEnoughToInline, inlineBoringOk,
-	certainlyWillInline, smallEnoughToInline,
+        couldBeSmallEnoughToInline, inlineBoringOk,
+        certainlyWillInline, smallEnoughToInline,
 
-	callSiteInline, CallCtxt(..),
+        callSiteInline, CallCtxt(..),
 
         -- Reexport from CoreSubst (it only live there so it can be used
         -- by the Very Simple Optimiser)
@@ -47,7 +41,7 @@ module CoreUnfold (
 
 import DynFlags
 import CoreSyn
-import PprCore		()	-- Instances
+import PprCore          ()      -- Instances
 import OccurAnal        ( occurAnalyseExpr )
 import CoreSubst hiding( substTy )
 import CoreArity       ( manifestArity, exprBotStrictness_maybe )
@@ -57,7 +51,7 @@ import DataCon
 import Literal
 import PrimOp
 import IdInfo
-import BasicTypes	( Arity )
+import BasicTypes       ( Arity )
 import Type
 import PrelNames
 import TysPrim          ( realWorldStatePrimTy )
@@ -74,9 +68,9 @@ import Data.Maybe
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Making unfoldings}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -108,7 +102,7 @@ mkWwInlineRule expr arity
                    (UnfWhen unSaturatedOk boringCxtNotOk)
 
 mkCompulsoryUnfolding :: CoreExpr -> Unfolding
-mkCompulsoryUnfolding expr	   -- Used for things that absolutely must be unfolded
+mkCompulsoryUnfolding expr         -- Used for things that absolutely must be unfolded
   = mkCoreUnfolding InlineCompulsory True
                     (simpleOptExpr expr) 0    -- Arity of unfolding doesn't matter
                     (UnfWhen unSaturatedOk boringCxtOk)
@@ -116,9 +110,9 @@ mkCompulsoryUnfolding expr	   -- Used for things that absolutely must be unfolde
 mkInlineUnfolding :: Maybe Arity -> CoreExpr -> Unfolding
 mkInlineUnfolding mb_arity expr 
   = mkCoreUnfolding InlineStable
-    		    True 	 -- Note [Top-level flag on inline rules]
+                    True         -- Note [Top-level flag on inline rules]
                     expr' arity 
-		    (UnfWhen unsat_ok boring_ok)
+                    (UnfWhen unsat_ok boring_ok)
   where
     expr' = simpleOptExpr expr
     (unsat_ok, arity) = case mb_arity of
@@ -142,15 +136,15 @@ mkCoreUnfolding :: UnfoldingSource -> Bool -> CoreExpr
                 -> Arity -> UnfoldingGuidance -> Unfolding
 -- Occurrence-analyses the expression before capturing it
 mkCoreUnfolding src top_lvl expr arity guidance 
-  = CoreUnfolding { uf_tmpl   	    = occurAnalyseExpr expr,
-    		    uf_src          = src,
-    		    uf_arity        = arity,
-		    uf_is_top 	    = top_lvl,
-		    uf_is_value     = exprIsHNF        expr,
+  = CoreUnfolding { uf_tmpl         = occurAnalyseExpr expr,
+                    uf_src          = src,
+                    uf_arity        = arity,
+                    uf_is_top       = top_lvl,
+                    uf_is_value     = exprIsHNF        expr,
                     uf_is_conlike   = exprIsConLike    expr,
-		    uf_is_work_free = exprIsWorkFree   expr,
-		    uf_expandable   = exprIsExpandable expr,
-		    uf_guidance     = guidance }
+                    uf_is_work_free = exprIsWorkFree   expr,
+                    uf_expandable   = exprIsExpandable expr,
+                    uf_guidance     = guidance }
 
 mkUnfolding :: DynFlags -> UnfoldingSource -> Bool -> Bool -> CoreExpr
             -> Unfolding
@@ -161,19 +155,19 @@ mkUnfolding dflags src top_lvl is_bottoming expr
   , not (exprIsTrivial expr)
   = NoUnfolding    -- See Note [Do not inline top-level bottoming functions]
   | otherwise
-  = CoreUnfolding { uf_tmpl   	    = occurAnalyseExpr expr,
-    		    uf_src          = src,
-    		    uf_arity        = arity,
-		    uf_is_top 	    = top_lvl,
-		    uf_is_value     = exprIsHNF        expr,
+  = CoreUnfolding { uf_tmpl         = occurAnalyseExpr expr,
+                    uf_src          = src,
+                    uf_arity        = arity,
+                    uf_is_top       = top_lvl,
+                    uf_is_value     = exprIsHNF        expr,
                     uf_is_conlike   = exprIsConLike    expr,
-		    uf_expandable   = exprIsExpandable expr,
-		    uf_is_work_free = exprIsWorkFree   expr,
-		    uf_guidance     = guidance }
+                    uf_expandable   = exprIsExpandable expr,
+                    uf_is_work_free = exprIsWorkFree   expr,
+                    uf_guidance     = guidance }
   where
     (arity, guidance) = calcUnfoldingGuidance dflags expr
         -- NB: *not* (calcUnfoldingGuidance (occurAnalyseExpr expr))!
-	-- See Note [Calculate unfolding guidance on the non-occ-anal'd expression]
+        -- See Note [Calculate unfolding guidance on the non-occ-anal'd expression]
 \end{code}
 
 Note [Calculate unfolding guidance on the non-occ-anal'd expression]
@@ -201,9 +195,9 @@ let-bound things that are dead are usually caught by preInlineUnconditionally
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{The UnfoldingGuidance type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -225,9 +219,9 @@ inlineBoringOk e
     go credit (App f a) | credit > 0  
                         , exprIsTrivial a  = go (credit-1) f
     go credit (Tick _ e)                 = go credit e -- dubious
-    go credit (Cast e _) 		   = go credit e
-    go _      (Var {})         		   = boringCxtOk
-    go _      _                		   = boringCxtNotOk
+    go credit (Cast e _)                   = go credit e
+    go _      (Var {})                     = boringCxtOk
+    go _      _                            = boringCxtNotOk
 
 calcUnfoldingGuidance
         :: DynFlags
@@ -239,18 +233,18 @@ calcUnfoldingGuidance dflags expr
         bOMB_OUT_SIZE = ufCreationThreshold dflags
                -- Bomb out if size gets bigger than this
         val_bndrs   = filter isId bndrs
-	n_val_bndrs = length val_bndrs
+        n_val_bndrs = length val_bndrs
 
-    	guidance 
+        guidance 
           = case sizeExpr dflags (iUnbox bOMB_OUT_SIZE) val_bndrs body of
-      	      TooBig -> UnfNever
-      	      SizeIs size cased_bndrs scrut_discount
-      	        | uncondInline expr n_val_bndrs (iBox size)
-      	        -> UnfWhen unSaturatedOk boringCxtOk   -- Note [INLINE for small functions]
-	        | otherwise
-      	        -> UnfIfGoodArgs { ug_args  = map (discount cased_bndrs) val_bndrs
-      	                         , ug_size  = iBox size
-      	        	  	 , ug_res   = iBox scrut_discount }
+              TooBig -> UnfNever
+              SizeIs size cased_bndrs scrut_discount
+                | uncondInline expr n_val_bndrs (iBox size)
+                -> UnfWhen unSaturatedOk boringCxtOk   -- Note [INLINE for small functions]
+                | otherwise
+                -> UnfIfGoodArgs { ug_args  = map (discount cased_bndrs) val_bndrs
+                                 , ug_size  = iBox size
+                                 , ug_res   = iBox scrut_discount }
 
         discount :: Bag (Id,Int) -> Id -> Int
         discount cbs bndr = foldlBag combine 0 cbs
@@ -285,14 +279,14 @@ heuristics right has taken a long time.  Here's the basic strategy:
 
 Examples
 
-  Size	Term
+  Size  Term
   --------------
-    0	  42#
-    0	  x
+    0     42#
+    0     x
     0     True
-    2	  f x
-    1	  Just x
-    4 	  f (g x)
+    2     f x
+    1     Just x
+    4     f (g x)
 
 Notice that 'x' counts 0, while (f x) counts 2.  That's deliberate: there's
 a function call to account for.  Notice also that constructor applications 
@@ -312,7 +306,7 @@ Do not re-inline them!  But we *do* still inline if they are very small
 
 Note [INLINE for small functions]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider	{-# INLINE f #-}
+Consider        {-# INLINE f #-}
                 f x = Just x
                 g y = f y
 Then f's RHS is no larger than its LHS, so we should inline it into
@@ -324,11 +318,11 @@ Things to note:
 
 (1) We inline *unconditionally* if inlined thing is smaller (using sizeExpr)
     than the thing it's replacing.  Notice that
-      (f x) --> (g 3) 		  -- YES, unconditionally
-      (f x) --> x : []		  -- YES, *even though* there are two
-      	    	    		  --      arguments to the cons
-      x     --> g 3		  -- NO
-      x	    --> Just v		  -- NO
+      (f x) --> (g 3)             -- YES, unconditionally
+      (f x) --> x : []            -- YES, *even though* there are two
+                                  --      arguments to the cons
+      x     --> g 3               -- NO
+      x     --> Just v            -- NO
 
     It's very important not to unconditionally replace a variable by
     a non-atomic term.
@@ -375,11 +369,11 @@ uncondInline rhs arity size
 
 \begin{code}
 sizeExpr :: DynFlags
-         -> FastInt 	    -- Bomb out if it gets bigger than this
-	 -> [Id]	    -- Arguments; we're interested in which of these
-			    -- get case'd
-	 -> CoreExpr
-	 -> ExprSize
+         -> FastInt         -- Bomb out if it gets bigger than this
+         -> [Id]            -- Arguments; we're interested in which of these
+                            -- get case'd
+         -> CoreExpr
+         -> ExprSize
 
 -- Note [Computing the size of an expression]
 
@@ -406,11 +400,11 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
       | otherwise = size_up e
 
     size_up (Let (NonRec binder rhs) body)
-      = size_up rhs		`addSizeNSD`
-	size_up body		`addSizeN`
+      = size_up rhs             `addSizeNSD`
+        size_up body            `addSizeN`
         (if isUnLiftedType (idType binder) then 0 else 10)
-		-- For the allocation
-		-- If the binder has an unlifted type there is no allocation
+                -- For the allocation
+                -- If the binder has an unlifted type there is no allocation
 
     size_up (Let (Rec pairs) body)
       = foldr (addSizeNSD . size_up . snd) 
@@ -418,28 +412,28 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
               pairs
 
     size_up (Case (Var v) _ _ alts) 
-	| v `elem` top_args		-- We are scrutinising an argument variable
-	= alts_size (foldr addAltSize sizeZero alt_sizes)
-		    (foldr maxSize    sizeZero alt_sizes)
-		-- Good to inline if an arg is scrutinised, because
-		-- that may eliminate allocation in the caller
-		-- And it eliminates the case itself
-	where
-	  alt_sizes = map size_up_alt alts
-
-		-- alts_size tries to compute a good discount for
-		-- the case when we are scrutinising an argument variable
-	  alts_size (SizeIs tot tot_disc tot_scrut)  -- Size of all alternatives
-		    (SizeIs max _        _)          -- Size of biggest alternative
+        | v `elem` top_args             -- We are scrutinising an argument variable
+        = alts_size (foldr addAltSize sizeZero alt_sizes)
+                    (foldr maxSize    sizeZero alt_sizes)
+                -- Good to inline if an arg is scrutinised, because
+                -- that may eliminate allocation in the caller
+                -- And it eliminates the case itself
+        where
+          alt_sizes = map size_up_alt alts
+
+                -- alts_size tries to compute a good discount for
+                -- the case when we are scrutinising an argument variable
+          alts_size (SizeIs tot tot_disc tot_scrut)  -- Size of all alternatives
+                    (SizeIs max _        _)          -- Size of biggest alternative
                 = SizeIs tot (unitBag (v, iBox (_ILIT(20) +# tot -# max)) `unionBags` tot_disc) tot_scrut
-			-- If the variable is known, we produce a discount that
-			-- will take us back to 'max', the size of the largest alternative
-			-- The 1+ is a little discount for reduced allocation in the caller
-			--
-			-- Notice though, that we return tot_disc, the total discount from 
-			-- all branches.  I think that's right.
+                        -- If the variable is known, we produce a discount that
+                        -- will take us back to 'max', the size of the largest alternative
+                        -- The 1+ is a little discount for reduced allocation in the caller
+                        --
+                        -- Notice though, that we return tot_disc, the total discount from 
+                        -- all branches.  I think that's right.
 
-	  alts_size tot_size _ = tot_size
+          alts_size tot_size _ = tot_size
 
     size_up (Case e _ _ alts) = size_up e  `addSizeNSD`
                                 foldr (addAltSize . size_up_alt) case_size alts
@@ -480,9 +474,9 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
     ------------ 
     -- size_up_app is used when there's ONE OR MORE value args
     size_up_app (App fun arg) args voids
-	| isTyCoArg arg                  = size_up_app fun args voids
-	| isRealWorldExpr arg            = size_up_app fun (arg:args) (voids + 1)
-	| otherwise		         = size_up arg  `addSizeNSD`
+        | isTyCoArg arg                  = size_up_app fun args voids
+        | isRealWorldExpr arg            = size_up_app fun (arg:args) (voids + 1)
+        | otherwise                      = size_up arg  `addSizeNSD`
                                            size_up_app fun (arg:args) voids
     size_up_app (Var fun)     args voids = size_up_call fun args voids
     size_up_app other         args voids = size_up other `addSizeN` (length args - voids)
@@ -494,38 +488,38 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
            FCallId _        -> sizeN (10 * (1 + length val_args))
            DataConWorkId dc -> conSize    dc (length val_args)
            PrimOpId op      -> primOpSize op (length val_args)
-	   ClassOpId _ 	    -> classOpSize dflags top_args val_args
-	   _     	    -> funSize dflags top_args fun (length val_args) voids
+           ClassOpId _      -> classOpSize dflags top_args val_args
+           _                -> funSize dflags top_args fun (length val_args) voids
 
     ------------ 
     size_up_alt (_con, _bndrs, rhs) = size_up rhs `addSizeN` 10
- 	-- Don't charge for args, so that wrappers look cheap
-	-- (See comments about wrappers with Case)
-	--
-	-- IMPORATANT: *do* charge 1 for the alternative, else we 
-	-- find that giant case nests are treated as practically free
-	-- A good example is Foreign.C.Error.errrnoToIOError
+        -- Don't charge for args, so that wrappers look cheap
+        -- (See comments about wrappers with Case)
+        --
+        -- IMPORATANT: *do* charge 1 for the alternative, else we 
+        -- find that giant case nests are treated as practically free
+        -- A good example is Foreign.C.Error.errrnoToIOError
 
     ------------
-	-- These addSize things have to be here because
-	-- I don't want to give them bOMB_OUT_SIZE as an argument
+        -- These addSize things have to be here because
+        -- I don't want to give them bOMB_OUT_SIZE as an argument
     addSizeN TooBig          _  = TooBig
-    addSizeN (SizeIs n xs d) m 	= mkSizeIs bOMB_OUT_SIZE (n +# iUnbox m) xs d
+    addSizeN (SizeIs n xs d) m  = mkSizeIs bOMB_OUT_SIZE (n +# iUnbox m) xs d
     
         -- addAltSize is used to add the sizes of case alternatives
-    addAltSize TooBig	         _	= TooBig
-    addAltSize _		 TooBig	= TooBig
+    addAltSize TooBig            _      = TooBig
+    addAltSize _                 TooBig = TooBig
     addAltSize (SizeIs n1 xs d1) (SizeIs n2 ys d2) 
-	= mkSizeIs bOMB_OUT_SIZE (n1 +# n2) 
+        = mkSizeIs bOMB_OUT_SIZE (n1 +# n2) 
                                  (xs `unionBags` ys) 
                                  (d1 +# d2)   -- Note [addAltSize result discounts]
 
         -- This variant ignores the result discount from its LEFT argument
-	-- It's used when the second argument isn't part of the result
-    addSizeNSD TooBig	         _	= TooBig
-    addSizeNSD _		 TooBig	= TooBig
+        -- It's used when the second argument isn't part of the result
+    addSizeNSD TooBig            _      = TooBig
+    addSizeNSD _                 TooBig = TooBig
     addSizeNSD (SizeIs n1 xs _) (SizeIs n2 ys d2) 
-	= mkSizeIs bOMB_OUT_SIZE (n1 +# n2) 
+        = mkSizeIs bOMB_OUT_SIZE (n1 +# n2) 
                                  (xs `unionBags` ys) 
                                  d2  -- Ignore d1
 
@@ -541,14 +535,14 @@ sizeExpr dflags bOMB_OUT_SIZE top_args expr
 -- | Finds a nominal size of a string literal.
 litSize :: Literal -> Int
 -- Used by CoreUnfold.sizeExpr
-litSize (LitInteger {}) = 100	-- Note [Size of literal integers]
+litSize (LitInteger {}) = 100   -- Note [Size of literal integers]
 litSize (MachStr str)   = 10 + 10 * ((BS.length str + 3) `div` 4)
-	-- If size could be 0 then @f "x"@ might be too small
-	-- [Sept03: make literal strings a bit bigger to avoid fruitless 
-	--  duplication of little strings]
+        -- If size could be 0 then @f "x"@ might be too small
+        -- [Sept03: make literal strings a bit bigger to avoid fruitless 
+        --  duplication of little strings]
 litSize _other = 0    -- Must match size of nullary constructors
-	       	      -- Key point: if  x |-> 4, then x must inline unconditionally
-		      --     	    (eg via case binding)
+                      -- Key point: if  x |-> 4, then x must inline unconditionally
+                      --            (eg via case binding)
 
 classOpSize :: DynFlags -> [Id] -> [CoreExpr] -> ExprSize
 -- See Note [Conlike is interesting]
@@ -562,10 +556,10 @@ classOpSize dflags top_args (arg1 : other_args)
     -- give it a discount, to encourage the inlining of this function
     -- The actual discount is rather arbitrarily chosen
     arg_discount = case arg1 of
-    		     Var dict | dict `elem` top_args 
-		     	      -> unitBag (dict, ufDictDiscount dflags)
-		     _other   -> emptyBag
-    		     
+                     Var dict | dict `elem` top_args 
+                              -> unitBag (dict, ufDictDiscount dflags)
+                     _other   -> emptyBag
+                     
 funSize :: DynFlags -> [Id] -> Id -> Int -> Int -> ExprSize
 -- Size for functions that are not constructors or primops
 -- Note [Function applications]
@@ -578,20 +572,20 @@ funSize dflags top_args fun n_val_args voids
 
     size | some_val_args = 10 * (1 + n_val_args - voids)
          | otherwise     = 0
-	-- The 1+ is for the function itself
-	-- Add 1 for each non-trivial arg;
-	-- the allocation cost, as in let(rec)
+        -- The 1+ is for the function itself
+        -- Add 1 for each non-trivial arg;
+        -- the allocation cost, as in let(rec)
   
         --                  DISCOUNTS
         --  See Note [Function and non-function discounts]
     arg_discount | some_val_args && fun `elem` top_args
-    		 = unitBag (fun, ufFunAppDiscount dflags)
-		 | otherwise = emptyBag
-	-- If the function is an argument and is applied
-	-- to some values, give it an arg-discount
+                 = unitBag (fun, ufFunAppDiscount dflags)
+                 | otherwise = emptyBag
+        -- If the function is an argument and is applied
+        -- to some values, give it an arg-discount
 
     res_discount | idArity fun > n_val_args = ufFunAppDiscount dflags
-    		 | otherwise   	 	    = 0
+                 | otherwise                = 0
         -- If the function is partially applied, show a result discount
 
 conSize :: DataCon -> Int -> ExprSize
@@ -629,7 +623,7 @@ terrible code bloat: see Trac #6099.
 Note [Unboxed tuple size and result discount]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 However, unboxed tuples count as size zero. I found occasions where we had 
-	f x y z = case op# x y z of { s -> (# s, () #) }
+        f x y z = case op# x y z of { s -> (# s, () #) }
 and f wasn't getting inlined.
 
 I tried giving unboxed tuples a *result discount* of zero (see the
@@ -688,17 +682,17 @@ primOpSize op n_val_args
 
 buildSize :: ExprSize
 buildSize = SizeIs (_ILIT(0)) emptyBag (_ILIT(40))
-	-- We really want to inline applications of build
-	-- build t (\cn -> e) should cost only the cost of e (because build will be inlined later)
-	-- Indeed, we should add a result_discount becuause build is 
-	-- very like a constructor.  We don't bother to check that the
-	-- build is saturated (it usually is).  The "-2" discounts for the \c n, 
-	-- The "4" is rather arbitrary.
+        -- We really want to inline applications of build
+        -- build t (\cn -> e) should cost only the cost of e (because build will be inlined later)
+        -- Indeed, we should add a result_discount becuause build is 
+        -- very like a constructor.  We don't bother to check that the
+        -- build is saturated (it usually is).  The "-2" discounts for the \c n, 
+        -- The "4" is rather arbitrary.
 
 augmentSize :: ExprSize
 augmentSize = SizeIs (_ILIT(0)) emptyBag (_ILIT(40))
-	-- Ditto (augment t (\cn -> e) ys) should cost only the cost of
-	-- e plus ys. The -2 accounts for the \cn 
+        -- Ditto (augment t (\cn -> e) ys) should cost only the cost of
+        -- e plus ys. The -2 accounts for the \cn 
 
 -- When we return a lambda, give a discount if it's used (applied)
 lamScrutDiscount :: DynFlags -> ExprSize -> ExprSize
@@ -761,10 +755,10 @@ Code for manipulating sizes
 
 \begin{code}
 data ExprSize = TooBig
-	      | SizeIs FastInt		-- Size found
-		       !(Bag (Id,Int))	-- Arguments cased herein, and discount for each such
-		       FastInt		-- Size to subtract if result is scrutinised 
-					-- by a case expression
+              | SizeIs FastInt          -- Size found
+                       !(Bag (Id,Int))  -- Arguments cased herein, and discount for each such
+                       FastInt          -- Size to subtract if result is scrutinised 
+                                        -- by a case expression
 
 instance Outputable ExprSize where
   ppr TooBig         = ptext (sLit "TooBig")
@@ -772,18 +766,18 @@ instance Outputable ExprSize where
 
 -- subtract the discount before deciding whether to bale out. eg. we
 -- want to inline a large constructor application into a selector:
---  	tup = (a_1, ..., a_99)
---  	x = case tup of ...
+--      tup = (a_1, ..., a_99)
+--      x = case tup of ...
 --
 mkSizeIs :: FastInt -> FastInt -> Bag (Id, Int) -> FastInt -> ExprSize
 mkSizeIs max n xs d | (n -# d) ># max = TooBig
-		    | otherwise	      = SizeIs n xs d
+                    | otherwise       = SizeIs n xs d
  
 maxSize :: ExprSize -> ExprSize -> ExprSize
-maxSize TooBig         _ 				  = TooBig
-maxSize _              TooBig				  = TooBig
+maxSize TooBig         _                                  = TooBig
+maxSize _              TooBig                             = TooBig
 maxSize s1@(SizeIs n1 _ _) s2@(SizeIs n2 _ _) | n1 ># n2  = s1
-					      | otherwise = s2
+                                              | otherwise = s2
 
 sizeZero :: ExprSize
 sizeN :: Int -> ExprSize
@@ -794,9 +788,9 @@ sizeN n  = SizeIs (iUnbox n) emptyBag (_ILIT(0))
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[considerUnfolding]{Given all the info, do (not) do the unfolding}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 We use 'couldBeSmallEnoughToInline' to avoid exporting inlinings that
@@ -822,7 +816,7 @@ smallEnoughToInline _ _
 
 ----------------
 certainlyWillInline :: DynFlags -> Unfolding -> Bool
-  -- Sees if the unfolding is pretty certain to inline	
+  -- Sees if the unfolding is pretty certain to inline  
 certainlyWillInline dflags (CoreUnfolding { uf_arity = n_vals, uf_guidance = guidance })
   = case guidance of
       UnfNever      -> False
@@ -846,9 +840,9 @@ was certainlyWillInline, so the addition got duplicated.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{callSiteInline}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 This is the key function.  It decides whether to inline a variable at a call site
@@ -869,12 +863,12 @@ StrictAnal.addStrictnessInfoToTopId
 
 \begin{code}
 callSiteInline :: DynFlags
-	       -> Id			-- The Id
-	       -> Bool			-- True <=> unfolding is active
-	       -> Bool			-- True if there are are no arguments at all (incl type args)
-	       -> [ArgSummary]		-- One for each value arg; True if it is interesting
-	       -> CallCtxt		-- True <=> continuation is interesting
-	       -> Maybe CoreExpr	-- Unfolding, if any
+               -> Id                    -- The Id
+               -> Bool                  -- True <=> unfolding is active
+               -> Bool                  -- True if there are are no arguments at all (incl type args)
+               -> [ArgSummary]          -- One for each value arg; True if it is interesting
+               -> CallCtxt              -- True <=> continuation is interesting
+               -> Maybe CoreExpr        -- Unfolding, if any
 
 instance Outputable ArgSummary where
   ppr TrivArg    = ptext (sLit "TrivArg")
@@ -883,25 +877,25 @@ instance Outputable ArgSummary where
 
 data CallCtxt = BoringCtxt
 
-	      | ArgCtxt		-- We are somewhere in the argument of a function
-                        Bool	-- True  <=> we're somewhere in the RHS of function with rules
-				-- False <=> we *are* the argument of a function with non-zero
-				-- 	     arg discount
+              | ArgCtxt         -- We are somewhere in the argument of a function
+                        Bool    -- True  <=> we're somewhere in the RHS of function with rules
+                                -- False <=> we *are* the argument of a function with non-zero
+                                --           arg discount
                                 --        OR 
                                 --           we *are* the RHS of a let  Note [RHS of lets]
                                 -- In both cases, be a little keener to inline
 
-	      | ValAppCtxt 	-- We're applied to at least one value arg
-				-- This arises when we have ((f x |> co) y)
-				-- Then the (f x) has argument 'x' but in a ValAppCtxt
+              | ValAppCtxt      -- We're applied to at least one value arg
+                                -- This arises when we have ((f x |> co) y)
+                                -- Then the (f x) has argument 'x' but in a ValAppCtxt
 
-	      | CaseCtxt	-- We're the scrutinee of a case
-				-- that decomposes its scrutinee
+              | CaseCtxt        -- We're the scrutinee of a case
+                                -- that decomposes its scrutinee
 
 instance Outputable CallCtxt where
   ppr BoringCtxt      = ptext (sLit "BoringCtxt")
   ppr (ArgCtxt rules) = ptext (sLit "ArgCtxt") <+> ppr rules
-  ppr CaseCtxt 	      = ptext (sLit "CaseCtxt")
+  ppr CaseCtxt        = ptext (sLit "CaseCtxt")
   ppr ValAppCtxt      = ptext (sLit "ValAppCtxt")
 
 callSiteInline dflags id active_unfolding lone_variable arg_infos cont_info
@@ -909,8 +903,8 @@ callSiteInline dflags id active_unfolding lone_variable arg_infos cont_info
       -- idUnfolding checks for loop-breakers, returning NoUnfolding
       -- Things with an INLINE pragma may have an unfolding *and* 
       -- be a loop breaker  (maybe the knot is not yet untied)
-	CoreUnfolding { uf_tmpl = unf_template, uf_is_top = is_top 
-		      , uf_is_work_free = is_wf, uf_arity = uf_arity
+        CoreUnfolding { uf_tmpl = unf_template, uf_is_top = is_top 
+                      , uf_is_work_free = is_wf, uf_arity = uf_arity
                       , uf_guidance = guidance, uf_expandable = is_exp }
           | active_unfolding -> tryUnfolding dflags id lone_variable 
                                     arg_infos cont_info unf_template is_top 
@@ -918,30 +912,30 @@ callSiteInline dflags id active_unfolding lone_variable arg_infos cont_info
           | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
           -> pprTrace "Inactive unfolding:" (ppr id) Nothing
           | otherwise -> Nothing
-	NoUnfolding 	 -> Nothing 
-	OtherCon {} 	 -> Nothing 
-	DFunUnfolding {} -> Nothing 	-- Never unfold a DFun
+        NoUnfolding      -> Nothing 
+        OtherCon {}      -> Nothing 
+        DFunUnfolding {} -> Nothing     -- Never unfold a DFun
 
 tryUnfolding :: DynFlags -> Id -> Bool -> [ArgSummary] -> CallCtxt
              -> CoreExpr -> Bool -> Bool -> Bool -> Arity -> UnfoldingGuidance
-	     -> Maybe CoreExpr	
+             -> Maybe CoreExpr  
 tryUnfolding dflags id lone_variable 
              arg_infos cont_info unf_template is_top 
              is_wf is_exp uf_arity guidance
-			-- uf_arity will typically be equal to (idArity id), 
-			-- but may be less for InlineRules
+                        -- uf_arity will typically be equal to (idArity id), 
+                        -- but may be less for InlineRules
  | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags
  = pprTrace ("Considering inlining: " ++ showSDocDump dflags (ppr id))
-		 (vcat [text "arg infos" <+> ppr arg_infos,
-			text "uf arity" <+> ppr uf_arity,
-			text "interesting continuation" <+> ppr cont_info,
-			text "some_benefit" <+> ppr some_benefit,
+                 (vcat [text "arg infos" <+> ppr arg_infos,
+                        text "uf arity" <+> ppr uf_arity,
+                        text "interesting continuation" <+> ppr cont_info,
+                        text "some_benefit" <+> ppr some_benefit,
                         text "is exp:" <+> ppr is_exp,
                         text "is work-free:" <+> ppr is_wf,
-			text "guidance" <+> ppr guidance,
-			extra_doc,
-			text "ANSWER =" <+> if yes_or_no then text "YES" else text "NO"])
-	         result
+                        text "guidance" <+> ppr guidance,
+                        extra_doc,
+                        text "ANSWER =" <+> if yes_or_no then text "YES" else text "NO"])
+                 result
   | otherwise  = result
 
   where
@@ -954,9 +948,9 @@ tryUnfolding dflags id lone_variable
            | otherwise = Nothing
 
     interesting_args = any nonTriv arg_infos 
-    	-- NB: (any nonTriv arg_infos) looks at the
-    	-- over-saturated args too which is "wrong"; 
-    	-- but if over-saturated we inline anyway.
+        -- NB: (any nonTriv arg_infos) looks at the
+        -- over-saturated args too which is "wrong"; 
+        -- but if over-saturated we inline anyway.
 
            -- some_benefit is used when the RHS is small enough
            -- and the call has enough (or too many) value
@@ -964,17 +958,17 @@ tryUnfolding dflags id lone_variable
            -- be *something* interesting about some argument, or the
            -- result context, to make it worth inlining
     some_benefit 
-       | not saturated = interesting_args	-- Under-saturated
-    	   	      		     	-- Note [Unsaturated applications]
-       | otherwise = interesting_args	-- Saturated or over-saturated
+       | not saturated = interesting_args       -- Under-saturated
+                                        -- Note [Unsaturated applications]
+       | otherwise = interesting_args   -- Saturated or over-saturated
                   || interesting_call
 
     interesting_call 
       = case cont_info' of
-          BoringCtxt -> not is_top && uf_arity > 0	  -- Note [Nested functions]
+          BoringCtxt -> not is_top && uf_arity > 0        -- Note [Nested functions]
           CaseCtxt   -> not (lone_variable && is_wf)      -- Note [Lone variables]
-          ArgCtxt {} -> uf_arity > 0     		  -- Note [Inlining in ArgCtxt]
-          ValAppCtxt -> True			          -- Note [Cast then apply]
+          ArgCtxt {} -> uf_arity > 0                      -- Note [Inlining in ArgCtxt]
+          ValAppCtxt -> True                              -- Note [Cast then apply]
 
     (yes_or_no, extra_doc)
       = case guidance of
@@ -986,13 +980,13 @@ tryUnfolding dflags id lone_variable
                enough_args = saturated || (unsat_ok && n_val_args > 0)
 
           UnfIfGoodArgs { ug_args = arg_discounts, ug_res = res_discount, ug_size = size }
-      	     -> ( is_wf && some_benefit && small_enough
+             -> ( is_wf && some_benefit && small_enough
                 , (text "discounted size =" <+> int discounted_size) )
-    	     where
-    	       discounted_size = size - discount
-    	       small_enough = discounted_size <= ufUseThreshold dflags
-    	       discount = computeDiscount dflags uf_arity arg_discounts 
-    	         		          res_discount arg_infos cont_info'
+             where
+               discounted_size = size - discount
+               small_enough = discounted_size <= ufUseThreshold dflags
+               discount = computeDiscount dflags uf_arity arg_discounts 
+                                          res_discount arg_infos cont_info'
 \end{code}
 
 Note [RHS of lets]
@@ -1012,9 +1006,9 @@ A good example is the Ord instance for Bool in Base:
 
  Rec {
     $fOrdBool =GHC.Classes.D:Ord
-        	 @ Bool
-      		 ...
-      		 $cmin_ajX
+                 @ Bool
+                 ...
+                 $cmin_ajX
 
     $cmin_ajX [Occ=LoopBreaker] :: Bool -> Bool -> Bool
     $cmin_ajX = GHC.Classes.$dmmin @ Bool $fOrdBool
@@ -1098,35 +1092,35 @@ call is at least CONLIKE.  At least for the cases where we use ArgCtxt
 for the RHS of a 'let', we only profit from the inlining if we get a 
 CONLIKE thing (modulo lets).
 
-Note [Lone variables]	See also Note [Interaction of exprIsWorkFree and lone variables]
+Note [Lone variables]   See also Note [Interaction of exprIsWorkFree and lone variables]
 ~~~~~~~~~~~~~~~~~~~~~   which appears below
 The "lone-variable" case is important.  I spent ages messing about
 with unsatisfactory varaints, but this is nice.  The idea is that if a
 variable appears all alone
 
-	as an arg of lazy fn, or rhs	BoringCtxt
-	as scrutinee of a case		CaseCtxt
-	as arg of a fn			ArgCtxt
+        as an arg of lazy fn, or rhs    BoringCtxt
+        as scrutinee of a case          CaseCtxt
+        as arg of a fn                  ArgCtxt
 AND
-	it is bound to a cheap expression
+        it is bound to a cheap expression
 
 then we should not inline it (unless there is some other reason,
 e.g. is is the sole occurrence).  That is what is happening at 
 the use of 'lone_variable' in 'interesting_call'.
 
 Why?  At least in the case-scrutinee situation, turning
-	let x = (a,b) in case x of y -> ...
+        let x = (a,b) in case x of y -> ...
 into
-	let x = (a,b) in case (a,b) of y -> ...
+        let x = (a,b) in case (a,b) of y -> ...
 and thence to 
-	let x = (a,b) in let y = (a,b) in ...
+        let x = (a,b) in let y = (a,b) in ...
 is bad if the binding for x will remain.
 
 Another example: I discovered that strings
 were getting inlined straight back into applications of 'error'
 because the latter is strict.
-	s = "foo"
-	f = \x -> ...(error s)...
+        s = "foo"
+        f = \x -> ...(error s)...
 
 Fundamentally such contexts should not encourage inlining because the
 context can ``see'' the unfolding of the variable (e.g. case or a
@@ -1135,9 +1129,9 @@ RULE) so there's no gain.  If the thing is bound to a value.
 However, watch out:
 
  * Consider this:
-	foo = _inline_ (\n. [n])
-	bar = _inline_ (foo 20)
-	baz = \n. case bar of { (m:_) -> m + n }
+        foo = _inline_ (\n. [n])
+        bar = _inline_ (foo 20)
+        baz = \n. case bar of { (m:_) -> m + n }
    Here we really want to inline 'bar' so that we can inline 'foo'
    and the whole thing unravels as it should obviously do.  This is 
    important: in the NDP project, 'bar' generates a closure data
@@ -1150,13 +1144,13 @@ However, watch out:
 
  * Even a type application or coercion isn't a lone variable.
    Consider
-	case $fMonadST @ RealWorld of { :DMonad a b c -> c }
+        case $fMonadST @ RealWorld of { :DMonad a b c -> c }
    We had better inline that sucker!  The case won't see through it.
 
    For now, I'm treating treating a variable applied to types 
    in a *lazy* context "lone". The motivating example was
-	f = /\a. \x. BIG
-	g = /\a. \y.  h (f a)
+        f = /\a. \x. BIG
+        g = /\a. \y.  h (f a)
    There's no advantage in inlining f here, and perhaps
    a significant disadvantage.  Hence some_val_args in the Stop case
 
@@ -1167,7 +1161,7 @@ scrutines a lone variable whose unfolding is cheap".  It's very
 important that, under these circumstances, exprIsConApp_maybe
 can spot a constructor application. So, for example, we don't
 consider
-	let x = e in (x,x)
+        let x = e in (x,x)
 to be cheap, and that's good because exprIsConApp_maybe doesn't
 think that expression is a constructor application.
 
@@ -1177,8 +1171,8 @@ expression responds True to exprIsHNF, which is what sets is_value.
 
 This kind of thing can occur if you have
 
-	{-# INLINE foo #-}
-	foo = let x = e in (x,x)
+        {-# INLINE foo #-}
+        foo = let x = e in (x,x)
 
 which Roman did.
 
@@ -1186,45 +1180,45 @@ which Roman did.
 computeDiscount :: DynFlags -> Arity -> [Int] -> Int -> [ArgSummary] -> CallCtxt
                 -> Int
 computeDiscount dflags uf_arity arg_discounts res_discount arg_infos cont_info
- 	-- We multiple the raw discounts (args_discount and result_discount)
-	-- ty opt_UnfoldingKeenessFactor because the former have to do with
-	--  *size* whereas the discounts imply that there's some extra 
-	--  *efficiency* to be gained (e.g. beta reductions, case reductions) 
-	-- by inlining.
+        -- We multiple the raw discounts (args_discount and result_discount)
+        -- ty opt_UnfoldingKeenessFactor because the former have to do with
+        --  *size* whereas the discounts imply that there's some extra 
+        --  *efficiency* to be gained (e.g. beta reductions, case reductions) 
+        -- by inlining.
 
   = 10          -- Discount of 1 because the result replaces the call
-		-- so we count 1 for the function itself
+                -- so we count 1 for the function itself
 
     + 10 * length (take uf_arity arg_infos)
-      	       -- Discount of (un-scaled) 1 for each arg supplied, 
-   	       -- because the result replaces the call
+               -- Discount of (un-scaled) 1 for each arg supplied, 
+               -- because the result replaces the call
 
     + round (ufKeenessFactor dflags *
-	     fromIntegral (arg_discount + res_discount'))
+             fromIntegral (arg_discount + res_discount'))
   where
     arg_discount = sum (zipWith mk_arg_discount arg_discounts arg_infos)
 
-    mk_arg_discount _ 	     TrivArg    = 0 
+    mk_arg_discount _        TrivArg    = 0 
     mk_arg_discount _        NonTrivArg = 10
     mk_arg_discount discount ValueArg   = discount 
 
     res_discount' = case cont_info of
-			BoringCtxt  -> 0
-			CaseCtxt    -> res_discount  -- Presumably a constructor
-			ValAppCtxt  -> res_discount  -- Presumably a function
+                        BoringCtxt  -> 0
+                        CaseCtxt    -> res_discount  -- Presumably a constructor
+                        ValAppCtxt  -> res_discount  -- Presumably a function
                         ArgCtxt {}  -> 40 `min` res_discount
-		-- res_discount can be very large when a function returns
-		-- constructors; but we only want to invoke that large discount
-		-- when there's a case continuation.
-		-- Otherwise we, rather arbitrarily, threshold it.  Yuk.
-		-- But we want to aovid inlining large functions that return 
-		-- constructors into contexts that are simply "interesting"
+                -- res_discount can be very large when a function returns
+                -- constructors; but we only want to invoke that large discount
+                -- when there's a case continuation.
+                -- Otherwise we, rather arbitrarily, threshold it.  Yuk.
+                -- But we want to aovid inlining large functions that return 
+                -- constructors into contexts that are simply "interesting"
 \end{code}
 
 %************************************************************************
-%*									*
-	Interesting arguments
-%*									*
+%*                                                                      *
+        Interesting arguments
+%*                                                                      *
 %************************************************************************
 
 Note [Interesting arguments]
@@ -1250,33 +1244,33 @@ to now!
 Note [Conlike is interesting]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
-	f d = ...((*) d x y)...
-	... f (df d')...
+        f d = ...((*) d x y)...
+        ... f (df d')...
 where df is con-like. Then we'd really like to inline 'f' so that the
 rule for (*) (df d) can fire.  To do this 
   a) we give a discount for being an argument of a class-op (eg (*) d)
   b) we say that a con-like argument (eg (df d)) is interesting
 
 \begin{code}
-data ArgSummary = TrivArg	-- Nothing interesting
-     		| NonTrivArg	-- Arg has structure
-		| ValueArg	-- Arg is a con-app or PAP
-		  		-- ..or con-like. Note [Conlike is interesting]
+data ArgSummary = TrivArg       -- Nothing interesting
+                | NonTrivArg    -- Arg has structure
+                | ValueArg      -- Arg is a con-app or PAP
+                                -- ..or con-like. Note [Conlike is interesting]
 
 interestingArg :: CoreExpr -> ArgSummary
 -- See Note [Interesting arguments]
 interestingArg e = go e 0
   where
     -- n is # value args to which the expression is applied
-    go (Lit {}) _   	   = ValueArg
+    go (Lit {}) _          = ValueArg
     go (Var v)  n
-       | isConLikeId v     = ValueArg	-- Experimenting with 'conlike' rather that
-       	 	     	     		--    data constructors here
-       | idArity v > n	   = ValueArg	-- Catches (eg) primops with arity but no unfolding
-       | n > 0	           = NonTrivArg	-- Saturated or unknown call
-       | conlike_unfolding = ValueArg	-- n==0; look for an interesting unfolding
+       | isConLikeId v     = ValueArg   -- Experimenting with 'conlike' rather that
+                                        --    data constructors here
+       | idArity v > n     = ValueArg   -- Catches (eg) primops with arity but no unfolding
+       | n > 0             = NonTrivArg -- Saturated or unknown call
+       | conlike_unfolding = ValueArg   -- n==0; look for an interesting unfolding
                                         -- See Note [Conlike is interesting]
-       | otherwise	   = TrivArg	-- n==0, no useful unfolding
+       | otherwise         = TrivArg    -- n==0, no useful unfolding
        where
          conlike_unfolding = isConLikeUnfolding (idUnfolding v)
 
@@ -1286,13 +1280,13 @@ interestingArg e = go e 0
     go (App fn (Coercion _)) n = go fn n
     go (App fn _)        n = go fn (n+1)
     go (Tick _ a)      n = go a n
-    go (Cast e _) 	 n = go e n
-    go (Lam v e)  	 n 
-       | isTyVar v	   = go e n
-       | n>0	 	   = go e (n-1)
-       | otherwise	   = ValueArg
-    go (Let _ e)  	 n = case go e n of { ValueArg -> ValueArg; _ -> NonTrivArg }
-    go (Case {})  	 _ = NonTrivArg
+    go (Cast e _)        n = go e n
+    go (Lam v e)         n 
+       | isTyVar v         = go e n
+       | n>0               = go e (n-1)
+       | otherwise         = ValueArg
+    go (Let _ e)         n = case go e n of { ValueArg -> ValueArg; _ -> NonTrivArg }
+    go (Case {})         _ = NonTrivArg
 
 nonTriv ::  ArgSummary -> Bool
 nonTriv TrivArg = False
diff --git a/compiler/coreSyn/MkCore.lhs b/compiler/coreSyn/MkCore.lhs
index 532d4fc..c4bcaf6 100644
--- a/compiler/coreSyn/MkCore.lhs
+++ b/compiler/coreSyn/MkCore.lhs
@@ -1,10 +1,4 @@
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Handy functions for creating much Core syntax
 module MkCore (
@@ -52,11 +46,11 @@ module MkCore (
         mkNilExpr, mkConsExpr, mkListExpr, 
         mkFoldrExpr, mkBuildExpr,
 
-    	-- * Error Ids 
-    	mkRuntimeErrorApp, mkImpossibleExpr, errorIds,
-    	rEC_CON_ERROR_ID, iRREFUT_PAT_ERROR_ID, rUNTIME_ERROR_ID,
-    	nON_EXHAUSTIVE_GUARDS_ERROR_ID, nO_METHOD_BINDING_ERROR_ID,
-    	pAT_ERROR_ID, eRROR_ID, rEC_SEL_ERROR_ID, aBSENT_ERROR_ID,
+        -- * Error Ids 
+        mkRuntimeErrorApp, mkImpossibleExpr, errorIds,
+        rEC_CON_ERROR_ID, iRREFUT_PAT_ERROR_ID, rUNTIME_ERROR_ID,
+        nON_EXHAUSTIVE_GUARDS_ERROR_ID, nO_METHOD_BINDING_ERROR_ID,
+        pAT_ERROR_ID, eRROR_ID, rEC_SEL_ERROR_ID, aBSENT_ERROR_ID,
         uNDEFINED_ID, undefinedName
     ) where
 
@@ -73,12 +67,12 @@ import HscTypes
 import TysWiredIn
 import PrelNames
 
-import TcType		( mkSigmaTy )
+import TcType           ( mkSigmaTy )
 import Type
 import Coercion
 import TysPrim
 import DataCon          ( DataCon, dataConWorkId )
-import IdInfo		( vanillaIdInfo, setStrictnessInfo, 
+import IdInfo           ( vanillaIdInfo, setStrictnessInfo, 
                           setArityInfo )
 import Demand 
 import Name      hiding ( varName )
@@ -176,14 +170,14 @@ mk_val_app fun arg arg_ty res_ty
   = Case arg arg_id res_ty [(DEFAULT,[],App fun (Var arg_id))]
   where
     arg_id = mkWildValBinder arg_ty    
-	-- Lots of shadowing, but it doesn't matter,
+        -- Lots of shadowing, but it doesn't matter,
         -- because 'fun ' should not have a free wild-id
-	--
-	-- This is Dangerous.  But this is the only place we play this 
-	-- game, mk_val_app returns an expression that does not have
-	-- have a free wild-id.  So the only thing that can go wrong
-	-- is if you take apart this case expression, and pass a 
-	-- fragmet of it as the fun part of a 'mk_val_app'.
+        --
+        -- This is Dangerous.  But this is the only place we play this 
+        -- game, mk_val_app returns an expression that does not have
+        -- have a free wild-id.  So the only thing that can go wrong
+        -- is if you take apart this case expression, and pass a 
+        -- fragmet of it as the fun part of a 'mk_val_app'.
 
 mkWildEvBinder :: PredType -> EvVar
 mkWildEvBinder pred = mkWildValBinder pred
@@ -206,8 +200,8 @@ mkIfThenElse :: CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr
 mkIfThenElse guard then_expr else_expr
 -- Not going to be refining, so okay to take the type of the "then" clause
   = mkWildCase guard boolTy (exprType then_expr) 
-	 [ (DataAlt falseDataCon, [], else_expr),	-- Increasing order of tag!
-    	   (DataAlt trueDataCon,  [], then_expr) ]
+         [ (DataAlt falseDataCon, [], else_expr),       -- Increasing order of tag!
+           (DataAlt trueDataCon,  [], then_expr) ]
 
 castBottomExpr :: CoreExpr -> Type -> CoreExpr
 -- (castBottomExpr e ty), assuming that 'e' diverges, 
@@ -348,7 +342,7 @@ mkChunkified :: ([a] -> a)      -- ^ \"Small\" constructor function, of maximum
              -> a               -- ^ Constructed thing made possible by recursive decomposition
 mkChunkified small_tuple as = mk_big_tuple (chunkify as)
   where
-	-- Each sub-list is short enough to fit in a tuple
+        -- Each sub-list is short enough to fit in a tuple
     mk_big_tuple [as] = small_tuple as
     mk_big_tuple as_s = mk_big_tuple (chunkify (map small_tuple as_s))
 
@@ -358,7 +352,7 @@ chunkify :: [a] -> [[a]]
 -- But there may be more than 'mAX_TUPLE_SIZE' sub-lists
 chunkify xs
   | n_xs <= mAX_TUPLE_SIZE = [xs] 
-  | otherwise		   = split xs
+  | otherwise              = split xs
   where
     n_xs     = length xs
     split [] = []
@@ -765,8 +759,8 @@ pc_bottoming_Id1 name ty
  = mkVanillaGlobalWithInfo name ty bottoming_info
  where
     bottoming_info = vanillaIdInfo `setStrictnessInfo`    strict_sig
-				   `setArityInfo`         1
-			-- Make arity and strictness agree
+                                   `setArityInfo`         1
+                        -- Make arity and strictness agree
 
         -- Do *not* mark them as NoCafRefs, because they can indeed have
         -- CAF refs.  For example, pAT_ERROR_ID calls GHC.Err.untangle,
diff --git a/compiler/coreSyn/TrieMap.lhs b/compiler/coreSyn/TrieMap.lhs
index ac04ada..4ed8f55 100644
--- a/compiler/coreSyn/TrieMap.lhs
+++ b/compiler/coreSyn/TrieMap.lhs
@@ -4,12 +4,6 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# LANGUAGE TypeFamilies #-}
 module TrieMap(
@@ -51,14 +45,14 @@ some neat handling of *binders*.  In effect they are deBruijn
 numbered on the fly.
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    The TrieMap class
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-type XT a = Maybe a -> Maybe a	-- How to alter a non-existent elt (Nothing)
-     	    	       		--               or an existing elt (Just)
+type XT a = Maybe a -> Maybe a  -- How to alter a non-existent elt (Nothing)
+                                --               or an existing elt (Just)
 
 class TrieMap m where
    type Key m :: *
@@ -104,9 +98,9 @@ deMaybe (Just m) = m
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    IntMaps
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -140,9 +134,9 @@ instance TrieMap UniqFM where
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Lists
-%*									*
+%*                                                                      *
 %************************************************************************
 
 If              m is a map from k -> val
@@ -216,9 +210,9 @@ foldMaybe k (Just a) b = k a b
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Basic maps
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -242,9 +236,9 @@ xtLit = alterTM
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    CoreMap
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [Binders]
@@ -296,10 +290,10 @@ data CoreMap a
 
 wrapEmptyCM :: CoreMap a
 wrapEmptyCM = CM { cm_var = emptyTM, cm_lit = emptyLiteralMap
- 		 , cm_co = emptyTM, cm_type = emptyTM
- 		 , cm_cast = emptyTM, cm_app = emptyTM 
- 		 , cm_lam = emptyTM, cm_letn = emptyTM 
- 		 , cm_letr = emptyTM, cm_case = emptyTM
+                 , cm_co = emptyTM, cm_type = emptyTM
+                 , cm_cast = emptyTM, cm_app = emptyTM 
+                 , cm_lam = emptyTM, cm_letn = emptyTM 
+                 , cm_letr = emptyTM, cm_case = emptyTM
                  , cm_ecase = emptyTM, cm_tick = emptyTM }
 
 instance TrieMap CoreMap where
@@ -315,9 +309,9 @@ mapE :: (a->b) -> CoreMap a -> CoreMap b
 mapE _ EmptyCM = EmptyCM
 mapE f (CM { cm_var = cvar, cm_lit = clit
            , cm_co = cco, cm_type = ctype
- 	   , cm_cast = ccast , cm_app = capp
- 	   , cm_lam = clam, cm_letn = cletn 
- 	   , cm_letr = cletr, cm_case = ccase
+           , cm_cast = ccast , cm_app = capp
+           , cm_lam = clam, cm_letn = cletn 
+           , cm_letr = cletr, cm_case = ccase
            , cm_ecase = cecase, cm_tick = ctick })
   = CM { cm_var = mapTM f cvar, cm_lit = mapTM f clit 
        , cm_co = mapTM f cco, cm_type = mapTM f ctype
@@ -365,9 +359,9 @@ lkE env expr cm
   | EmptyCM <- cm = Nothing
   | otherwise     = go expr cm
   where 
-    go (Var v)  	    = cm_var  >.> lkVar env v
+    go (Var v)              = cm_var  >.> lkVar env v
     go (Lit l)              = cm_lit  >.> lkLit l
-    go (Type t) 	    = cm_type >.> lkT env t
+    go (Type t)             = cm_type >.> lkT env t
     go (Coercion c)         = cm_co   >.> lkC env c
     go (Cast e c)           = cm_cast >.> lkE env e >=> lkC env c
     go (Tick tickish e)     = cm_tick >.> lkE env e >=> lkTickish tickish
@@ -388,7 +382,7 @@ lkE env expr cm
 xtE :: CmEnv -> CoreExpr -> XT a -> CoreMap a -> CoreMap a
 xtE env e              f EmptyCM = xtE env e f wrapEmptyCM
 xtE env (Var v)              f m = m { cm_var  = cm_var m  |> xtVar env v f }
-xtE env (Type t) 	     f m = m { cm_type = cm_type m |> xtT env t f }
+xtE env (Type t)             f m = m { cm_type = cm_type m |> xtT env t f }
 xtE env (Coercion c)         f m = m { cm_co   = cm_co m   |> xtC env c f }
 xtE _   (Lit l)              f m = m { cm_lit  = cm_lit m  |> xtLit l f }
 xtE env (Cast e c)           f m = m { cm_cast = cm_cast m |> xtE env e |>>
@@ -420,7 +414,7 @@ xtTickish :: Tickish Id -> XT a -> TickishMap a -> TickishMap a
 xtTickish = alterTM
 
 ------------------------
-data AltMap a	-- A single alternative
+data AltMap a   -- A single alternative
   = AM { am_deflt :: CoreMap a
        , am_data  :: NameEnv (CoreMap a)
        , am_lit   :: LiteralMap (CoreMap a) }
@@ -459,9 +453,9 @@ fdA k m = foldTM k (am_deflt m)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Coercions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -627,9 +621,9 @@ mapR f = RM . mapTM f . unRM
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Types
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -775,9 +769,9 @@ foldTyLit l m = flip (Map.fold l) (tlm_string m)
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Variables
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -811,7 +805,7 @@ xtBndr env v f = xtT env (varType v) f
 
 --------- Variable occurrence -------------
 data VarMap a = VM { vm_bvar   :: BoundVarMap a  -- Bound variable
-                   , vm_fvar   :: VarEnv a }  	  -- Free variable
+                   , vm_fvar   :: VarEnv a }      -- Free variable
 
 instance TrieMap VarMap where
    type Key VarMap = Var
diff --git a/compiler/deSugar/DsArrows.lhs b/compiler/deSugar/DsArrows.lhs
index 4034b6d..f1a81af 100644
--- a/compiler/deSugar/DsArrows.lhs
+++ b/compiler/deSugar/DsArrows.lhs
@@ -6,12 +6,6 @@
 Desugaring arrow commands
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module DsArrows ( dsProcExpr ) where
 
@@ -21,7 +15,7 @@ import Match
 import DsUtils
 import DsMonad
 
-import HsSyn	hiding (collectPatBinders, collectPatsBinders, collectLStmtsBinders, collectLStmtBinders, collectStmtBinders )
+import HsSyn    hiding (collectPatBinders, collectPatsBinders, collectLStmtsBinders, collectLStmtBinders, collectStmtBinders )
 import TcHsSyn
 
 -- NB: The desugarer, which straddles the source and Core worlds, sometimes
@@ -57,7 +51,7 @@ import Data.List
 
 \begin{code}
 data DsCmdEnv = DsCmdEnv {
-	arr_id, compose_id, first_id, app_id, choice_id, loop_id :: CoreExpr
+        arr_id, compose_id, first_id, app_id, choice_id, loop_id :: CoreExpr
     }
 
 mkCmdEnv :: CmdSyntaxTable Id -> DsM ([CoreBind], DsCmdEnv)
@@ -88,7 +82,7 @@ do_arr ids b_ty c_ty f = mkApps (arr_id ids) [Type b_ty, Type c_ty, f]
 
 -- (>>>) :: forall b c d. a b c -> a c d -> a b d
 do_compose :: DsCmdEnv -> Type -> Type -> Type ->
-		CoreExpr -> CoreExpr -> CoreExpr
+                CoreExpr -> CoreExpr -> CoreExpr
 do_compose ids b_ty c_ty d_ty f g
   = mkApps (compose_id ids) [Type b_ty, Type c_ty, Type d_ty, f, g]
 
@@ -104,7 +98,7 @@ do_app ids b_ty c_ty = mkApps (app_id ids) [Type b_ty, Type c_ty]
 -- (|||) :: forall b d c. a b d -> a c d -> a (Either b c) d
 -- note the swapping of d and c
 do_choice :: DsCmdEnv -> Type -> Type -> Type ->
-		CoreExpr -> CoreExpr -> CoreExpr
+                CoreExpr -> CoreExpr -> CoreExpr
 do_choice ids b_ty c_ty d_ty f g
   = mkApps (choice_id ids) [Type b_ty, Type d_ty, Type c_ty, f, g]
 
@@ -117,7 +111,7 @@ do_loop ids b_ty c_ty d_ty f
 -- premap :: forall b c d. (b -> c) -> a c d -> a b d
 -- premap f g = arr f >>> g
 do_premap :: DsCmdEnv -> Type -> Type -> Type ->
-		CoreExpr -> CoreExpr -> CoreExpr
+                CoreExpr -> CoreExpr -> CoreExpr
 do_premap ids b_ty c_ty d_ty f g
    = do_compose ids b_ty c_ty d_ty (do_arr ids b_ty c_ty f) g
 
@@ -149,7 +143,7 @@ because the list of variables is typically not yet defined.
 
 \begin{code}
 -- coreCaseTuple [u1..] v [x1..xn] body
---	= case v of v { (x1, .., xn) -> body }
+--      = case v of v { (x1, .., xn) -> body }
 -- But the matching may be nested if the tuple is very big
 
 coreCaseTuple :: UniqSupply -> Id -> [Id] -> CoreExpr -> CoreExpr
@@ -177,7 +171,7 @@ The input is divided into a local environment, which is a flat tuple
 (unless it's too big), and a stack, which is a right-nested pair.
 In general, the input has the form
 
-	((x1,...,xn), (s1,...(sk,())...))
+        ((x1,...,xn), (s1,...(sk,())...))
 
 where xi are the environment values, and si the ones on the stack,
 with s1 being the "top", the first one to be matched with a lambda.
@@ -195,28 +189,28 @@ splitTypeAt n ty
       _ -> pprPanic "splitTypeAt" (ppr ty)
 
 ----------------------------------------------
---		buildEnvStack
+--              buildEnvStack
 --
---	((x1,...,xn),stk)
+--      ((x1,...,xn),stk)
 
 buildEnvStack :: [Id] -> Id -> CoreExpr
 buildEnvStack env_ids stack_id
   = mkCorePairExpr (mkBigCoreVarTup env_ids) (Var stack_id)
 
 ----------------------------------------------
--- 		matchEnvStack
+--              matchEnvStack
 --
---	\ ((x1,...,xn),stk) -> body
---	=>
---	\ pair ->
---	case pair of (tup,stk) ->
---	case tup of (x1,...,xn) ->
---	body
-
-matchEnvStack	:: [Id] 	-- x1..xn
-		-> Id	 	-- stk
-		-> CoreExpr 	-- e
-		-> DsM CoreExpr
+--      \ ((x1,...,xn),stk) -> body
+--      =>
+--      \ pair ->
+--      case pair of (tup,stk) ->
+--      case tup of (x1,...,xn) ->
+--      body
+
+matchEnvStack   :: [Id]         -- x1..xn
+                -> Id           -- stk
+                -> CoreExpr     -- e
+                -> DsM CoreExpr
 matchEnvStack env_ids stack_id body = do
     uniqs <- newUniqueSupply
     tup_var <- newSysLocalDs (mkBigCoreVarTupTy env_ids)
@@ -225,30 +219,30 @@ matchEnvStack env_ids stack_id body = do
     return (Lam pair_id (coreCasePair pair_id tup_var stack_id match_env))
 
 ----------------------------------------------
--- 		matchEnv
+--              matchEnv
 --
---	\ (x1,...,xn) -> body
---	=>
---	\ tup ->
---	case tup of (x1,...,xn) ->
---	body
-
-matchEnv :: [Id] 	-- x1..xn
-	 -> CoreExpr 	-- e
-	 -> DsM CoreExpr
+--      \ (x1,...,xn) -> body
+--      =>
+--      \ tup ->
+--      case tup of (x1,...,xn) ->
+--      body
+
+matchEnv :: [Id]        -- x1..xn
+         -> CoreExpr    -- e
+         -> DsM CoreExpr
 matchEnv env_ids body = do
     uniqs <- newUniqueSupply
     tup_id <- newSysLocalDs (mkBigCoreVarTupTy env_ids)
     return (Lam tup_id (coreCaseTuple uniqs tup_id env_ids body))
 
 ----------------------------------------------
---		matchVarStack
+--              matchVarStack
 --
---	case (x1, ...(xn, s)...) -> e
---	=>
---	case z0 of (x1,z1) ->
---	case zn-1 of (xn,s) ->
---	e
+--      case (x1, ...(xn, s)...) -> e
+--      =>
+--      case z0 of (x1,z1) ->
+--      case zn-1 of (xn,s) ->
+--      e
 matchVarStack :: [Id] -> Id -> CoreExpr -> DsM (Id, CoreExpr)
 matchVarStack [] stack_id body = return (stack_id, body)
 matchVarStack (param_id:param_ids) stack_id body = do
@@ -267,16 +261,16 @@ Translation of arrow abstraction
 
 \begin{code}
 
--- D; xs |-a c : () --> t'  	---> c'
+-- D; xs |-a c : () --> t'      ---> c'
 -- --------------------------
--- D |- proc p -> c :: a t t'	---> premap (\ p -> ((xs),())) c'
+-- D |- proc p -> c :: a t t'   ---> premap (\ p -> ((xs),())) c'
 --
---		where (xs) is the tuple of variables bound by p
+--              where (xs) is the tuple of variables bound by p
 
 dsProcExpr
-	:: LPat Id
-	-> LHsCmdTop Id
-	-> DsM CoreExpr
+        :: LPat Id
+        -> LHsCmdTop Id
+        -> DsM CoreExpr
 dsProcExpr pat (L _ (HsCmdTop cmd _unitTy cmd_ty ids)) = do
     (meth_binds, meth_ids) <- mkCmdEnv ids
     let locals = mkVarSet (collectPatBinders pat)
@@ -296,11 +290,11 @@ dsProcExpr pat (L _ (HsCmdTop cmd _unitTy cmd_ty ids)) = do
 
 Translation of a command judgement of the form
 
-	D; xs |-a c : stk --> t
+        D; xs |-a c : stk --> t
 
 to an expression e such that
 
-	D |- e :: a (xs, stk) t
+        D |- e :: a (xs, stk) t
 
 \begin{code}
 dsLCmd :: DsCmdEnv -> IdSet -> Type -> Type -> LHsCmd Id -> [Id]
@@ -308,23 +302,23 @@ dsLCmd :: DsCmdEnv -> IdSet -> Type -> Type -> LHsCmd Id -> [Id]
 dsLCmd ids local_vars stk_ty res_ty cmd env_ids
   = dsCmd ids local_vars stk_ty res_ty (unLoc cmd) env_ids
 
-dsCmd   :: DsCmdEnv		-- arrow combinators
-	-> IdSet		-- set of local vars available to this command
-	-> Type			-- type of the stack (right-nested tuple)
-	-> Type			-- return type of the command
-	-> HsCmd Id		-- command to desugar
-	-> [Id]			-- list of vars in the input to this command
-				-- This is typically fed back,
-				-- so don't pull on it too early
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet)		-- subset of local vars that occur free
+dsCmd   :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this command
+        -> Type                 -- type of the stack (right-nested tuple)
+        -> Type                 -- return type of the command
+        -> HsCmd Id             -- command to desugar
+        -> [Id]                 -- list of vars in the input to this command
+                                -- This is typically fed back,
+                                -- so don't pull on it too early
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet)          -- subset of local vars that occur free
 
 -- D |- fun :: a t1 t2
 -- D, xs |- arg :: t1
 -- -----------------------------
 -- D; xs |-a fun -< arg : stk --> t2
 --
---		---> premap (\ ((xs), _stk) -> arg) fun
+--              ---> premap (\ ((xs), _stk) -> arg) fun
 
 dsCmd ids local_vars stack_ty res_ty
         (HsCmdArrApp arrow arg arrow_ty HsFirstOrderApp _)
@@ -349,7 +343,7 @@ dsCmd ids local_vars stack_ty res_ty
 -- ------------------------------
 -- D; xs |-a fun -<< arg : stk --> t2
 --
---		---> premap (\ ((xs), _stk) -> (fun, arg)) app
+--              ---> premap (\ ((xs), _stk) -> (fun, arg)) app
 
 dsCmd ids local_vars stack_ty res_ty
         (HsCmdArrApp arrow arg arrow_ty HsHigherOrderApp _)
@@ -378,7 +372,7 @@ dsCmd ids local_vars stack_ty res_ty
 -- ------------------------
 -- D; xs |-a cmd exp : stk --> t'
 --
---		---> premap (\ ((xs),stk) -> ((ys),(e,stk))) cmd
+--              ---> premap (\ ((xs),stk) -> ((ys),(e,stk))) cmd
 
 dsCmd ids local_vars stack_ty res_ty (HsCmdApp cmd arg) env_ids = do
     core_arg <- dsLExpr arg
@@ -391,9 +385,9 @@ dsCmd ids local_vars stack_ty res_ty (HsCmdApp cmd arg) env_ids = do
     arg_id <- newSysLocalDs arg_ty
     -- push the argument expression onto the stack
     let
-	stack' = mkCorePairExpr (Var arg_id) (Var stack_id)
+        stack' = mkCorePairExpr (Var arg_id) (Var stack_id)
         core_body = bindNonRec arg_id core_arg
-			(mkCorePairExpr (mkBigCoreVarTup env_ids') stack')
+                        (mkCorePairExpr (mkBigCoreVarTup env_ids') stack')
 
     -- match the environment and stack against the input
     core_map <- matchEnvStack env_ids stack_id core_body
@@ -410,7 +404,7 @@ dsCmd ids local_vars stack_ty res_ty (HsCmdApp cmd arg) env_ids = do
 -- -----------------------------------------------
 -- D; xs |-a \ p1 ... pk -> cmd : (t1,...(tk,stk)...) t'
 --
---		---> premap (\ ((xs), (p1, ... (pk,stk)...)) -> ((ys),stk)) cmd
+--              ---> premap (\ ((xs), (p1, ... (pk,stk)...)) -> ((ys),stk)) cmd
 
 dsCmd ids local_vars stack_ty res_ty
         (HsCmdLam (MG { mg_alts = [L _ (Match pats _ (GRHSs [L _ (GRHS [] body)] _ ))] }))
@@ -418,7 +412,7 @@ dsCmd ids local_vars stack_ty res_ty
     let
         pat_vars = mkVarSet (collectPatsBinders pats)
         local_vars' = pat_vars `unionVarSet` local_vars
-	(pat_tys, stack_ty') = splitTypeAt (length pats) stack_ty
+        (pat_tys, stack_ty') = splitTypeAt (length pats) stack_ty
     (core_body, free_vars, env_ids') <- dsfixCmd ids local_vars' stack_ty' res_ty body
     param_ids <- mapM newSysLocalDs pat_tys
     stack_id' <- newSysLocalDs stack_ty'
@@ -451,9 +445,9 @@ dsCmd ids local_vars stack_ty res_ty (HsCmdPar cmd) env_ids
 -- ----------------------------------------
 -- D; xs |-a if e then c1 else c2 : stk --> t
 --
---		---> premap (\ ((xs),stk) ->
---			 if e then Left ((xs1),stk) else Right ((xs2),stk))
---		       (c1 ||| c2)
+--              ---> premap (\ ((xs),stk) ->
+--                       if e then Left ((xs1),stk) else Right ((xs2),stk))
+--                     (c1 ||| c2)
 
 dsCmd ids local_vars stack_ty res_ty (HsCmdIf mb_fun cond then_cmd else_cmd)
         env_ids = do
@@ -493,15 +487,15 @@ dsCmd ids local_vars stack_ty res_ty (HsCmdIf mb_fun cond then_cmd else_cmd)
 Case commands are treated in much the same way as if commands
 (see above) except that there are more alternatives.  For example
 
-	case e of { p1 -> c1; p2 -> c2; p3 -> c3 }
+        case e of { p1 -> c1; p2 -> c2; p3 -> c3 }
 
 is translated to
 
-	premap (\ ((xs)*ts) -> case e of
-		p1 -> (Left (Left (xs1)*ts))
-		p2 -> Left ((Right (xs2)*ts))
-		p3 -> Right ((xs3)*ts))
-	((c1 ||| c2) ||| c3)
+        premap (\ ((xs)*ts) -> case e of
+                p1 -> (Left (Left (xs1)*ts))
+                p2 -> Left ((Right (xs2)*ts))
+                p3 -> Right ((xs3)*ts))
+        ((c1 ||| c2) ||| c3)
 
 The idea is to extract the commands from the case, build a balanced tree
 of choices, and replace the commands with expressions that build tagged
@@ -573,7 +567,7 @@ dsCmd ids local_vars stack_ty res_ty
 -- ----------------------------------
 -- D; xs |-a let binds in cmd : stk --> t
 --
---		---> premap (\ ((xs),stk) -> let binds in ((ys),stk)) c
+--              ---> premap (\ ((xs),stk) -> let binds in ((ys),stk)) c
 
 dsCmd ids local_vars stack_ty res_ty (HsCmdLet binds body) env_ids = do
     let
@@ -598,24 +592,24 @@ dsCmd ids local_vars stack_ty res_ty (HsCmdLet binds body) env_ids = do
 -- ----------------------------------
 -- D; xs |-a do { ss } : () --> t
 --
---		---> premap (\ (env,stk) -> env) c
+--              ---> premap (\ (env,stk) -> env) c
 
 dsCmd ids local_vars stack_ty res_ty (HsCmdDo stmts _) env_ids = do
     (core_stmts, env_ids') <- dsCmdDo ids local_vars res_ty stmts env_ids
     let env_ty = mkBigCoreVarTupTy env_ids
     core_fst <- mkFstExpr env_ty stack_ty
     return (do_premap ids
-		(mkCorePairTy env_ty stack_ty)
-		env_ty
-		res_ty
-		core_fst
-		core_stmts,
-	env_ids')
+                (mkCorePairTy env_ty stack_ty)
+                env_ty
+                res_ty
+                core_fst
+                core_stmts,
+        env_ids')
 
 -- D |- e :: forall e. a1 (e,stk1) t1 -> ... an (e,stkn) tn -> a (e,stk) t
 -- D; xs |-a ci :: stki --> ti
 -- -----------------------------------
--- D; xs |-a (|e c1 ... cn|) :: stk --> t	---> e [t_xs] c1 ... cn
+-- D; xs |-a (|e c1 ... cn|) :: stk --> t       ---> e [t_xs] c1 ... cn
 
 dsCmd _ids local_vars _stack_ty _res_ty (HsCmdArrForm op _ args) env_ids = do
     let env_ty = mkBigCoreVarTupTy env_ids
@@ -631,16 +625,16 @@ dsCmd ids local_vars stack_ty res_ty (HsCmdCast coercion cmd) env_ids = do
 
 dsCmd _ _ _ _ _ c = pprPanic "dsCmd" (ppr c)
 
--- D; ys |-a c : stk --> t	(ys <= xs)
+-- D; ys |-a c : stk --> t      (ys <= xs)
 -- ---------------------
--- D; xs |-a c : stk --> t	---> premap (\ ((xs),stk) -> ((ys),stk)) c
+-- D; xs |-a c : stk --> t      ---> premap (\ ((xs),stk) -> ((ys),stk)) c
 
 dsTrimCmdArg
-	:: IdSet		-- set of local vars available to this command
-	-> [Id]			-- list of vars in the input to this command
-	-> LHsCmdTop Id		-- command argument to desugar
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet)		-- subset of local vars that occur free
+        :: IdSet                -- set of local vars available to this command
+        -> [Id]                 -- list of vars in the input to this command
+        -> LHsCmdTop Id         -- command argument to desugar
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet)          -- subset of local vars that occur free
 dsTrimCmdArg local_vars env_ids (L _ (HsCmdTop cmd stack_ty cmd_ty ids)) = do
     (meth_binds, meth_ids) <- mkCmdEnv ids
     (core_cmd, free_vars, env_ids') <- dsfixCmd meth_ids local_vars stack_ty cmd_ty cmd
@@ -657,14 +651,14 @@ dsTrimCmdArg local_vars env_ids (L _ (HsCmdTop cmd stack_ty cmd_ty ids)) = do
 -- Typically needs to be prefixed with arr (\(p, stk) -> ((xs),stk))
 
 dsfixCmd
-	:: DsCmdEnv		-- arrow combinators
-	-> IdSet		-- set of local vars available to this command
-	-> Type			-- type of the stack (right-nested tuple)
-	-> Type			-- return type of the command
-	-> LHsCmd Id		-- command to desugar
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet,		-- subset of local vars that occur free
-		[Id])		-- the same local vars as a list, fed back
+        :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this command
+        -> Type                 -- type of the stack (right-nested tuple)
+        -> Type                 -- return type of the command
+        -> LHsCmd Id            -- command to desugar
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet,          -- subset of local vars that occur free
+                [Id])           -- the same local vars as a list, fed back
 dsfixCmd ids local_vars stk_ty cmd_ty cmd
   = trimInput (dsLCmd ids local_vars stk_ty cmd_ty cmd)
 
@@ -672,12 +666,12 @@ dsfixCmd ids local_vars stk_ty cmd_ty cmd
 -- for use as the input tuple of the generated arrow.
 
 trimInput
-	:: ([Id] -> DsM (CoreExpr, IdSet))
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet,		-- subset of local vars that occur free
-		[Id])		-- same local vars as a list, fed back to
-				-- the inner function to form the tuple of
-				-- inputs to the arrow.
+        :: ([Id] -> DsM (CoreExpr, IdSet))
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet,          -- subset of local vars that occur free
+                [Id])           -- same local vars as a list, fed back to
+                                -- the inner function to form the tuple of
+                                -- inputs to the arrow.
 trimInput build_arrow
   = fixDs (\ ~(_,_,env_ids) -> do
         (core_cmd, free_vars) <- build_arrow env_ids
@@ -687,19 +681,19 @@ trimInput build_arrow
 
 Translation of command judgements of the form
 
-	D |-a do { ss } : t
+        D |-a do { ss } : t
 
 \begin{code}
 
-dsCmdDo :: DsCmdEnv		-- arrow combinators
-	-> IdSet		-- set of local vars available to this statement
-	-> Type			-- return type of the statement
-	-> [CmdLStmt Id]        -- statements to desugar
-	-> [Id]			-- list of vars in the input to this statement
-				-- This is typically fed back,
-				-- so don't pull on it too early
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet)		-- subset of local vars that occur free
+dsCmdDo :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this statement
+        -> Type                 -- return type of the statement
+        -> [CmdLStmt Id]        -- statements to desugar
+        -> [Id]                 -- list of vars in the input to this statement
+                                -- This is typically fed back,
+                                -- so don't pull on it too early
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet)          -- subset of local vars that occur free
 
 dsCmdDo _ _ _ [] _ = panic "dsCmdDo"
 
@@ -707,7 +701,7 @@ dsCmdDo _ _ _ [] _ = panic "dsCmdDo"
 -- --------------------------
 -- D; xs |-a do { c } : t
 --
---		---> premap (\ (xs) -> ((xs), ())) c
+--              ---> premap (\ (xs) -> ((xs), ())) c
 
 dsCmdDo ids local_vars res_ty [L _ (LastStmt body _)] env_ids = do
     (core_body, env_ids') <- dsLCmd ids local_vars unitTy res_ty body env_ids
@@ -716,11 +710,11 @@ dsCmdDo ids local_vars res_ty [L _ (LastStmt body _)] env_ids = do
     let core_map = Lam env_var (mkCorePairExpr (Var env_var) mkCoreUnitExpr)
     return (do_premap ids
                         env_ty
-			(mkCorePairTy env_ty unitTy)
+                        (mkCorePairTy env_ty unitTy)
                         res_ty
                         core_map
                         core_body,
-	env_ids')
+        env_ids')
 
 dsCmdDo ids local_vars res_ty (stmt:stmts) env_ids = do
     let
@@ -747,50 +741,50 @@ dsCmdLStmt ids local_vars out_ids cmd env_ids
   = dsCmdStmt ids local_vars out_ids (unLoc cmd) env_ids
 
 dsCmdStmt
-	:: DsCmdEnv		-- arrow combinators
-	-> IdSet		-- set of local vars available to this statement
-	-> [Id]			-- list of vars in the output of this statement
-	-> CmdStmt Id           -- statement to desugar
-	-> [Id]			-- list of vars in the input to this statement
-				-- This is typically fed back,
-				-- so don't pull on it too early
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet)		-- subset of local vars that occur free
+        :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this statement
+        -> [Id]                 -- list of vars in the output of this statement
+        -> CmdStmt Id           -- statement to desugar
+        -> [Id]                 -- list of vars in the input to this statement
+                                -- This is typically fed back,
+                                -- so don't pull on it too early
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet)          -- subset of local vars that occur free
 
 -- D; xs1 |-a c : () --> t
 -- D; xs' |-a do { ss } : t'
 -- ------------------------------
 -- D; xs  |-a do { c; ss } : t'
 --
---		---> premap (\ ((xs)) -> (((xs1),()),(xs')))
---			(first c >>> arr snd) >>> ss
+--              ---> premap (\ ((xs)) -> (((xs1),()),(xs')))
+--                      (first c >>> arr snd) >>> ss
 
 dsCmdStmt ids local_vars out_ids (BodyStmt cmd _ _ c_ty) env_ids = do
     (core_cmd, fv_cmd, env_ids1) <- dsfixCmd ids local_vars unitTy c_ty cmd
     core_mux <- matchEnv env_ids
         (mkCorePairExpr
-	    (mkCorePairExpr (mkBigCoreVarTup env_ids1) mkCoreUnitExpr)
-	    (mkBigCoreVarTup out_ids))
+            (mkCorePairExpr (mkBigCoreVarTup env_ids1) mkCoreUnitExpr)
+            (mkBigCoreVarTup out_ids))
     let
-	in_ty = mkBigCoreVarTupTy env_ids
-	in_ty1 = mkCorePairTy (mkBigCoreVarTupTy env_ids1) unitTy
-	out_ty = mkBigCoreVarTupTy out_ids
-	before_c_ty = mkCorePairTy in_ty1 out_ty
-	after_c_ty = mkCorePairTy c_ty out_ty
+        in_ty = mkBigCoreVarTupTy env_ids
+        in_ty1 = mkCorePairTy (mkBigCoreVarTupTy env_ids1) unitTy
+        out_ty = mkBigCoreVarTupTy out_ids
+        before_c_ty = mkCorePairTy in_ty1 out_ty
+        after_c_ty = mkCorePairTy c_ty out_ty
     snd_fn <- mkSndExpr c_ty out_ty
     return (do_premap ids in_ty before_c_ty out_ty core_mux $
-		do_compose ids before_c_ty after_c_ty out_ty
-			(do_first ids in_ty1 c_ty out_ty core_cmd) $
-		do_arr ids after_c_ty out_ty snd_fn,
-	      extendVarSetList fv_cmd out_ids)
+                do_compose ids before_c_ty after_c_ty out_ty
+                        (do_first ids in_ty1 c_ty out_ty core_cmd) $
+                do_arr ids after_c_ty out_ty snd_fn,
+              extendVarSetList fv_cmd out_ids)
 
 -- D; xs1 |-a c : () --> t
--- D; xs' |-a do { ss } : t'		xs2 = xs' - defs(p)
+-- D; xs' |-a do { ss } : t'            xs2 = xs' - defs(p)
 -- -----------------------------------
 -- D; xs  |-a do { p <- c; ss } : t'
 --
---		---> premap (\ (xs) -> (((xs1),()),(xs2)))
---			(first c >>> arr (\ (p, (xs2)) -> (xs'))) >>> ss
+--              ---> premap (\ (xs) -> (((xs1),()),(xs2)))
+--                      (first c >>> arr (\ (p, (xs2)) -> (xs'))) >>> ss
 --
 -- It would be simpler and more consistent to do this using second,
 -- but that's likely to be defined in terms of first.
@@ -798,53 +792,53 @@ dsCmdStmt ids local_vars out_ids (BodyStmt cmd _ _ c_ty) env_ids = do
 dsCmdStmt ids local_vars out_ids (BindStmt pat cmd _ _) env_ids = do
     (core_cmd, fv_cmd, env_ids1) <- dsfixCmd ids local_vars unitTy (hsLPatType pat) cmd
     let
-	pat_ty = hsLPatType pat
-	pat_vars = mkVarSet (collectPatBinders pat)
-	env_ids2 = varSetElems (mkVarSet out_ids `minusVarSet` pat_vars)
-	env_ty2 = mkBigCoreVarTupTy env_ids2
+        pat_ty = hsLPatType pat
+        pat_vars = mkVarSet (collectPatBinders pat)
+        env_ids2 = varSetElems (mkVarSet out_ids `minusVarSet` pat_vars)
+        env_ty2 = mkBigCoreVarTupTy env_ids2
 
     -- multiplexing function
-    --		\ (xs) -> (((xs1),()),(xs2))
+    --          \ (xs) -> (((xs1),()),(xs2))
 
     core_mux <- matchEnv env_ids
         (mkCorePairExpr
-	    (mkCorePairExpr (mkBigCoreVarTup env_ids1) mkCoreUnitExpr)
-	    (mkBigCoreVarTup env_ids2))
+            (mkCorePairExpr (mkBigCoreVarTup env_ids1) mkCoreUnitExpr)
+            (mkBigCoreVarTup env_ids2))
 
     -- projection function
-    --		\ (p, (xs2)) -> (zs)
+    --          \ (p, (xs2)) -> (zs)
 
     env_id <- newSysLocalDs env_ty2
     uniqs <- newUniqueSupply
     let
-	after_c_ty = mkCorePairTy pat_ty env_ty2
-	out_ty = mkBigCoreVarTupTy out_ids
-	body_expr = coreCaseTuple uniqs env_id env_ids2 (mkBigCoreVarTup out_ids)
+        after_c_ty = mkCorePairTy pat_ty env_ty2
+        out_ty = mkBigCoreVarTupTy out_ids
+        body_expr = coreCaseTuple uniqs env_id env_ids2 (mkBigCoreVarTup out_ids)
     
     fail_expr <- mkFailExpr (StmtCtxt DoExpr) out_ty
     pat_id    <- selectSimpleMatchVarL pat
     match_code <- matchSimply (Var pat_id) (StmtCtxt DoExpr) pat body_expr fail_expr
     pair_id   <- newSysLocalDs after_c_ty
     let
-	proj_expr = Lam pair_id (coreCasePair pair_id pat_id env_id match_code)
+        proj_expr = Lam pair_id (coreCasePair pair_id pat_id env_id match_code)
 
     -- put it all together
     let
-	in_ty = mkBigCoreVarTupTy env_ids
-	in_ty1 = mkCorePairTy (mkBigCoreVarTupTy env_ids1) unitTy
-	in_ty2 = mkBigCoreVarTupTy env_ids2
-	before_c_ty = mkCorePairTy in_ty1 in_ty2
+        in_ty = mkBigCoreVarTupTy env_ids
+        in_ty1 = mkCorePairTy (mkBigCoreVarTupTy env_ids1) unitTy
+        in_ty2 = mkBigCoreVarTupTy env_ids2
+        before_c_ty = mkCorePairTy in_ty1 in_ty2
     return (do_premap ids in_ty before_c_ty out_ty core_mux $
-		do_compose ids before_c_ty after_c_ty out_ty
-			(do_first ids in_ty1 pat_ty in_ty2 core_cmd) $
-		do_arr ids after_c_ty out_ty proj_expr,
-	      fv_cmd `unionVarSet` (mkVarSet out_ids `minusVarSet` pat_vars))
+                do_compose ids before_c_ty after_c_ty out_ty
+                        (do_first ids in_ty1 pat_ty in_ty2 core_cmd) $
+                do_arr ids after_c_ty out_ty proj_expr,
+              fv_cmd `unionVarSet` (mkVarSet out_ids `minusVarSet` pat_vars))
 
 -- D; xs' |-a do { ss } : t
 -- --------------------------------------
 -- D; xs  |-a do { let binds; ss } : t
 --
---		---> arr (\ (xs) -> let binds in (xs')) >>> ss
+--              ---> arr (\ (xs) -> let binds in (xs')) >>> ss
 
 dsCmdStmt ids local_vars out_ids (LetStmt binds) env_ids = do
     -- build a new environment using the let bindings
@@ -852,24 +846,24 @@ dsCmdStmt ids local_vars out_ids (LetStmt binds) env_ids = do
     -- match the old environment against the input
     core_map <- matchEnv env_ids core_binds
     return (do_arr ids
-			(mkBigCoreVarTupTy env_ids)
-			(mkBigCoreVarTupTy out_ids)
-			core_map,
-	    exprFreeIds core_binds `intersectVarSet` local_vars)
+                        (mkBigCoreVarTupTy env_ids)
+                        (mkBigCoreVarTupTy out_ids)
+                        core_map,
+            exprFreeIds core_binds `intersectVarSet` local_vars)
 
 -- D; ys  |-a do { ss; returnA -< ((xs1), (ys2)) } : ...
 -- D; xs' |-a do { ss' } : t
 -- ------------------------------------
 -- D; xs  |-a do { rec ss; ss' } : t
 --
---			xs1 = xs' /\ defs(ss)
---			xs2 = xs' - defs(ss)
---			ys1 = ys - defs(ss)
---			ys2 = ys /\ defs(ss)
+--                      xs1 = xs' /\ defs(ss)
+--                      xs2 = xs' - defs(ss)
+--                      ys1 = ys - defs(ss)
+--                      ys2 = ys /\ defs(ss)
 --
---		---> arr (\(xs) -> ((ys1),(xs2))) >>>
---			first (loop (arr (\((ys1),~(ys2)) -> (ys)) >>> ss)) >>>
---			arr (\((xs1),(xs2)) -> (xs')) >>> ss'
+--              ---> arr (\(xs) -> ((ys1),(xs2))) >>>
+--                      first (loop (arr (\((ys1),~(ys2)) -> (ys)) >>> ss)) >>>
+--                      arr (\((xs1),(xs2)) -> (xs')) >>> ss'
 
 dsCmdStmt ids local_vars out_ids
         (RecStmt { recS_stmts = stmts
@@ -924,20 +918,20 @@ dsCmdStmt ids local_vars out_ids
 
 dsCmdStmt _ _ _ _ s = pprPanic "dsCmdStmt" (ppr s)
 
---	loop (premap (\ ((env1_ids), ~(rec_ids)) -> (env_ids))
---	      (ss >>> arr (\ (out_ids) -> ((later_rets),(rec_rets))))) >>>
+--      loop (premap (\ ((env1_ids), ~(rec_ids)) -> (env_ids))
+--            (ss >>> arr (\ (out_ids) -> ((later_rets),(rec_rets))))) >>>
 
 dsRecCmd
-        :: DsCmdEnv		-- arrow combinators
-        -> IdSet		-- set of local vars available to this statement
+        :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this statement
         -> [CmdLStmt Id]        -- list of statements inside the RecCmd
-        -> [Id]			-- list of vars defined here and used later
-        -> [HsExpr Id]		-- expressions corresponding to later_ids
-        -> [Id]			-- list of vars fed back through the loop
-        -> [HsExpr Id]		-- expressions corresponding to rec_ids
-        -> DsM (CoreExpr,	-- desugared statement
-                IdSet,		-- subset of local vars that occur free
-                [Id])		-- same local vars as a list
+        -> [Id]                 -- list of vars defined here and used later
+        -> [HsExpr Id]          -- expressions corresponding to later_ids
+        -> [Id]                 -- list of vars fed back through the loop
+        -> [HsExpr Id]          -- expressions corresponding to rec_ids
+        -> DsM (CoreExpr,       -- desugared statement
+                IdSet,          -- subset of local vars that occur free
+                [Id])           -- same local vars as a list
 
 dsRecCmd ids local_vars stmts later_ids later_rets rec_ids rec_rets = do
     let
@@ -1005,25 +999,25 @@ two environments (no stack)
 \begin{code}
 
 dsfixCmdStmts
-	:: DsCmdEnv		-- arrow combinators
-	-> IdSet		-- set of local vars available to this statement
-	-> [Id]			-- output vars of these statements
-	-> [CmdLStmt Id]        -- statements to desugar
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet,		-- subset of local vars that occur free
-		[Id])		-- same local vars as a list
+        :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this statement
+        -> [Id]                 -- output vars of these statements
+        -> [CmdLStmt Id]        -- statements to desugar
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet,          -- subset of local vars that occur free
+                [Id])           -- same local vars as a list
 
 dsfixCmdStmts ids local_vars out_ids stmts
   = trimInput (dsCmdStmts ids local_vars out_ids stmts)
 
 dsCmdStmts
-	:: DsCmdEnv		-- arrow combinators
-	-> IdSet		-- set of local vars available to this statement
-	-> [Id]			-- output vars of these statements
-	-> [CmdLStmt Id]        -- statements to desugar
-	-> [Id]			-- list of vars in the input to these statements
-	-> DsM (CoreExpr,	-- desugared expression
-		IdSet)		-- subset of local vars that occur free
+        :: DsCmdEnv             -- arrow combinators
+        -> IdSet                -- set of local vars available to this statement
+        -> [Id]                 -- output vars of these statements
+        -> [CmdLStmt Id]        -- statements to desugar
+        -> [Id]                 -- list of vars in the input to these statements
+        -> DsM (CoreExpr,       -- desugared expression
+                IdSet)          -- subset of local vars that occur free
 
 dsCmdStmts ids local_vars out_ids [stmt] env_ids
   = dsCmdLStmt ids local_vars out_ids stmt env_ids
@@ -1049,11 +1043,11 @@ Match a list of expressions against a list of patterns, left-to-right.
 
 \begin{code}
 matchSimplys :: [CoreExpr]              -- Scrutinees
-	     -> HsMatchContext Name	-- Match kind
-	     -> [LPat Id]         	-- Patterns they should match
-	     -> CoreExpr                -- Return this if they all match
-	     -> CoreExpr                -- Return this if they don't
-	     -> DsM CoreExpr
+             -> HsMatchContext Name     -- Match kind
+             -> [LPat Id]               -- Patterns they should match
+             -> CoreExpr                -- Return this if they all match
+             -> CoreExpr                -- Return this if they don't
+             -> DsM CoreExpr
 matchSimplys [] _ctxt [] result_expr _fail_expr = return result_expr
 matchSimplys (exp:exps) ctxt (pat:pats) result_expr fail_expr = do
     match_code <- matchSimplys exps ctxt pats result_expr fail_expr
@@ -1067,13 +1061,13 @@ List of leaf expressions, with set of variables bound in each
 leavesMatch :: LMatch Id (Located (body Id)) -> [(Located (body Id), IdSet)]
 leavesMatch (L _ (Match pats _ (GRHSs grhss binds)))
   = let
-	defined_vars = mkVarSet (collectPatsBinders pats)
-			`unionVarSet`
-		       mkVarSet (collectLocalBinders binds)
+        defined_vars = mkVarSet (collectPatsBinders pats)
+                        `unionVarSet`
+                       mkVarSet (collectLocalBinders binds)
     in
     [(body, 
       mkVarSet (collectLStmtsBinders stmts) 
-	`unionVarSet` defined_vars) 
+        `unionVarSet` defined_vars) 
     | L _ (GRHS stmts body) <- grhss]
 \end{code}
 
@@ -1088,7 +1082,7 @@ replaceLeavesMatch
             LMatch Id (Located (body' Id)))     -- updated match
 replaceLeavesMatch _res_ty leaves (L loc (Match pat mt (GRHSs grhss binds)))
   = let
-	(leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss
+        (leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss
     in
     (leaves', L loc (Match pat mt (GRHSs grhss' binds)))
 
diff --git a/compiler/deSugar/DsBinds.lhs b/compiler/deSugar/DsBinds.lhs
index a33ff91..cb0e2c6 100644
--- a/compiler/deSugar/DsBinds.lhs
+++ b/compiler/deSugar/DsBinds.lhs
@@ -10,12 +10,6 @@ in that the @Rec@/@NonRec@/etc structure is thrown away (whereas at
 lower levels it is preserved with @let@/@letrec@s).
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module DsBinds ( dsTopLHsBinds, dsLHsBinds, decomposeRuleLhs, dsSpec,
                  dsHsWrapper, dsTcEvBinds, dsEvBinds
@@ -23,15 +17,15 @@ module DsBinds ( dsTopLHsBinds, dsLHsBinds, decomposeRuleLhs, dsSpec,
 
 #include "HsVersions.h"
 
-import {-# SOURCE #-}	DsExpr( dsLExpr )
-import {-# SOURCE #-}	Match( matchWrapper )
+import {-# SOURCE #-}   DsExpr( dsLExpr )
+import {-# SOURCE #-}   Match( matchWrapper )
 
 import DsMonad
 import DsGRHSs
 import DsUtils
 
-import HsSyn		-- lots of things
-import CoreSyn		-- lots of things
+import HsSyn            -- lots of things
+import CoreSyn          -- lots of things
 import Literal          ( Literal(MachStr) )
 import CoreSubst
 import MkCore
@@ -52,9 +46,9 @@ import Coercion hiding (substCo)
 import TysWiredIn ( eqBoxDataCon, coercibleTyCon, coercibleDataCon, tupleCon )
 import Id
 import Class
-import DataCon	( dataConWorkId )
+import DataCon  ( dataConWorkId )
 import Name
-import MkId	( seqId )
+import MkId     ( seqId )
 import Var
 import VarSet
 import Rules
@@ -77,9 +71,9 @@ import Control.Monad(liftM)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[dsMonoBinds]{Desugaring a @MonoBinds@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -106,17 +100,17 @@ dsHsBind (VarBind { var_id = var, var_rhs = expr, var_inline = inline_regardless
   = do  { dflags <- getDynFlags
         ; core_expr <- dsLExpr expr
 
-	        -- Dictionary bindings are always VarBinds,
-	        -- so we only need do this here
+                -- Dictionary bindings are always VarBinds,
+                -- so we only need do this here
         ; let var' | inline_regardless = var `setIdUnfolding` mkCompulsoryUnfolding core_expr
-	      	   | otherwise         = var
+                   | otherwise         = var
 
         ; return (unitOL (makeCorePair dflags var' False 0 core_expr)) }
 
 dsHsBind (FunBind { fun_id = L _ fun, fun_matches = matches
                   , fun_co_fn = co_fn, fun_tick = tick
                   , fun_infix = inf })
- = do	{ dflags <- getDynFlags
+ = do   { dflags <- getDynFlags
         ; (args, body) <- matchWrapper (FunRhs (idName fun) inf) matches
         ; let body' = mkOptTickBox tick body
         ; rhs <- dsHsWrapper co_fn (mkLams args body')
@@ -125,17 +119,17 @@ dsHsBind (FunBind { fun_id = L _ fun, fun_matches = matches
 
 dsHsBind (PatBind { pat_lhs = pat, pat_rhs = grhss, pat_rhs_ty = ty
                   , pat_ticks = (rhs_tick, var_ticks) })
-  = do	{ body_expr <- dsGuarded grhss ty
+  = do  { body_expr <- dsGuarded grhss ty
         ; let body' = mkOptTickBox rhs_tick body_expr
         ; sel_binds <- mkSelectorBinds var_ticks pat body'
-	  -- We silently ignore inline pragmas; no makeCorePair
-	  -- Not so cool, but really doesn't matter
+          -- We silently ignore inline pragmas; no makeCorePair
+          -- Not so cool, but really doesn't matter
     ; return (toOL sel_binds) }
 
-	-- A common case: one exported variable
-	-- Non-recursive bindings come through this way
-	-- So do self-recursive bindings, and recursive bindings
-	-- that have been chopped up with type signatures
+        -- A common case: one exported variable
+        -- Non-recursive bindings come through this way
+        -- So do self-recursive bindings, and recursive bindings
+        -- that have been chopped up with type signatures
 dsHsBind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
                    , abs_exports = [export]
                    , abs_ev_binds = ev_binds, abs_binds = binds })
@@ -143,21 +137,21 @@ dsHsBind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
         , abe_mono = local, abe_prags = prags } <- export
   = do  { dflags <- getDynFlags
         ; bind_prs    <- ds_lhs_binds binds
-	; let	core_bind = Rec (fromOL bind_prs)
+        ; let   core_bind = Rec (fromOL bind_prs)
         ; ds_binds <- dsTcEvBinds ev_binds
         ; rhs <- dsHsWrapper wrap $  -- Usually the identity
-			    mkLams tyvars $ mkLams dicts $ 
-	                    mkCoreLets ds_binds $
+                            mkLams tyvars $ mkLams dicts $ 
+                            mkCoreLets ds_binds $
                             Let core_bind $
                             Var local
     
-	; (spec_binds, rules) <- dsSpecs rhs prags
+        ; (spec_binds, rules) <- dsSpecs rhs prags
 
-	; let   global'   = addIdSpecialisations global rules
-		main_bind = makeCorePair dflags global' (isDefaultMethod prags)
+        ; let   global'   = addIdSpecialisations global rules
+                main_bind = makeCorePair dflags global' (isDefaultMethod prags)
                                          (dictArity dicts) rhs 
     
-	; return (main_bind `consOL` spec_binds) }
+        ; return (main_bind `consOL` spec_binds) }
 
 dsHsBind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
                    , abs_exports = exports, abs_ev_binds = ev_binds
@@ -167,39 +161,39 @@ dsHsBind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
         ; bind_prs    <- ds_lhs_binds binds
         ; let core_bind = Rec [ makeCorePair dflags (add_inline lcl_id) False 0 rhs
                               | (lcl_id, rhs) <- fromOL bind_prs ]
-	      	-- Monomorphic recursion possible, hence Rec
+                -- Monomorphic recursion possible, hence Rec
 
-	      locals       = map abe_mono exports
-	      tup_expr     = mkBigCoreVarTup locals
-	      tup_ty	   = exprType tup_expr
+              locals       = map abe_mono exports
+              tup_expr     = mkBigCoreVarTup locals
+              tup_ty       = exprType tup_expr
         ; ds_binds <- dsTcEvBinds ev_binds
-	; let poly_tup_rhs = mkLams tyvars $ mkLams dicts $
-	      		     mkCoreLets ds_binds $
-			     Let core_bind $
-	 	     	     tup_expr
+        ; let poly_tup_rhs = mkLams tyvars $ mkLams dicts $
+                             mkCoreLets ds_binds $
+                             Let core_bind $
+                             tup_expr
 
-	; poly_tup_id <- newSysLocalDs (exprType poly_tup_rhs)
+        ; poly_tup_id <- newSysLocalDs (exprType poly_tup_rhs)
 
-	; let mk_bind (ABE { abe_wrap = wrap, abe_poly = global
+        ; let mk_bind (ABE { abe_wrap = wrap, abe_poly = global
                            , abe_mono = local, abe_prags = spec_prags })
-	        = do { tup_id  <- newSysLocalDs tup_ty
-	             ; rhs <- dsHsWrapper wrap $ 
+                = do { tup_id  <- newSysLocalDs tup_ty
+                     ; rhs <- dsHsWrapper wrap $ 
                                  mkLams tyvars $ mkLams dicts $
-	      	     		 mkTupleSelector locals local tup_id $
-			         mkVarApps (Var poly_tup_id) (tyvars ++ dicts)
+                                 mkTupleSelector locals local tup_id $
+                                 mkVarApps (Var poly_tup_id) (tyvars ++ dicts)
                      ; let rhs_for_spec = Let (NonRec poly_tup_id poly_tup_rhs) rhs
-		     ; (spec_binds, rules) <- dsSpecs rhs_for_spec spec_prags
-		     ; let global' = (global `setInlinePragma` defaultInlinePragma)
+                     ; (spec_binds, rules) <- dsSpecs rhs_for_spec spec_prags
+                     ; let global' = (global `setInlinePragma` defaultInlinePragma)
                                              `addIdSpecialisations` rules
                            -- Kill the INLINE pragma because it applies to
                            -- the user written (local) function.  The global
                            -- Id is just the selector.  Hmm.  
-		     ; return ((global', rhs) `consOL` spec_binds) }
+                     ; return ((global', rhs) `consOL` spec_binds) }
 
         ; export_binds_s <- mapM mk_bind exports
 
-	; return ((poly_tup_id, poly_tup_rhs) `consOL` 
-		    concatOL export_binds_s) }
+        ; return ((poly_tup_id, poly_tup_rhs) `consOL` 
+                    concatOL export_binds_s) }
   where
     inline_env :: IdEnv Id   -- Maps a monomorphic local Id to one with
                              -- the inline pragma from the source
@@ -215,14 +209,14 @@ dsHsBind (AbsBinds { abs_tvs = tyvars, abs_ev_vars = dicts
 ------------------------
 makeCorePair :: DynFlags -> Id -> Bool -> Arity -> CoreExpr -> (Id, CoreExpr)
 makeCorePair dflags gbl_id is_default_method dict_arity rhs
-  | is_default_method		      -- Default methods are *always* inlined
+  | is_default_method                 -- Default methods are *always* inlined
   = (gbl_id `setIdUnfolding` mkCompulsoryUnfolding rhs, rhs)
 
   | otherwise
   = case inlinePragmaSpec inline_prag of
-      	  EmptyInlineSpec -> (gbl_id, rhs)
-      	  NoInline        -> (gbl_id, rhs)
-      	  Inlinable       -> (gbl_id `setIdUnfolding` inlinable_unf, rhs)
+          EmptyInlineSpec -> (gbl_id, rhs)
+          NoInline        -> (gbl_id, rhs)
+          Inlinable       -> (gbl_id `setIdUnfolding` inlinable_unf, rhs)
           Inline          -> inline_pair
 
   where
@@ -230,8 +224,8 @@ makeCorePair dflags gbl_id is_default_method dict_arity rhs
     inlinable_unf = mkInlinableUnfolding dflags rhs
     inline_pair
        | Just arity <- inlinePragmaSat inline_prag
-      	-- Add an Unfolding for an INLINE (but not for NOINLINE)
-	-- And eta-expand the RHS; see Note [Eta-expanding INLINE things]
+        -- Add an Unfolding for an INLINE (but not for NOINLINE)
+        -- And eta-expand the RHS; see Note [Eta-expanding INLINE things]
        , let real_arity = dict_arity + arity
         -- NB: The arity in the InlineRule takes account of the dictionaries
        = ( gbl_id `setIdUnfolding` mkInlineUnfolding (Just real_arity) rhs
@@ -262,22 +256,22 @@ Note [Rules and inlining]
 Common special case: no type or dictionary abstraction
 This is a bit less trivial than you might suppose
 The naive way woudl be to desguar to something like
-	f_lcl = ...f_lcl...	-- The "binds" from AbsBinds
-	M.f = f_lcl		-- Generated from "exports"
+        f_lcl = ...f_lcl...     -- The "binds" from AbsBinds
+        M.f = f_lcl             -- Generated from "exports"
 But we don't want that, because if M.f isn't exported,
 it'll be inlined unconditionally at every call site (its rhs is 
 trivial).  That would be ok unless it has RULES, which would 
 thereby be completely lost.  Bad, bad, bad.
 
 Instead we want to generate
-	M.f = ...f_lcl...
-	f_lcl = M.f
+        M.f = ...f_lcl...
+        f_lcl = M.f
 Now all is cool. The RULES are attached to M.f (by SimplCore), 
 and f_lcl is rapidly inlined away.
 
 This does not happen in the same way to polymorphic binds,
 because they desugar to
-	M.f = /\a. let f_lcl = ...f_lcl... in f_lcl
+        M.f = /\a. let f_lcl = ...f_lcl... in f_lcl
 Although I'm a bit worried about whether full laziness might
 float the f_lcl binding out and then inline M.f at its call site
 
@@ -303,36 +297,36 @@ Note [Abstracting over tyvars only]
 When abstracting over type variable only (not dictionaries), we don't really need to
 built a tuple and select from it, as we do in the general case. Instead we can take
 
-	AbsBinds [a,b] [ ([a,b], fg, fl, _),
-		         ([b],   gg, gl, _) ]
-		{ fl = e1
-		  gl = e2
-		   h = e3 }
+        AbsBinds [a,b] [ ([a,b], fg, fl, _),
+                         ([b],   gg, gl, _) ]
+                { fl = e1
+                  gl = e2
+                   h = e3 }
 
 and desugar it to
 
-	fg = /\ab. let B in e1
-	gg = /\b. let a = () in let B in S(e2)
-	h  = /\ab. let B in e3
+        fg = /\ab. let B in e1
+        gg = /\b. let a = () in let B in S(e2)
+        h  = /\ab. let B in e3
 
 where B is the *non-recursive* binding
-	fl = fg a b
-	gl = gg b
-	h  = h a b    -- See (b); note shadowing!
+        fl = fg a b
+        gl = gg b
+        h  = h a b    -- See (b); note shadowing!
 
 Notice (a) g has a different number of type variables to f, so we must
-	     use the mkArbitraryType thing to fill in the gaps.  
-	     We use a type-let to do that.
+             use the mkArbitraryType thing to fill in the gaps.  
+             We use a type-let to do that.
 
-	 (b) The local variable h isn't in the exports, and rather than
-	     clone a fresh copy we simply replace h by (h a b), where
-	     the two h's have different types!  Shadowing happens here,
-	     which looks confusing but works fine.
+         (b) The local variable h isn't in the exports, and rather than
+             clone a fresh copy we simply replace h by (h a b), where
+             the two h's have different types!  Shadowing happens here,
+             which looks confusing but works fine.
 
-	 (c) The result is *still* quadratic-sized if there are a lot of
-	     small bindings.  So if there are more than some small
-	     number (10), we filter the binding set B by the free
-	     variables of the particular RHS.  Tiresome.
+         (c) The result is *still* quadratic-sized if there are a lot of
+             small bindings.  So if there are more than some small
+             number (10), we filter the binding set B by the free
+             variables of the particular RHS.  Tiresome.
 
 Why got to this trouble?  It's a common case, and it removes the
 quadratic-sized tuple desugaring.  Less clutter, hopefullly faster
@@ -377,8 +371,8 @@ thought!
 Note [Implementing SPECIALISE pragmas]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Example:
-	f :: (Eq a, Ix b) => a -> b -> Bool
-	{-# SPECIALISE f :: (Ix p, Ix q) => Int -> (p,q) -> Bool #-}
+        f :: (Eq a, Ix b) => a -> b -> Bool
+        {-# SPECIALISE f :: (Ix p, Ix q) => Int -> (p,q) -> Bool #-}
         f = <poly_rhs>
 
 From this the typechecker generates
@@ -396,10 +390,10 @@ well as the dict.
 
 From these we generate:
 
-    Rule: 	forall p, q, (dp:Ix p), (dq:Ix q). 
+    Rule:       forall p, q, (dp:Ix p), (dq:Ix q). 
                     f Int (p,q) dInt ($dfInPair dp dq) = f_spec p q dp dq
 
-    Spec bind:	f_spec = wrap_fn <poly_rhs>
+    Spec bind:  f_spec = wrap_fn <poly_rhs>
 
 Note that 
 
@@ -414,8 +408,8 @@ Note that
 ------------------------
 dsSpecs :: CoreExpr     -- Its rhs
         -> TcSpecPrags
-        -> DsM ( OrdList (Id,CoreExpr) 	-- Binding for specialised Ids
-	       , [CoreRule] )		-- Rules for the Global Ids
+        -> DsM ( OrdList (Id,CoreExpr)  -- Binding for specialised Ids
+               , [CoreRule] )           -- Rules for the Global Ids
 -- See Note [Implementing SPECIALISE pragmas]
 dsSpecs _ IsDefaultMethod = return (nilOL, [])
 dsSpecs poly_rhs (SpecPrags sps)
@@ -423,9 +417,9 @@ dsSpecs poly_rhs (SpecPrags sps)
        ; let (spec_binds_s, rules) = unzip pairs
        ; return (concatOL spec_binds_s, rules) }
 
-dsSpec :: Maybe CoreExpr  	-- Just rhs => RULE is for a local binding
-       	  			-- Nothing => RULE is for an imported Id
-				-- 	      rhs is in the Id's unfolding
+dsSpec :: Maybe CoreExpr        -- Just rhs => RULE is for a local binding
+                                -- Nothing => RULE is for an imported Id
+                                --            rhs is in the Id's unfolding
        -> Located TcSpecPrag
        -> DsM (Maybe (OrdList (Id,CoreExpr), CoreRule))
 dsSpec mb_poly_rhs (L loc (SpecPrag poly_id spec_co spec_inl))
@@ -434,15 +428,15 @@ dsSpec mb_poly_rhs (L loc (SpecPrag poly_id spec_co spec_inl))
     do { warnDs (ptext (sLit "Ignoring useless SPECIALISE pragma for class method selector") 
                  <+> quotes (ppr poly_id))
        ; return Nothing  }  -- There is no point in trying to specialise a class op
-       	 		    -- Moreover, classops don't (currently) have an inl_sat arity set
-			    -- (it would be Just 0) and that in turn makes makeCorePair bleat
+                            -- Moreover, classops don't (currently) have an inl_sat arity set
+                            -- (it would be Just 0) and that in turn makes makeCorePair bleat
 
   | no_act_spec && isNeverActive rule_act 
   = putSrcSpanDs loc $ 
     do { warnDs (ptext (sLit "Ignoring useless SPECIALISE pragma for NOINLINE function:")
                  <+> quotes (ppr poly_id))
        ; return Nothing  }  -- Function is NOINLINE, and the specialiation inherits that
-       	 		    -- See Note [Activation pragmas for SPECIALISE]
+                            -- See Note [Activation pragmas for SPECIALISE]
 
   | otherwise
   = putSrcSpanDs loc $ 
@@ -460,13 +454,13 @@ dsSpec mb_poly_rhs (L loc (SpecPrag poly_id spec_co spec_inl))
        { dflags <- getDynFlags
        ; let spec_unf = specUnfolding bndrs args (realIdUnfolding poly_id)
              spec_id  = mkLocalId spec_name spec_ty 
-         	            `setInlinePragma` inl_prag
-         	 	    `setIdUnfolding`  spec_unf
+                            `setInlinePragma` inl_prag
+                            `setIdUnfolding`  spec_unf
              rule =  mkRule False {- Not auto -} is_local_id
                         (mkFastString ("SPEC " ++ showPpr dflags poly_name))
-       			rule_act poly_name
-       		        rule_bndrs args
-       			(mkVarApps (Var spec_id) bndrs)
+                        rule_act poly_name
+                        rule_bndrs args
+                        (mkVarApps (Var spec_id) bndrs)
 
        ; spec_rhs <- dsHsWrapper spec_co poly_rhs
        ; let spec_pair = makeCorePair dflags spec_id False (dictArity bndrs) spec_rhs
@@ -478,21 +472,21 @@ dsSpec mb_poly_rhs (L loc (SpecPrag poly_id spec_co spec_inl))
   where
     is_local_id = isJust mb_poly_rhs
     poly_rhs | Just rhs <-  mb_poly_rhs
-             = rhs  	    -- Local Id; this is its rhs
+             = rhs          -- Local Id; this is its rhs
              | Just unfolding <- maybeUnfoldingTemplate (realIdUnfolding poly_id)
              = unfolding    -- Imported Id; this is its unfolding
-	       		    -- Use realIdUnfolding so we get the unfolding 
-			    -- even when it is a loop breaker. 
-			    -- We want to specialise recursive functions!
+                            -- Use realIdUnfolding so we get the unfolding 
+                            -- even when it is a loop breaker. 
+                            -- We want to specialise recursive functions!
              | otherwise = pprPanic "dsImpSpecs" (ppr poly_id)
-	                    -- The type checker has checked that it *has* an unfolding
+                            -- The type checker has checked that it *has* an unfolding
 
     id_inl = idInlinePragma poly_id
 
     -- See Note [Activation pragmas for SPECIALISE]
     inl_prag | not (isDefaultInlinePragma spec_inl)    = spec_inl
              | not is_local_id  -- See Note [Specialising imported functions]
-             	    		 -- in OccurAnal
+                                 -- in OccurAnal
              , isStrongLoopBreaker (idOccInfo poly_id) = neverInlinePragma
              | otherwise                               = id_inl
      -- Get the INLINE pragma from SPECIALISE declaration, or,
@@ -568,9 +562,9 @@ SPEC f :: ty                [n]   INLINE [k]
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Adding inline pragmas}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -586,12 +580,12 @@ decomposeRuleLhs bndrs lhs
         (Var fn, args) -> check_bndrs fn args
 
         (Case scrut bndr ty [(DEFAULT, _, body)], args)
-	        | isDeadBinder bndr	-- Note [Matching seqId]
-		-> check_bndrs seqId (args' ++ args)
-		where
-		   args' = [Type (idType bndr), Type ty, scrut, body]
-	   
-	_other -> Left bad_shape_msg
+                | isDeadBinder bndr     -- Note [Matching seqId]
+                -> check_bndrs seqId (args' ++ args)
+                where
+                   args' = [Type (idType bndr), Type ty, scrut, body]
+           
+        _other -> Left bad_shape_msg
  where
    opt_lhs = simpleOptExpr lhs
 
@@ -607,13 +601,13 @@ decomposeRuleLhs bndrs lhs
             -- Add extra dict binders: Note [Constant rule dicts]
        extra_dict_bndrs = [ mkLocalId (localiseName (idName d)) (idType d)
                           | d <- varSetElems (arg_fvs `delVarSetList` bndrs)
-         	          , isDictId d]
+                          , isDictId d]
 
 
    bad_shape_msg = hang (ptext (sLit "RULE left-hand side too complicated to desugar"))
                       2 (ppr opt_lhs)
    dead_msg bndr = hang (sep [ ptext (sLit "Forall'd") <+> pp_bndr bndr
-			     , ptext (sLit "is not bound in RULE lhs")])
+                             , ptext (sLit "is not bound in RULE lhs")])
                       2 (ppr opt_lhs)
    pp_bndr bndr
     | isTyVar bndr                      = ptext (sLit "type variable") <+> quotes (ppr bndr)
@@ -633,14 +627,14 @@ and thereby
 
 For (c) consider the fold/build rule, which without simplification
 looked like:
-	fold k z (build (/\a. g a))  ==>  ...
+        fold k z (build (/\a. g a))  ==>  ...
 This doesn't match unless you do eta reduction on the build argument.
 Similarly for a LHS like
-	augment g (build h) 
+        augment g (build h) 
 we do not want to get
-	augment (\a. g a) (build h)
+        augment (\a. g a) (build h)
 otherwise we don't match when given an argument like
-	augment (\a. h a a) (build h)
+        augment (\a. h a a) (build h)
 
 NB: tcSimplifyRuleLhs is very careful not to generate complicated
     dictionary expressions that we might have to match
@@ -654,12 +648,12 @@ See Note [Rules for seq] in MkId for the details.
 Note [Unused spec binders]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
-	f :: a -> a
-	{-# SPECIALISE f :: Eq a => a -> a #-}
+        f :: a -> a
+        {-# SPECIALISE f :: Eq a => a -> a #-}
 It's true that this *is* a more specialised type, but the rule
 we get is something like this:
-	f_spec d = f
-	RULE: f = f_spec d
+        f_spec d = f
+        RULE: f = f_spec d
 Note that the rule is bogus, because it mentions a 'd' that is
 not bound on the LHS!  But it's a silly specialisation anyway, because
 the constraint is unused.  We could bind 'd' to (error "unused")
@@ -673,17 +667,17 @@ which is presumably in scope at the function definition site, we can quantify
 over it too.  *Any* dict with that type will do.
 
 So for example when you have
-	f :: Eq a => a -> a
-	f = <rhs>
-	{-# SPECIALISE f :: Int -> Int #-}
+        f :: Eq a => a -> a
+        f = <rhs>
+        {-# SPECIALISE f :: Int -> Int #-}
 
 Then we get the SpecPrag
-	SpecPrag (f Int dInt) 
+        SpecPrag (f Int dInt) 
 
 And from that we want the rule
-	
-	RULE forall dInt. f Int dInt = f_spec
-	f_spec = let f = <rhs> in f Int dInt
+        
+        RULE forall dInt. f Int dInt = f_spec
+        f_spec = let f = <rhs> in f Int dInt
 
 But be careful!  That dInt might be GHC.Base.$fOrdInt, which is an External
 Name, and you can't bind them in a lambda or forall without getting things
@@ -693,15 +687,15 @@ as the old one, but with an Internal name and no IdInfo.
 
 
 %************************************************************************
-%*									*
-		Desugaring evidence
-%*									*
+%*                                                                      *
+                Desugaring evidence
+%*                                                                      *
 %************************************************************************
 
 
 \begin{code}
 dsHsWrapper :: HsWrapper -> CoreExpr -> DsM CoreExpr
-dsHsWrapper WpHole 	      e = return e
+dsHsWrapper WpHole            e = return e
 dsHsWrapper (WpTyApp ty)      e = return $ App e (Type ty)
 dsHsWrapper (WpLet ev_binds)  e = do bs <- dsTcEvBinds ev_binds
                                      return (mkCoreLets bs e)
@@ -754,8 +748,8 @@ dsEvTerm (EvTupleSel v n)
    = do { tm' <- dsEvTerm v
         ; let scrut_ty = exprType tm'
               (tc, tys) = splitTyConApp scrut_ty
-    	      Just [dc] = tyConDataCons_maybe tc
-    	      xs = mkTemplateLocals tys
+              Just [dc] = tyConDataCons_maybe tc
+              xs = mkTemplateLocals tys
               the_x = getNth xs n
         ; ASSERT( isTupleTyCon tc )
           return $
@@ -771,7 +765,7 @@ dsEvTerm (EvTupleMk tms)
 dsEvTerm (EvSuperClass d n)
   = do { d' <- dsEvTerm d
        ; let (cls, tys) = getClassPredTys (exprType d')
-             sc_sel_id  = classSCSelId cls n	-- Zero-indexed
+             sc_sel_id  = classSCSelId cls n    -- Zero-indexed
        ; return $ Var sc_sel_id `mkTyApps` tys `App` d' }
   where
 
@@ -922,7 +916,7 @@ Note [Simple coercions]
 We have a special case for coercions that are simple variables.
 Suppose   cv :: a ~ b   is in scope
 Lacking the special case, if we see
-	f a b cv
+        f a b cv
 we'd desguar to
         f a b (case cv of EqBox (cv# :: a ~# b) -> EqBox cv#)
 which is a bit stupid.  The special case does the obvious thing.
diff --git a/compiler/deSugar/DsCCall.lhs b/compiler/deSugar/DsCCall.lhs
index ed8a8f0..b308b7e 100644
--- a/compiler/deSugar/DsCCall.lhs
+++ b/compiler/deSugar/DsCCall.lhs
@@ -6,20 +6,14 @@
 Desugaring foreign calls
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module DsCCall 
-	( dsCCall
-	, mkFCall
-	, unboxArg
-	, boxResult
-	, resultWrapper
-	) where
+        ( dsCCall
+        , mkFCall
+        , unboxArg
+        , boxResult
+        , resultWrapper
+        ) where
 
 #include "HsVersions.h"
 
@@ -84,15 +78,15 @@ follows:
    |
    V
    \ s# -> case (ccall# foo [ r, t1#, ... tm# ] s# e1# ... em#) of
-	  (StateAnd<r># result# state#) -> (R# result#, realWorld#)
+          (StateAnd<r># result# state#) -> (R# result#, realWorld#)
 \end{verbatim}
 
 \begin{code}
-dsCCall :: CLabelString	-- C routine to invoke
-	-> [CoreExpr]	-- Arguments (desugared)
-	-> Safety	-- Safety of the call
-	-> Type		-- Type of the result: IO t
-	-> DsM CoreExpr	-- Result, of type ???
+dsCCall :: CLabelString -- C routine to invoke
+        -> [CoreExpr]   -- Arguments (desugared)
+        -> Safety       -- Safety of the call
+        -> Type         -- Type of the result: IO t
+        -> DsM CoreExpr -- Result, of type ???
 
 dsCCall lbl args may_gc result_ty
   = do (unboxed_args, arg_wrappers) <- mapAndUnzipM unboxArg args
@@ -106,35 +100,35 @@ dsCCall lbl args may_gc result_ty
        return (foldr ($) (res_wrapper the_prim_app) arg_wrappers)
 
 mkFCall :: DynFlags -> Unique -> ForeignCall 
-	-> [CoreExpr] 	-- Args
-	-> Type 	-- Result type
-	-> CoreExpr
+        -> [CoreExpr]   -- Args
+        -> Type         -- Result type
+        -> CoreExpr
 -- Construct the ccall.  The only tricky bit is that the ccall Id should have
 -- no free vars, so if any of the arg tys do we must give it a polymorphic type.
--- 	[I forget *why* it should have no free vars!]
+--      [I forget *why* it should have no free vars!]
 -- For example:
---	mkCCall ... [s::StablePtr (a->b), x::Addr, c::Char]
+--      mkCCall ... [s::StablePtr (a->b), x::Addr, c::Char]
 --
 -- Here we build a ccall thus
---	(ccallid::(forall a b.  StablePtr (a -> b) -> Addr -> Char -> IO Addr))
---			a b s x c
+--      (ccallid::(forall a b.  StablePtr (a -> b) -> Addr -> Char -> IO Addr))
+--                      a b s x c
 mkFCall dflags uniq the_fcall val_args res_ty
   = mkApps (mkVarApps (Var the_fcall_id) tyvars) val_args
   where
     arg_tys = map exprType val_args
     body_ty = (mkFunTys arg_tys res_ty)
     tyvars  = varSetElems (tyVarsOfType body_ty)
-    ty 	    = mkForAllTys tyvars body_ty
+    ty      = mkForAllTys tyvars body_ty
     the_fcall_id = mkFCallId dflags uniq the_fcall ty
 \end{code}
 
 \begin{code}
-unboxArg :: CoreExpr			-- The supplied argument
-	 -> DsM (CoreExpr,		-- To pass as the actual argument
-		 CoreExpr -> CoreExpr	-- Wrapper to unbox the arg
-		)
+unboxArg :: CoreExpr                    -- The supplied argument
+         -> DsM (CoreExpr,              -- To pass as the actual argument
+                 CoreExpr -> CoreExpr   -- Wrapper to unbox the arg
+                )
 -- Example: if the arg is e::Int, unboxArg will return
---	(x#::Int#, \W. case x of I# x# -> W)
+--      (x#::Int#, \W. case x of I# x# -> W)
 -- where W is a CoreExpr that probably mentions x#
 
 unboxArg arg
@@ -173,8 +167,8 @@ unboxArg arg
 
   -- Byte-arrays, both mutable and otherwise; hack warning
   -- We're looking for values of type ByteArray, MutableByteArray
-  --	data ByteArray          ix = ByteArray        ix ix ByteArray#
-  --	data MutableByteArray s ix = MutableByteArray ix ix (MutableByteArray# s)
+  --    data ByteArray          ix = ByteArray        ix ix ByteArray#
+  --    data MutableByteArray s ix = MutableByteArray ix ix (MutableByteArray# s)
   | is_product_type &&
     data_con_arity == 3 &&
     maybeToBool maybe_arg3_tycon &&
@@ -190,73 +184,73 @@ unboxArg arg
   = do l <- getSrcSpanDs
        pprPanic "unboxArg: " (ppr l <+> ppr arg_ty)
   where
-    arg_ty					= exprType arg
-    maybe_product_type 			   	= splitDataProductType_maybe arg_ty
-    is_product_type			   	= maybeToBool maybe_product_type
-    Just (_, _, data_con, data_con_arg_tys)	= maybe_product_type
-    data_con_arity				= dataConSourceArity data_con
-    (data_con_arg_ty1 : _)			= data_con_arg_tys
+    arg_ty                                      = exprType arg
+    maybe_product_type                          = splitDataProductType_maybe arg_ty
+    is_product_type                             = maybeToBool maybe_product_type
+    Just (_, _, data_con, data_con_arg_tys)     = maybe_product_type
+    data_con_arity                              = dataConSourceArity data_con
+    (data_con_arg_ty1 : _)                      = data_con_arg_tys
 
     (_ : _ : data_con_arg_ty3 : _) = data_con_arg_tys
-    maybe_arg3_tycon    	   = tyConAppTyCon_maybe data_con_arg_ty3
-    Just arg3_tycon		   = maybe_arg3_tycon
+    maybe_arg3_tycon               = tyConAppTyCon_maybe data_con_arg_ty3
+    Just arg3_tycon                = maybe_arg3_tycon
 \end{code}
 
 
 \begin{code}
 boxResult :: Type
-	  -> DsM (Type, CoreExpr -> CoreExpr)
+          -> DsM (Type, CoreExpr -> CoreExpr)
 
 -- Takes the result of the user-level ccall: 
---	either (IO t), 
---	or maybe just t for an side-effect-free call
+--      either (IO t), 
+--      or maybe just t for an side-effect-free call
 -- Returns a wrapper for the primitive ccall itself, along with the
 -- type of the result of the primitive ccall.  This result type
 -- will be of the form  
---	State# RealWorld -> (# State# RealWorld, t' #)
+--      State# RealWorld -> (# State# RealWorld, t' #)
 -- where t' is the unwrapped form of t.  If t is simply (), then
 -- the result type will be 
---	State# RealWorld -> (# State# RealWorld #)
+--      State# RealWorld -> (# State# RealWorld #)
 
 boxResult result_ty
   | Just (io_tycon, io_res_ty) <- tcSplitIOType_maybe result_ty
-	-- isIOType_maybe handles the case where the type is a 
-	-- simple wrapping of IO.  E.g.
-	-- 	newtype Wrap a = W (IO a)
-	-- No coercion necessary because its a non-recursive newtype
-	-- (If we wanted to handle a *recursive* newtype too, we'd need
-	-- another case, and a coercion.)
-   	-- The result is IO t, so wrap the result in an IO constructor
-  = do	{ res <- resultWrapper io_res_ty
-	; let extra_result_tys 
-		= case res of
-		     (Just ty,_) 
-		       | isUnboxedTupleType ty 
-		       -> let Just ls = tyConAppArgs_maybe ty in tail ls
-		     _ -> []
-
-	      return_result state anss
-		= mkConApp (tupleCon UnboxedTuple (2 + length extra_result_tys))
-	         	   (map Type (realWorldStatePrimTy : io_res_ty : extra_result_tys)
-			      ++ (state : anss)) 
-
-	; (ccall_res_ty, the_alt) <- mk_alt return_result res
-
-	; state_id <- newSysLocalDs realWorldStatePrimTy
-	; let io_data_con = head (tyConDataCons io_tycon)
-	      toIOCon     = dataConWrapId io_data_con
-
-	      wrap the_call =
-			      mkApps (Var toIOCon)
-			    	     [ Type io_res_ty, 
-			    	       Lam state_id $
-			    	       mkWildCase (App the_call (Var state_id))
-			    	     	     ccall_res_ty
-			                     (coreAltType the_alt) 
-			    	     	     [the_alt]
-			    	     ]
-
-	; return (realWorldStatePrimTy `mkFunTy` ccall_res_ty, wrap) }
+        -- isIOType_maybe handles the case where the type is a 
+        -- simple wrapping of IO.  E.g.
+        --      newtype Wrap a = W (IO a)
+        -- No coercion necessary because its a non-recursive newtype
+        -- (If we wanted to handle a *recursive* newtype too, we'd need
+        -- another case, and a coercion.)
+        -- The result is IO t, so wrap the result in an IO constructor
+  = do  { res <- resultWrapper io_res_ty
+        ; let extra_result_tys 
+                = case res of
+                     (Just ty,_) 
+                       | isUnboxedTupleType ty 
+                       -> let Just ls = tyConAppArgs_maybe ty in tail ls
+                     _ -> []
+
+              return_result state anss
+                = mkConApp (tupleCon UnboxedTuple (2 + length extra_result_tys))
+                           (map Type (realWorldStatePrimTy : io_res_ty : extra_result_tys)
+                              ++ (state : anss)) 
+
+        ; (ccall_res_ty, the_alt) <- mk_alt return_result res
+
+        ; state_id <- newSysLocalDs realWorldStatePrimTy
+        ; let io_data_con = head (tyConDataCons io_tycon)
+              toIOCon     = dataConWrapId io_data_con
+
+              wrap the_call =
+                              mkApps (Var toIOCon)
+                                     [ Type io_res_ty, 
+                                       Lam state_id $
+                                       mkWildCase (App the_call (Var state_id))
+                                             ccall_res_ty
+                                             (coreAltType the_alt) 
+                                             [the_alt]
+                                     ]
+
+        ; return (realWorldStatePrimTy `mkFunTy` ccall_res_ty, wrap) }
 
 boxResult result_ty
   = do -- It isn't IO, so do unsafePerformIO
@@ -265,9 +259,9 @@ boxResult result_ty
        (ccall_res_ty, the_alt) <- mk_alt return_result res
        let
            wrap = \ the_call -> mkWildCase (App the_call (Var realWorldPrimId)) 
-                                     	   ccall_res_ty
-                                     	   (coreAltType the_alt)
-                                     	   [the_alt]
+                                           ccall_res_ty
+                                           (coreAltType the_alt)
+                                           [the_alt]
        return (realWorldStatePrimTy `mkFunTy` ccall_res_ty, wrap)
   where
     return_result _ [ans] = ans
@@ -290,7 +284,7 @@ mk_alt return_result (Nothing, wrap_result)
        return (ccall_res_ty, the_alt)
 
 mk_alt return_result (Just prim_res_ty, wrap_result)
-    		-- The ccall returns a non-() value
+                -- The ccall returns a non-() value
   | isUnboxedTupleType prim_res_ty= do
     let
         Just ls = tyConAppArgs_maybe prim_res_ty
@@ -383,11 +377,11 @@ maybeNarrow dflags tycon
   | tycon `hasKey` int8TyConKey   = \e -> App (Var (mkPrimOpId Narrow8IntOp)) e
   | tycon `hasKey` int16TyConKey  = \e -> App (Var (mkPrimOpId Narrow16IntOp)) e
   | tycon `hasKey` int32TyConKey
-	 && wORD_SIZE dflags > 4         = \e -> App (Var (mkPrimOpId Narrow32IntOp)) e
+         && wORD_SIZE dflags > 4         = \e -> App (Var (mkPrimOpId Narrow32IntOp)) e
 
   | tycon `hasKey` word8TyConKey  = \e -> App (Var (mkPrimOpId Narrow8WordOp)) e
   | tycon `hasKey` word16TyConKey = \e -> App (Var (mkPrimOpId Narrow16WordOp)) e
   | tycon `hasKey` word32TyConKey
-	 && wORD_SIZE dflags > 4         = \e -> App (Var (mkPrimOpId Narrow32WordOp)) e
-  | otherwise			  = id
+         && wORD_SIZE dflags > 4         = \e -> App (Var (mkPrimOpId Narrow32WordOp)) e
+  | otherwise                     = id
 \end{code}
diff --git a/compiler/deSugar/DsUtils.lhs b/compiler/deSugar/DsUtils.lhs
index 420cc0f..feaeaee 100644
--- a/compiler/deSugar/DsUtils.lhs
+++ b/compiler/deSugar/DsUtils.lhs
@@ -8,28 +8,22 @@ Utilities for desugaring
 This module exports some utility functions of no great interest.
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Utility functions for constructing Core syntax, principally for desugaring
 module DsUtils (
-	EquationInfo(..), 
-	firstPat, shiftEqns,
+        EquationInfo(..), 
+        firstPat, shiftEqns,
 
-	MatchResult(..), CanItFail(..), 
-	cantFailMatchResult, alwaysFailMatchResult,
-	extractMatchResult, combineMatchResults, 
-	adjustMatchResult,  adjustMatchResultDs,
-	mkCoLetMatchResult, mkViewMatchResult, mkGuardedMatchResult, 
-	matchCanFail, mkEvalMatchResult,
-	mkCoPrimCaseMatchResult, mkCoAlgCaseMatchResult,
-	wrapBind, wrapBinds,
+        MatchResult(..), CanItFail(..), 
+        cantFailMatchResult, alwaysFailMatchResult,
+        extractMatchResult, combineMatchResults, 
+        adjustMatchResult,  adjustMatchResultDs,
+        mkCoLetMatchResult, mkViewMatchResult, mkGuardedMatchResult, 
+        matchCanFail, mkEvalMatchResult,
+        mkCoPrimCaseMatchResult, mkCoAlgCaseMatchResult,
+        wrapBind, wrapBinds,
 
-	mkErrorAppDs, mkCoreAppDs, mkCoreAppsDs,
+        mkErrorAppDs, mkCoreAppDs, mkCoreAppsDs,
 
         seqVar,
 
@@ -39,13 +33,13 @@ module DsUtils (
 
         mkSelectorBinds,
 
-	selectSimpleMatchVarL, selectMatchVars, selectMatchVar,
+        selectSimpleMatchVarL, selectMatchVars, selectMatchVar,
         mkOptTickBox, mkBinaryTickBox
     ) where
 
 #include "HsVersions.h"
 
-import {-# SOURCE #-}	Match ( matchSimply )
+import {-# SOURCE #-}   Match ( matchSimply )
 
 import HsSyn
 import TcHsSyn
@@ -80,9 +74,9 @@ import Control.Monad    ( zipWithM )
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{ Selecting match variables}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 We're about to match against some patterns.  We want to make some
@@ -100,13 +94,13 @@ selectSimpleMatchVarL pat = selectMatchVar (unLoc pat)
 --
 -- OLD, but interesting note:
 --    But even if it is a variable, its type might not match.  Consider
---	data T a where
---	  T1 :: Int -> T Int
---	  T2 :: a   -> T a
+--      data T a where
+--        T1 :: Int -> T Int
+--        T2 :: a   -> T a
 --
---	f :: T a -> a -> Int
---	f (T1 i) (x::Int) = x
---	f (T2 i) (y::a)   = 0
+--      f :: T a -> a -> Int
+--      f (T1 i) (x::Int) = x
+--      f (T2 i) (y::a)   = 0
 --    Then we must not choose (x::Int) as the matching variable!
 -- And nowadays we won't, because the (x::Int) will be wrapped in a CoPat
 
@@ -120,7 +114,7 @@ selectMatchVar (ParPat pat)  = selectMatchVar (unLoc pat)
 selectMatchVar (VarPat var)  = return (localiseId var)  -- Note [Localise pattern binders]
 selectMatchVar (AsPat var _) = return (unLoc var)
 selectMatchVar other_pat     = newSysLocalDs (hsPatType other_pat)
-				  -- OK, better make up one...
+                                  -- OK, better make up one...
 \end{code}
 
 Note [Localise pattern binders]
@@ -162,9 +156,9 @@ the desugaring pass.
 
 
 %************************************************************************
-%*									*
-%* type synonym EquationInfo and access functions for its pieces	*
-%*									*
+%*                                                                      *
+%* type synonym EquationInfo and access functions for its pieces        *
+%*                                                                      *
 %************************************************************************
 \subsection[EquationInfo-synonym]{@EquationInfo@: a useful synonym}
 
@@ -229,13 +223,13 @@ wrapBinds [] e = e
 wrapBinds ((new,old):prs) e = wrapBind new old (wrapBinds prs e)
 
 wrapBind :: Var -> Var -> CoreExpr -> CoreExpr
-wrapBind new old body	-- NB: this function must deal with term
-  | new==old    = body	-- variables, type variables or coercion variables
+wrapBind new old body   -- NB: this function must deal with term
+  | new==old    = body  -- variables, type variables or coercion variables
   | otherwise   = Let (NonRec new (varToCoreExpr old)) body
 
 seqVar :: Var -> CoreExpr -> CoreExpr
 seqVar var body = Case (Var var) var (exprType body)
-			[(DEFAULT, [], body)]
+                        [(DEFAULT, [], body)]
 
 mkCoLetMatchResult :: CoreBind -> MatchResult -> MatchResult
 mkCoLetMatchResult bind = adjustMatchResult (mkCoreLet bind)
@@ -255,10 +249,10 @@ mkGuardedMatchResult pred_expr (MatchResult _ body_fn)
   = MatchResult CanFail (\fail -> do body <- body_fn fail
                                      return (mkIfThenElse pred_expr body fail))
 
-mkCoPrimCaseMatchResult :: Id				-- Scrutinee
+mkCoPrimCaseMatchResult :: Id                           -- Scrutinee
                     -> Type                             -- Type of the case
-		    -> [(Literal, MatchResult)]		-- Alternatives
-		    -> MatchResult			-- Literals are all unlifted
+                    -> [(Literal, MatchResult)]         -- Alternatives
+                    -> MatchResult                      -- Literals are all unlifted
 mkCoPrimCaseMatchResult var ty match_alts
   = MatchResult CanFail mk_case
   where
@@ -266,7 +260,7 @@ mkCoPrimCaseMatchResult var ty match_alts
         alts <- mapM (mk_alt fail) sorted_alts
         return (Case (Var var) var ty ((DEFAULT, [], fail) : alts))
 
-    sorted_alts = sortWith fst match_alts	-- Right order for a Case
+    sorted_alts = sortWith fst match_alts       -- Right order for a Case
     mk_alt fail (lit, MatchResult _ body_fn)
        = ASSERT( not (litIsLifted lit) )
          do body <- body_fn fail
@@ -275,41 +269,41 @@ mkCoPrimCaseMatchResult var ty match_alts
 
 mkCoAlgCaseMatchResult 
   :: DynFlags
-  -> Id					   -- Scrutinee
+  -> Id                                    -- Scrutinee
   -> Type                                  -- Type of exp
   -> [(DataCon, [CoreBndr], MatchResult)]  -- Alternatives (bndrs *include* tyvars, dicts)
   -> MatchResult
 mkCoAlgCaseMatchResult dflags var ty match_alts 
-  | isNewTyCon tycon		-- Newtype case; use a let
+  | isNewTyCon tycon            -- Newtype case; use a let
   = ASSERT( null (tail match_alts) && null (tail arg_ids1) )
     mkCoLetMatchResult (NonRec arg_id1 newtype_rhs) match_result1
 
-  | isPArrFakeAlts match_alts	-- Sugared parallel array; use a literal case 
+  | isPArrFakeAlts match_alts   -- Sugared parallel array; use a literal case 
   = MatchResult CanFail mk_parrCase
 
-  | otherwise			-- Datatype case; use a case
+  | otherwise                   -- Datatype case; use a case
   = MatchResult fail_flag mk_case
   where
     tycon = dataConTyCon con1
-	-- [Interesting: because of GADTs, we can't rely on the type of 
-	--  the scrutinised Id to be sufficiently refined to have a TyCon in it]
+        -- [Interesting: because of GADTs, we can't rely on the type of 
+        --  the scrutinised Id to be sufficiently refined to have a TyCon in it]
 
-	-- Stuff for newtype
+        -- Stuff for newtype
     (con1, arg_ids1, match_result1) = ASSERT( notNull match_alts ) head match_alts
-    arg_id1 	= ASSERT( notNull arg_ids1 ) head arg_ids1
+    arg_id1     = ASSERT( notNull arg_ids1 ) head arg_ids1
     var_ty      = idType var
-    (tc, ty_args) = tcSplitTyConApp var_ty	-- Don't look through newtypes
-    	 	    		    		-- (not that splitTyConApp does, these days)
+    (tc, ty_args) = tcSplitTyConApp var_ty      -- Don't look through newtypes
+                                                -- (not that splitTyConApp does, these days)
     newtype_rhs = unwrapNewTypeBody tc ty_args (Var var)
-		
-	-- Stuff for data types
+                
+        -- Stuff for data types
     data_cons      = tyConDataCons tycon
     match_results  = [match_result | (_,_,match_result) <- match_alts]
 
     fail_flag | exhaustive_case
-	      = foldr orFail CantFail [can_it_fail | MatchResult can_it_fail _ <- match_results]
-	      | otherwise
-	      = CanFail
+              = foldr orFail CantFail [can_it_fail | MatchResult can_it_fail _ <- match_results]
+              | otherwise
+              = CanFail
 
     sorted_alts  = sortWith get_tag match_alts
     get_tag (con, _, _) = dataConTag con
@@ -326,34 +320,34 @@ mkCoAlgCaseMatchResult dflags var ty match_alts
            ; return (DataAlt con, rep_ids, mkLets binds body) } } }
 
     mk_default fail | exhaustive_case = []
-		    | otherwise       = [(DEFAULT, [], fail)]
+                    | otherwise       = [(DEFAULT, [], fail)]
 
     un_mentioned_constructors
         = mkUniqSet data_cons `minusUniqSet` mkUniqSet [ con | (con, _, _) <- match_alts]
     exhaustive_case = isEmptyUniqSet un_mentioned_constructors
 
-	-- Stuff for parallel arrays
-	-- 
-	--  * the following is to desugar cases over fake constructors for
-	--   parallel arrays, which are introduced by `tidy1' in the `PArrPat'
-	--   case
-	--
-	-- Concerning `isPArrFakeAlts':
-	--
-	--  * it is *not* sufficient to just check the type of the type
-	--   constructor, as we have to be careful not to confuse the real
-	--   representation of parallel arrays with the fake constructors;
-	--   moreover, a list of alternatives must not mix fake and real
-	--   constructors (this is checked earlier on)
-	--
-	-- FIXME: We actually go through the whole list and make sure that
-	--	  either all or none of the constructors are fake parallel
-	--	  array constructors.  This is to spot equations that mix fake
-	--	  constructors with the real representation defined in
-	--	  `PrelPArr'.  It would be nicer to spot this situation
-	--	  earlier and raise a proper error message, but it can really
-	--	  only happen in `PrelPArr' anyway.
-	--
+        -- Stuff for parallel arrays
+        -- 
+        --  * the following is to desugar cases over fake constructors for
+        --   parallel arrays, which are introduced by `tidy1' in the `PArrPat'
+        --   case
+        --
+        -- Concerning `isPArrFakeAlts':
+        --
+        --  * it is *not* sufficient to just check the type of the type
+        --   constructor, as we have to be careful not to confuse the real
+        --   representation of parallel arrays with the fake constructors;
+        --   moreover, a list of alternatives must not mix fake and real
+        --   constructors (this is checked earlier on)
+        --
+        -- FIXME: We actually go through the whole list and make sure that
+        --        either all or none of the constructors are fake parallel
+        --        array constructors.  This is to spot equations that mix fake
+        --        constructors with the real representation defined in
+        --        `PrelPArr'.  It would be nicer to spot this situation
+        --        earlier and raise a proper error message, but it can really
+        --        only happen in `PrelPArr' anyway.
+        --
     isPArrFakeAlts [(dcon, _, _)]      = isPArrFakeCon dcon
     isPArrFakeAlts ((dcon, _, _):alts) = 
       case (isPArrFakeCon dcon, isPArrFakeAlts alts) of
@@ -367,47 +361,47 @@ mkCoAlgCaseMatchResult dflags var ty match_alts
       alt <- unboxAlt
       return (mkWildCase (len lengthP) intTy ty [alt])
       where
-	elemTy      = case splitTyConApp (idType var) of
-		        (_, [elemTy]) -> elemTy
-		        _	        -> panic panicMsg
+        elemTy      = case splitTyConApp (idType var) of
+                        (_, [elemTy]) -> elemTy
+                        _               -> panic panicMsg
         panicMsg    = "DsUtils.mkCoAlgCaseMatchResult: not a parallel array?"
-	len lengthP = mkApps (Var lengthP) [Type elemTy, Var var]
-	--
-	unboxAlt = do
-	  l      <- newSysLocalDs intPrimTy
-	  indexP <- dsDPHBuiltin indexPVar
-	  alts   <- mapM (mkAlt indexP) sorted_alts
-	  return (DataAlt intDataCon, [l], mkWildCase (Var l) intPrimTy ty (dft : alts))
+        len lengthP = mkApps (Var lengthP) [Type elemTy, Var var]
+        --
+        unboxAlt = do
+          l      <- newSysLocalDs intPrimTy
+          indexP <- dsDPHBuiltin indexPVar
+          alts   <- mapM (mkAlt indexP) sorted_alts
+          return (DataAlt intDataCon, [l], mkWildCase (Var l) intPrimTy ty (dft : alts))
+          where
+            dft  = (DEFAULT, [], fail)
+        --
+        -- each alternative matches one array length (corresponding to one
+        -- fake array constructor), so the match is on a literal; each
+        -- alternative's body is extended by a local binding for each
+        -- constructor argument, which are bound to array elements starting
+        -- with the first
+        --
+        mkAlt indexP (con, args, MatchResult _ bodyFun) = do
+          body <- bodyFun fail
+          return (LitAlt lit, [], mkCoreLets binds body)
           where
-	    dft  = (DEFAULT, [], fail)
-	--
-	-- each alternative matches one array length (corresponding to one
-	-- fake array constructor), so the match is on a literal; each
-	-- alternative's body is extended by a local binding for each
-	-- constructor argument, which are bound to array elements starting
-	-- with the first
-	--
-	mkAlt indexP (con, args, MatchResult _ bodyFun) = do
-	  body <- bodyFun fail
-	  return (LitAlt lit, [], mkCoreLets binds body)
-	  where
-	    lit   = MachInt $ toInteger (dataConSourceArity con)
-	    binds = [NonRec arg (indexExpr i) | (i, arg) <- zip [1..] args]
-	    --
-	    indexExpr i = mkApps (Var indexP) [Type elemTy, Var var, mkIntExpr dflags i]
+            lit   = MachInt $ toInteger (dataConSourceArity con)
+            binds = [NonRec arg (indexExpr i) | (i, arg) <- zip [1..] args]
+            --
+            indexExpr i = mkApps (Var indexP) [Type elemTy, Var var, mkIntExpr dflags i]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Desugarer's versions of some Core functions}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-mkErrorAppDs :: Id 		-- The error function
-	     -> Type		-- Type to which it should be applied
-	     -> SDoc		-- The error message string to pass
-	     -> DsM CoreExpr
+mkErrorAppDs :: Id              -- The error function
+             -> Type            -- Type to which it should be applied
+             -> SDoc            -- The error message string to pass
+             -> DsM CoreExpr
 
 mkErrorAppDs err_id ty msg = do
     src_loc <- getSrcSpanDs
@@ -495,7 +489,7 @@ mkCoreAppDs (Var f `App` Type ty1 `App` Type ty2 `App` arg1) arg2
                    Var v1 | isLocalId v1 -> v1        -- Note [Desugaring seq (2) and (3)]
                    _                     -> mkWildValBinder ty1
 
-mkCoreAppDs fun arg = mkCoreApp fun arg	 -- The rest is done in MkCore
+mkCoreAppDs fun arg = mkCoreApp fun arg  -- The rest is done in MkCore
 
 mkCoreAppsDs :: CoreExpr -> [CoreExpr] -> CoreExpr
 mkCoreAppsDs fun args = foldl mkCoreAppDs fun args
@@ -503,9 +497,9 @@ mkCoreAppsDs fun args = foldl mkCoreAppDs fun args
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[mkSelectorBind]{Make a selector bind}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 This is used in various places to do with lazy patterns.
@@ -553,8 +547,8 @@ cases like
 \begin{code}
 mkSelectorBinds :: [Maybe (Tickish Id)]  -- ticks to add, possibly
                 -> LPat Id      -- The pattern
-		-> CoreExpr	-- Expression to which the pattern is bound
-		-> DsM [(Id,CoreExpr)]
+                -> CoreExpr     -- Expression to which the pattern is bound
+                -> DsM [(Id,CoreExpr)]
 
 mkSelectorBinds ticks (L _ (VarPat v)) val_expr
   = return [(v, case ticks of
@@ -644,7 +638,7 @@ mkLHsPatTup :: [LPat Id] -> LPat Id
 mkLHsPatTup []     = noLoc $ mkVanillaTuplePat [] Boxed
 mkLHsPatTup [lpat] = lpat
 mkLHsPatTup lpats  = L (getLoc (head lpats)) $ 
-		     mkVanillaTuplePat lpats Boxed
+                     mkVanillaTuplePat lpats Boxed
 
 mkLHsVarPatTup :: [Id] -> LPat Id
 mkLHsVarPatTup bs  = mkLHsPatTup (map nlVarPat bs)
@@ -670,21 +664,21 @@ mkBigLHsPatTup = mkChunkified mkLHsPatTup
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[mkFailurePair]{Code for pattern-matching and other failures}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Generally, we handle pattern matching failure like this: let-bind a
 fail-variable, and use that variable if the thing fails:
 \begin{verbatim}
-	let fail.33 = error "Help"
-	in
-	case x of
-		p1 -> ...
-		p2 -> fail.33
-		p3 -> fail.33
-		p4 -> ...
+        let fail.33 = error "Help"
+        in
+        case x of
+                p1 -> ...
+                p2 -> fail.33
+                p3 -> fail.33
+                p4 -> ...
 \end{verbatim}
 Then
 \begin{itemize}
@@ -703,31 +697,31 @@ There's a problem when the result of the case expression is of
 unboxed type.  Then the type of @fail.33@ is unboxed too, and
 there is every chance that someone will change the let into a case:
 \begin{verbatim}
-	case error "Help" of
-	  fail.33 -> case ....
+        case error "Help" of
+          fail.33 -> case ....
 \end{verbatim}
 
 which is of course utterly wrong.  Rather than drop the condition that
 only boxed types can be let-bound, we just turn the fail into a function
 for the primitive case:
 \begin{verbatim}
-	let fail.33 :: Void -> Int#
-	    fail.33 = \_ -> error "Help"
-	in
-	case x of
-		p1 -> ...
-		p2 -> fail.33 void
-		p3 -> fail.33 void
-		p4 -> ...
+        let fail.33 :: Void -> Int#
+            fail.33 = \_ -> error "Help"
+        in
+        case x of
+                p1 -> ...
+                p2 -> fail.33 void
+                p3 -> fail.33 void
+                p4 -> ...
 \end{verbatim}
 
 Now @fail.33@ is a function, so it can be let-bound.
 
 \begin{code}
-mkFailurePair :: CoreExpr	-- Result type of the whole case expression
-	      -> DsM (CoreBind,	-- Binds the newly-created fail variable
-				-- to \ _ -> expression
-		      CoreExpr)	-- Fail variable applied to realWorld#
+mkFailurePair :: CoreExpr       -- Result type of the whole case expression
+              -> DsM (CoreBind, -- Binds the newly-created fail variable
+                                -- to \ _ -> expression
+                      CoreExpr) -- Fail variable applied to realWorld#
 -- See Note [Failure thunks and CPR]
 mkFailurePair expr
   = do { fail_fun_var <- newFailLocalDs (realWorldStatePrimTy `mkFunTy` ty)
@@ -763,7 +757,7 @@ mkOptTickBox (Just tickish) e = Tick tickish e
 
 mkBinaryTickBox :: Int -> Int -> CoreExpr -> DsM CoreExpr
 mkBinaryTickBox ixT ixF e = do
-       uq <- newUnique 	
+       uq <- newUnique  
        this_mod <- getModule
        let bndr1 = mkSysLocal (fsLit "t1") uq boolTy
        let
diff --git a/compiler/deSugar/MatchCon.lhs b/compiler/deSugar/MatchCon.lhs
index f2bff1e..8f1333b 100644
--- a/compiler/deSugar/MatchCon.lhs
+++ b/compiler/deSugar/MatchCon.lhs
@@ -6,18 +6,12 @@
 Pattern-matching constructors
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module MatchCon ( matchConFamily ) where
 
 #include "HsVersions.h"
 
-import {-# SOURCE #-} Match	( match )
+import {-# SOURCE #-} Match     ( match )
 
 import HsSyn
 import DsBinds
@@ -89,8 +83,8 @@ have-we-used-all-the-constructors? question; the local function
 \begin{code}
 matchConFamily :: [Id]
                -> Type
-	       -> [[EquationInfo]]
-	       -> DsM MatchResult
+               -> [[EquationInfo]]
+               -> DsM MatchResult
 -- Each group of eqns is for a single constructor
 matchConFamily (var:vars) ty groups
   = do dflags <- getDynFlags
@@ -104,45 +98,45 @@ matchOneCon :: [Id]
             -> Type
             -> [EquationInfo]
             -> DsM (DataCon, [Var], MatchResult)
-matchOneCon vars ty (eqn1 : eqns)	-- All eqns for a single constructor
-  = do	{ arg_vars <- selectConMatchVars arg_tys args1
-	 	-- Use the first equation as a source of 
-		-- suggestions for the new variables
+matchOneCon vars ty (eqn1 : eqns)       -- All eqns for a single constructor
+  = do  { arg_vars <- selectConMatchVars arg_tys args1
+                -- Use the first equation as a source of 
+                -- suggestions for the new variables
 
-	-- Divide into sub-groups; see Note [Record patterns]
+        -- Divide into sub-groups; see Note [Record patterns]
         ; let groups :: [[(ConArgPats, EquationInfo)]]
-	      groups = runs compatible_pats [ (pat_args (firstPat eqn), eqn) 
-	      	       	    	            | eqn <- eqn1:eqns ]
+              groups = runs compatible_pats [ (pat_args (firstPat eqn), eqn) 
+                                            | eqn <- eqn1:eqns ]
 
-	; match_results <- mapM (match_group arg_vars) groups
+        ; match_results <- mapM (match_group arg_vars) groups
 
-      	; return (con1, tvs1 ++ dicts1 ++ arg_vars, 
-		  foldr1 combineMatchResults match_results) }
+        ; return (con1, tvs1 ++ dicts1 ++ arg_vars, 
+                  foldr1 combineMatchResults match_results) }
   where
     ConPatOut { pat_con = L _ con1, pat_ty = pat_ty1,
-	        pat_tvs = tvs1, pat_dicts = dicts1, pat_args = args1 }
-	      = firstPat eqn1
+                pat_tvs = tvs1, pat_dicts = dicts1, pat_args = args1 }
+              = firstPat eqn1
     fields1 = dataConFieldLabels con1
-	
+        
     arg_tys  = dataConInstOrigArgTys con1 inst_tys
     inst_tys = tcTyConAppArgs pat_ty1 ++ 
-	       mkTyVarTys (takeList (dataConExTyVars con1) tvs1)
-	-- Newtypes opaque, hence tcTyConAppArgs
-	-- dataConInstOrigArgTys takes the univ and existential tyvars
-	-- and returns the types of the *value* args, which is what we want
+               mkTyVarTys (takeList (dataConExTyVars con1) tvs1)
+        -- Newtypes opaque, hence tcTyConAppArgs
+        -- dataConInstOrigArgTys takes the univ and existential tyvars
+        -- and returns the types of the *value* args, which is what we want
 
     match_group :: [Id] -> [(ConArgPats, EquationInfo)] -> DsM MatchResult
     -- All members of the group have compatible ConArgPats
     match_group arg_vars arg_eqn_prs
       = ASSERT( notNull arg_eqn_prs )
         do { (wraps, eqns') <- liftM unzip (mapM shift arg_eqn_prs)
-    	   ; let group_arg_vars = select_arg_vars arg_vars arg_eqn_prs
-    	   ; match_result <- match (group_arg_vars ++ vars) ty eqns'
-    	   ; return (adjustMatchResult (foldr1 (.) wraps) match_result) }
+           ; let group_arg_vars = select_arg_vars arg_vars arg_eqn_prs
+           ; match_result <- match (group_arg_vars ++ vars) ty eqns'
+           ; return (adjustMatchResult (foldr1 (.) wraps) match_result) }
 
     shift (_, eqn@(EqnInfo { eqn_pats = ConPatOut{ pat_tvs = tvs, pat_dicts = ds, 
-					           pat_binds = bind, pat_args = args
-					} : pats }))
+                                                   pat_binds = bind, pat_args = args
+                                        } : pats }))
       = do ds_bind <- dsTcEvBinds bind
            return ( wrapBinds (tvs `zip` tvs1)
                   . wrapBinds (ds  `zip` dicts1)
@@ -164,8 +158,8 @@ matchOneCon vars ty (eqn1 : eqns)	-- All eqns for a single constructor
       = arg_vars
       where
         fld_var_env = mkNameEnv $ zipEqual "get_arg_vars" fields1 arg_vars
-	lookup_fld rpat = lookupNameEnv_NF fld_var_env 
-		   	  		   (idName (unLoc (hsRecFieldId rpat)))
+        lookup_fld rpat = lookupNameEnv_NF fld_var_env 
+                                           (idName (unLoc (hsRecFieldId rpat)))
     select_arg_vars _ [] = panic "matchOneCon/select_arg_vars []"
 matchOneCon _ _ [] = panic "matchOneCon []"
 
@@ -181,7 +175,7 @@ compatible_pats _                 _                 = True -- Prefix or infix co
 same_fields :: HsRecFields Id (LPat Id) -> HsRecFields Id (LPat Id) -> Bool
 same_fields flds1 flds2 
   = all2 (\f1 f2 -> unLoc (hsRecFieldId f1) == unLoc (hsRecFieldId f2))
-	 (rec_flds flds1) (rec_flds flds2)
+         (rec_flds flds1) (rec_flds flds2)
 
 
 -----------------
@@ -190,26 +184,26 @@ selectConMatchVars arg_tys (RecCon {})      = newSysLocalsDs arg_tys
 selectConMatchVars _       (PrefixCon ps)   = selectMatchVars (map unLoc ps)
 selectConMatchVars _       (InfixCon p1 p2) = selectMatchVars [unLoc p1, unLoc p2]
 
-conArgPats :: [Type]	-- Instantiated argument types 
-			-- Used only to fill in the types of WildPats, which
-			-- are probably never looked at anyway
-	   -> ConArgPats
-	   -> [Pat Id]
+conArgPats :: [Type]    -- Instantiated argument types 
+                        -- Used only to fill in the types of WildPats, which
+                        -- are probably never looked at anyway
+           -> ConArgPats
+           -> [Pat Id]
 conArgPats _arg_tys (PrefixCon ps)   = map unLoc ps
 conArgPats _arg_tys (InfixCon p1 p2) = [unLoc p1, unLoc p2]
 conArgPats  arg_tys (RecCon (HsRecFields { rec_flds = rpats }))
   | null rpats = map WildPat arg_tys
-	-- Important special case for C {}, which can be used for a 
- 	-- datacon that isn't declared to have fields at all
+        -- Important special case for C {}, which can be used for a 
+        -- datacon that isn't declared to have fields at all
   | otherwise  = map (unLoc . hsRecFieldArg) rpats
 \end{code}
 
 Note [Record patterns]
 ~~~~~~~~~~~~~~~~~~~~~~
 Consider 
-	 data T = T { x,y,z :: Bool }
+         data T = T { x,y,z :: Bool }
 
-	 f (T { y=True, x=False }) = ...
+         f (T { y=True, x=False }) = ...
 
 We must match the patterns IN THE ORDER GIVEN, thus for the first
 one we match y=True before x=False.  See Trac #246; or imagine 
@@ -218,8 +212,8 @@ touching the undefined.
 
 Now consider:
 
-	 f (T { y=True, x=False }) = ...
-	 f (T { x=True, y= False}) = ...
+         f (T { y=True, x=False }) = ...
+         f (T { x=True, y= False}) = ...
 
 In the first we must test y first; in the second we must test x 
 first.  So we must divide even the equations for a single constructor
@@ -235,31 +229,31 @@ Hence the (null rpats) checks here and there.
 Note [Existentials in shift_con_pat]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
-	data T = forall a. Ord a => T a (a->Int)
+        data T = forall a. Ord a => T a (a->Int)
 
-	f (T x f) True  = ...expr1...
-	f (T y g) False = ...expr2..
+        f (T x f) True  = ...expr1...
+        f (T y g) False = ...expr2..
 
 When we put in the tyvars etc we get
 
-	f (T a (d::Ord a) (x::a) (f::a->Int)) True =  ...expr1...
-	f (T b (e::Ord b) (y::a) (g::a->Int)) True =  ...expr2...
+        f (T a (d::Ord a) (x::a) (f::a->Int)) True =  ...expr1...
+        f (T b (e::Ord b) (y::a) (g::a->Int)) True =  ...expr2...
 
 After desugaring etc we'll get a single case:
 
-	f = \t::T b::Bool -> 
-	    case t of
-	       T a (d::Ord a) (x::a) (f::a->Int)) ->
-	    case b of
-		True  -> ...expr1...
-		False -> ...expr2...
+        f = \t::T b::Bool -> 
+            case t of
+               T a (d::Ord a) (x::a) (f::a->Int)) ->
+            case b of
+                True  -> ...expr1...
+                False -> ...expr2...
 
 *** We have to substitute [a/b, d/e] in expr2! **
 Hence
-		False -> ....((/\b\(e:Ord b).expr2) a d)....
+                False -> ....((/\b\(e:Ord b).expr2) a d)....
 
 Originally I tried to use 
-	(\b -> let e = d in expr2) a 
+        (\b -> let e = d in expr2) a 
 to do this substitution.  While this is "correct" in a way, it fails
 Lint, because e::Ord b but d::Ord a.  
 
diff --git a/compiler/ghci/ByteCodeGen.lhs b/compiler/ghci/ByteCodeGen.lhs
index 25f6b66..ca6f440 100644
--- a/compiler/ghci/ByteCodeGen.lhs
+++ b/compiler/ghci/ByteCodeGen.lhs
@@ -5,12 +5,6 @@
 ByteCodeGen: Generate bytecode from Core
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module ByteCodeGen ( UnlinkedBCO, byteCodeGen, coreExprToBCOs ) where
 
@@ -842,8 +836,8 @@ doCase d s p (_,scrut) bndr alts is_unboxed_tuple
              MASSERT(isAlgCase)
              rhs_code <- schemeE (d_alts + size) s p' rhs
              return (my_discr alt, unitOL (UNPACK (trunc16 size)) `appOL` rhs_code)
-	   where
-	     real_bndrs = filterOut isTyVar bndrs
+           where
+             real_bndrs = filterOut isTyVar bndrs
 
         my_discr (DEFAULT, _, _) = NoDiscr {-shouldn't really happen-}
         my_discr (DataAlt dc, _, _)
@@ -1205,8 +1199,8 @@ pushAtom d p e
    | Just e' <- bcView e
    = pushAtom d p e'
 
-pushAtom _ _ (AnnCoercion {})	-- Coercions are zero-width things, 
-   = return (nilOL, 0)	  	-- treated just like a variable V
+pushAtom _ _ (AnnCoercion {})   -- Coercions are zero-width things, 
+   = return (nilOL, 0)          -- treated just like a variable V
 
 pushAtom d p (AnnVar v)
    | UnaryRep rep_ty <- repType (idType v)
@@ -1516,12 +1510,12 @@ isVAtom :: AnnExpr' Var ann -> Bool
 isVAtom e | Just e' <- bcView e = isVAtom e'
 isVAtom (AnnVar v)              = isVoidArg (bcIdArgRep v)
 isVAtom (AnnCoercion {})        = True
-isVAtom _ 	              = False
+isVAtom _                     = False
 
 atomPrimRep :: AnnExpr' Id ann -> PrimRep
 atomPrimRep e | Just e' <- bcView e = atomPrimRep e'
-atomPrimRep (AnnVar v)    	    = bcIdPrimRep v
-atomPrimRep (AnnLit l)    	    = typePrimRep (literalType l)
+atomPrimRep (AnnVar v)              = bcIdPrimRep v
+atomPrimRep (AnnLit l)              = typePrimRep (literalType l)
 atomPrimRep (AnnCoercion {})        = VoidRep
 atomPrimRep other = pprPanic "atomPrimRep" (ppr (deAnnotate (undefined,other)))
 
diff --git a/compiler/ghci/ByteCodeInstr.lhs b/compiler/ghci/ByteCodeInstr.lhs
index 005a430..550d8ad 100644
--- a/compiler/ghci/ByteCodeInstr.lhs
+++ b/compiler/ghci/ByteCodeInstr.lhs
@@ -4,23 +4,17 @@
 ByteCodeInstrs: Bytecode instruction definitions
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# OPTIONS_GHC -funbox-strict-fields #-}
 
 module ByteCodeInstr ( 
- 	BCInstr(..), ProtoBCO(..), bciStackUse, BreakInfo (..) 
+        BCInstr(..), ProtoBCO(..), bciStackUse, BreakInfo (..) 
   ) where
 
 #include "HsVersions.h"
 #include "../includes/MachDeps.h"
 
-import ByteCodeItbls	( ItblPtr )
+import ByteCodeItbls    ( ItblPtr )
 
 import StgCmmLayout     ( ArgRep(..) )
 import PprCore
@@ -45,15 +39,15 @@ import Data.Word
 
 data ProtoBCO a 
    = ProtoBCO { 
-	protoBCOName       :: a,	  -- name, in some sense
-	protoBCOInstrs     :: [BCInstr],  -- instrs
-	-- arity and GC info
-	protoBCOBitmap     :: [StgWord],
-	protoBCOBitmapSize :: Word16,
-	protoBCOArity	   :: Int,
-	-- what the BCO came from
-	protoBCOExpr       :: Either  [AnnAlt Id VarSet] (AnnExpr Id VarSet),
-	-- malloc'd pointers
+        protoBCOName       :: a,          -- name, in some sense
+        protoBCOInstrs     :: [BCInstr],  -- instrs
+        -- arity and GC info
+        protoBCOBitmap     :: [StgWord],
+        protoBCOBitmapSize :: Word16,
+        protoBCOArity      :: Int,
+        -- what the BCO came from
+        protoBCOExpr       :: Either  [AnnAlt Id VarSet] (AnnExpr Id VarSet),
+        -- malloc'd pointers
         protoBCOPtrs       :: [Either ItblPtr (Ptr ())]
    }
 
@@ -79,14 +73,14 @@ data BCInstr
 
    -- Pushing literals
    | PUSH_UBX  (Either Literal (Ptr ())) Word16
-	-- push this int/float/double/addr, on the stack. Word16
-	-- is # of words to copy from literal pool.  Eitherness reflects
-	-- the difficulty of dealing with MachAddr here, mostly due to
-	-- the excessive (and unnecessary) restrictions imposed by the
-	-- designers of the new Foreign library.  In particular it is
-	-- quite impossible to convert an Addr to any other integral
-	-- type, and it appears impossible to get hold of the bits of
-	-- an addr, even though we need to assemble BCOs.
+        -- push this int/float/double/addr, on the stack. Word16
+        -- is # of words to copy from literal pool.  Eitherness reflects
+        -- the difficulty of dealing with MachAddr here, mostly due to
+        -- the excessive (and unnecessary) restrictions imposed by the
+        -- designers of the new Foreign library.  In particular it is
+        -- quite impossible to convert an Addr to any other integral
+        -- type, and it appears impossible to get hold of the bits of
+        -- an addr, even though we need to assemble BCOs.
 
    -- various kinds of application
    | PUSH_APPLY_N
@@ -111,8 +105,8 @@ data BCInstr
    | MKPAP     !Word16{-ptr to PAP is this far down stack-} !Word16{-number of words-}
    | UNPACK    !Word16 -- unpack N words from t.o.s Constr
    | PACK      DataCon !Word16
-			-- after assembly, the DataCon is an index into the
-			-- itbl array
+                        -- after assembly, the DataCon is an index into the
+                        -- itbl array
    -- For doing case trees
    | LABEL     LocalLabel
    | TESTLT_I  Int    LocalLabel
@@ -146,7 +140,7 @@ data BCInstr
 
    -- To Infinity And Beyond
    | ENTER
-   | RETURN		-- return a lifted value
+   | RETURN             -- return a lifted value
    | RETURN_UBX ArgRep -- return an unlifted value, here's its rep
 
    -- Breakpoints 
@@ -173,7 +167,7 @@ instance Outputable BreakInfo where
 instance Outputable a => Outputable (ProtoBCO a) where
    ppr (ProtoBCO name instrs bitmap bsize arity origin malloced)
       = (text "ProtoBCO" <+> ppr name <> char '#' <> int arity 
-		<+> text (show malloced) <> colon)
+                <+> text (show malloced) <> colon)
         $$ nest 3 (case origin of
                       Left alts -> vcat (zipWith (<+>) (char '{' : repeat (char ';'))
                                                        (map (pprCoreAltShort.deAnnAlt) alts)) <+> char '}'
@@ -211,7 +205,7 @@ instance Outputable BCInstr where
    ppr (PUSH_L offset)       = text "PUSH_L  " <+> ppr offset
    ppr (PUSH_LL o1 o2)       = text "PUSH_LL " <+> ppr o1 <+> ppr o2
    ppr (PUSH_LLL o1 o2 o3)   = text "PUSH_LLL" <+> ppr o1 <+> ppr o2 <+> ppr o3
-   ppr (PUSH_G nm)  	     = text "PUSH_G  " <+> ppr nm
+   ppr (PUSH_G nm)           = text "PUSH_G  " <+> ppr nm
    ppr (PUSH_PRIMOP op)      = text "PUSH_G  " <+> text "GHC.PrimopWrappers." 
                                                <> ppr op
    ppr (PUSH_BCO bco)        = hang (text "PUSH_BCO") 2 (ppr bco)
@@ -220,17 +214,17 @@ instance Outputable BCInstr where
 
    ppr (PUSH_UBX (Left lit) nw) = text "PUSH_UBX" <+> parens (ppr nw) <+> ppr lit
    ppr (PUSH_UBX (Right aa) nw) = text "PUSH_UBX" <+> parens (ppr nw) <+> text (show aa)
-   ppr PUSH_APPLY_N		= text "PUSH_APPLY_N"
-   ppr PUSH_APPLY_V		= text "PUSH_APPLY_V"
-   ppr PUSH_APPLY_F		= text "PUSH_APPLY_F"
-   ppr PUSH_APPLY_D		= text "PUSH_APPLY_D"
-   ppr PUSH_APPLY_L		= text "PUSH_APPLY_L"
-   ppr PUSH_APPLY_P		= text "PUSH_APPLY_P"
-   ppr PUSH_APPLY_PP		= text "PUSH_APPLY_PP"
-   ppr PUSH_APPLY_PPP		= text "PUSH_APPLY_PPP"
-   ppr PUSH_APPLY_PPPP		= text "PUSH_APPLY_PPPP"
-   ppr PUSH_APPLY_PPPPP		= text "PUSH_APPLY_PPPPP"
-   ppr PUSH_APPLY_PPPPPP	= text "PUSH_APPLY_PPPPPP"
+   ppr PUSH_APPLY_N             = text "PUSH_APPLY_N"
+   ppr PUSH_APPLY_V             = text "PUSH_APPLY_V"
+   ppr PUSH_APPLY_F             = text "PUSH_APPLY_F"
+   ppr PUSH_APPLY_D             = text "PUSH_APPLY_D"
+   ppr PUSH_APPLY_L             = text "PUSH_APPLY_L"
+   ppr PUSH_APPLY_P             = text "PUSH_APPLY_P"
+   ppr PUSH_APPLY_PP            = text "PUSH_APPLY_PP"
+   ppr PUSH_APPLY_PPP           = text "PUSH_APPLY_PPP"
+   ppr PUSH_APPLY_PPPP          = text "PUSH_APPLY_PPPP"
+   ppr PUSH_APPLY_PPPPP         = text "PUSH_APPLY_PPPPP"
+   ppr PUSH_APPLY_PPPPPP        = text "PUSH_APPLY_PPPPPP"
 
    ppr (SLIDE n d)           = text "SLIDE   " <+> ppr n <+> ppr d
    ppr (ALLOC_AP sz)         = text "ALLOC_AP   " <+> ppr sz
@@ -256,7 +250,7 @@ instance Outputable BCInstr where
    ppr CASEFAIL              = text "CASEFAIL"
    ppr (JMP lab)             = text "JMP"      <+> ppr lab
    ppr (CCALL off marshall_addr int) = text "CCALL   " <+> ppr off 
-						<+> text "marshall code at" 
+                                                <+> text "marshall code at" 
                                                <+> text (show marshall_addr)
                                                <+> (if int == 1
                                                     then text "(interruptible)"
@@ -264,7 +258,7 @@ instance Outputable BCInstr where
    ppr (SWIZZLE stkoff n)    = text "SWIZZLE " <+> text "stkoff" <+> ppr stkoff
                                                <+> text "by" <+> ppr n
    ppr ENTER                 = text "ENTER"
-   ppr RETURN		     = text "RETURN"
+   ppr RETURN                = text "RETURN"
    ppr (RETURN_UBX pk)       = text "RETURN_UBX  " <+> ppr pk
    ppr (BRK_FUN _breakArray index info) = text "BRK_FUN" <+> text "<array>" <+> ppr index <+> ppr info
 
@@ -283,54 +277,54 @@ protoBCOStackUse bco = sum (map bciStackUse (protoBCOInstrs bco))
 
 bciStackUse :: BCInstr -> Word
 bciStackUse STKCHECK{}            = 0
-bciStackUse PUSH_L{}       	  = 1
-bciStackUse PUSH_LL{}       	  = 2
+bciStackUse PUSH_L{}              = 1
+bciStackUse PUSH_LL{}             = 2
 bciStackUse PUSH_LLL{}            = 3
-bciStackUse PUSH_G{} 		  = 1
+bciStackUse PUSH_G{}              = 1
 bciStackUse PUSH_PRIMOP{}         = 1
-bciStackUse PUSH_BCO{}    	  = 1
+bciStackUse PUSH_BCO{}            = 1
 bciStackUse (PUSH_ALTS bco)       = 2 + protoBCOStackUse bco
 bciStackUse (PUSH_ALTS_UNLIFTED bco _) = 2 + protoBCOStackUse bco
 bciStackUse (PUSH_UBX _ nw)       = fromIntegral nw
-bciStackUse PUSH_APPLY_N{}	  = 1
-bciStackUse PUSH_APPLY_V{}	  = 1
-bciStackUse PUSH_APPLY_F{}	  = 1
-bciStackUse PUSH_APPLY_D{}	  = 1
-bciStackUse PUSH_APPLY_L{}	  = 1
-bciStackUse PUSH_APPLY_P{}	  = 1
-bciStackUse PUSH_APPLY_PP{}	  = 1
-bciStackUse PUSH_APPLY_PPP{}	  = 1
-bciStackUse PUSH_APPLY_PPPP{}	  = 1
-bciStackUse PUSH_APPLY_PPPPP{}	  = 1
-bciStackUse PUSH_APPLY_PPPPPP{}	  = 1
+bciStackUse PUSH_APPLY_N{}        = 1
+bciStackUse PUSH_APPLY_V{}        = 1
+bciStackUse PUSH_APPLY_F{}        = 1
+bciStackUse PUSH_APPLY_D{}        = 1
+bciStackUse PUSH_APPLY_L{}        = 1
+bciStackUse PUSH_APPLY_P{}        = 1
+bciStackUse PUSH_APPLY_PP{}       = 1
+bciStackUse PUSH_APPLY_PPP{}      = 1
+bciStackUse PUSH_APPLY_PPPP{}     = 1
+bciStackUse PUSH_APPLY_PPPPP{}    = 1
+bciStackUse PUSH_APPLY_PPPPPP{}   = 1
 bciStackUse ALLOC_AP{}            = 1
 bciStackUse ALLOC_AP_NOUPD{}      = 1
 bciStackUse ALLOC_PAP{}           = 1
 bciStackUse (UNPACK sz)           = fromIntegral sz
-bciStackUse LABEL{}       	  = 0
-bciStackUse TESTLT_I{}     	  = 0
-bciStackUse TESTEQ_I{}     	  = 0
-bciStackUse TESTLT_W{}     	  = 0
-bciStackUse TESTEQ_W{}     	  = 0
-bciStackUse TESTLT_F{}     	  = 0
-bciStackUse TESTEQ_F{}     	  = 0
-bciStackUse TESTLT_D{}     	  = 0
-bciStackUse TESTEQ_D{}     	  = 0
-bciStackUse TESTLT_P{}     	  = 0
-bciStackUse TESTEQ_P{}     	  = 0
-bciStackUse CASEFAIL{}		  = 0
-bciStackUse JMP{}		  = 0
-bciStackUse ENTER{}		  = 0
-bciStackUse RETURN{}		  = 0
-bciStackUse RETURN_UBX{}	  = 1
-bciStackUse CCALL{} 		  = 0
-bciStackUse SWIZZLE{}    	  = 0
-bciStackUse BRK_FUN{}    	  = 0
+bciStackUse LABEL{}               = 0
+bciStackUse TESTLT_I{}            = 0
+bciStackUse TESTEQ_I{}            = 0
+bciStackUse TESTLT_W{}            = 0
+bciStackUse TESTEQ_W{}            = 0
+bciStackUse TESTLT_F{}            = 0
+bciStackUse TESTEQ_F{}            = 0
+bciStackUse TESTLT_D{}            = 0
+bciStackUse TESTEQ_D{}            = 0
+bciStackUse TESTLT_P{}            = 0
+bciStackUse TESTEQ_P{}            = 0
+bciStackUse CASEFAIL{}            = 0
+bciStackUse JMP{}                 = 0
+bciStackUse ENTER{}               = 0
+bciStackUse RETURN{}              = 0
+bciStackUse RETURN_UBX{}          = 1
+bciStackUse CCALL{}               = 0
+bciStackUse SWIZZLE{}             = 0
+bciStackUse BRK_FUN{}             = 0
 
 -- These insns actually reduce stack use, but we need the high-tide level,
 -- so can't use this info.  Not that it matters much.
-bciStackUse SLIDE{}		  = 0
-bciStackUse MKAP{}		  = 0
-bciStackUse MKPAP{}		  = 0
-bciStackUse PACK{}		  = 1 -- worst case is PACK 0 words
+bciStackUse SLIDE{}               = 0
+bciStackUse MKAP{}                = 0
+bciStackUse MKPAP{}               = 0
+bciStackUse PACK{}                = 1 -- worst case is PACK 0 words
 \end{code}
diff --git a/compiler/ghci/RtClosureInspect.hs b/compiler/ghci/RtClosureInspect.hs
index 53fed72..5a111fd 100644
--- a/compiler/ghci/RtClosureInspect.hs
+++ b/compiler/ghci/RtClosureInspect.hs
@@ -6,12 +6,6 @@
 --
 -----------------------------------------------------------------------------
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module RtClosureInspect(
      cvObtainTerm,      -- :: HscEnv -> Int -> Bool -> Maybe Type -> HValue -> IO Term
@@ -358,8 +352,8 @@ ppr_termM y p Term{dc=Right dc, subTerms=tt}
        ; return $ cparen (p >= app_prec) $
          sep [ppr dc, nest 2 (pprDeeperList fsep tt_docs)] }
   where
-    sub_terms_to_show	-- Don't show the dictionary arguments to 
-    			-- constructors unless -dppr-debug is on
+    sub_terms_to_show   -- Don't show the dictionary arguments to 
+                        -- constructors unless -dppr-debug is on
       | opt_PprStyle_Debug = tt
       | otherwise = dropList (dataConTheta dc) tt
 
@@ -472,7 +466,7 @@ cPprTermBase y =
    ppr_list p (Term{subTerms=[h,t]}) = do
        let elems      = h : getListTerms t
            isConsLast = not(termType(last elems) `eqType` termType h)
-   	   is_string  = all (isCharTy . ty) elems
+           is_string  = all (isCharTy . ty) elems
 
        print_elems <- mapM (y cons_prec) elems
        if is_string
@@ -750,7 +744,7 @@ cvObtainTerm hsc_env max_depth force old_ty hval = runTR hsc_env $ do
                         -- In such case, we return a best approximation:
                         --  ignore the unpointed args, and recover the pointeds
                         -- This preserves laziness, and should be safe.
-		       traceTR (text "Not constructor" <+> ppr dcname)
+                       traceTR (text "Not constructor" <+> ppr dcname)
                        let dflags = hsc_dflags hsc_env
                            tag = showPpr dflags dcname
                        vars     <- replicateM (length$ elems$ ptrs clos) 
@@ -945,17 +939,17 @@ getDataConArgTys dc con_app_ty
        ; traceTR (text "getDataConArgTys 1" <+> (ppr con_app_ty $$ ppr rep_con_app_ty))
        ; ty_args <- case tcSplitTyConApp_maybe rep_con_app_ty of
                        Just (tc, ty_args) | dataConTyCon dc == tc
-		       	   -> ASSERT( univ_tvs `equalLength` ty_args) 
+                           -> ASSERT( univ_tvs `equalLength` ty_args) 
                               return ty_args
- 		       _   -> do { (_, ty_args, univ_subst) <- instTyVars univ_tvs
-		       	         ; let res_ty = substTy ex_subst (substTy univ_subst (dataConOrigResTy dc))
+                       _   -> do { (_, ty_args, univ_subst) <- instTyVars univ_tvs
+                                 ; let res_ty = substTy ex_subst (substTy univ_subst (dataConOrigResTy dc))
                                    -- See Note [Constructor arg types]
                                  ; addConstraint rep_con_app_ty res_ty
                                  ; return ty_args }
-		-- It is necessary to check dataConTyCon dc == tc
-      		-- because it may be the case that tc is a recursive
-      		-- newtype and tcSplitTyConApp has not removed it. In
-      		-- that case, we happily give up and don't match
+                -- It is necessary to check dataConTyCon dc == tc
+                -- because it may be the case that tc is a recursive
+                -- newtype and tcSplitTyConApp has not removed it. In
+                -- that case, we happily give up and don't match
        ; let subst = zipTopTvSubst (univ_tvs ++ ex_tvs) (ty_args ++ ex_tys)
        ; traceTR (text "getDataConArgTys 2" <+> (ppr rep_con_app_ty $$ ppr ty_args $$ ppr subst))
        ; return (substTys subst (dataConRepArgTys dc)) }
@@ -1212,10 +1206,10 @@ zonkRttiType = zonkTcTypeToType (mkEmptyZonkEnv zonk_unbound_meta)
     zonk_unbound_meta tv 
       = ASSERT( isTcTyVar tv )
         do { tv' <- skolemiseUnboundMetaTyVar tv RuntimeUnk
-	     -- This is where RuntimeUnks are born: 
-	     -- otherwise-unconstrained unification variables are
-	     -- turned into RuntimeUnks as they leave the
-	     -- typechecker's monad
+             -- This is where RuntimeUnks are born: 
+             -- otherwise-unconstrained unification variables are
+             -- turned into RuntimeUnks as they leave the
+             -- typechecker's monad
            ; return (mkTyVarTy tv') }
 
 --------------------------------------------------------------------------------
diff --git a/compiler/hsSyn/HsLit.lhs b/compiler/hsSyn/HsLit.lhs
index 9565acb..d3b6c3a 100644
--- a/compiler/hsSyn/HsLit.lhs
+++ b/compiler/hsSyn/HsLit.lhs
@@ -5,12 +5,6 @@
 \section[HsLit]{Abstract syntax: source-language literals}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# LANGUAGE DeriveDataTypeable #-}
 
@@ -20,7 +14,7 @@ module HsLit where
 
 import {-# SOURCE #-} HsExpr( SyntaxExpr, pprExpr )
 import BasicTypes ( FractionalLit(..) )
-import Type	( Type, Kind )
+import Type     ( Type, Kind )
 import Outputable
 import FastString
 
@@ -30,80 +24,80 @@ import Data.Data
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Annotating the syntax}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 type PostTcKind = Kind
-type PostTcType = Type		-- Used for slots in the abstract syntax
-				-- where we want to keep slot for a type
-				-- to be added by the type checker...but
-				-- before typechecking it's just bogus
+type PostTcType = Type          -- Used for slots in the abstract syntax
+                                -- where we want to keep slot for a type
+                                -- to be added by the type checker...but
+                                -- before typechecking it's just bogus
 
-placeHolderType :: PostTcType	-- Used before typechecking
+placeHolderType :: PostTcType   -- Used before typechecking
 placeHolderType  = panic "Evaluated the place holder for a PostTcType"
 
-placeHolderKind :: PostTcKind	-- Used before typechecking
+placeHolderKind :: PostTcKind   -- Used before typechecking
 placeHolderKind  = panic "Evaluated the place holder for a PostTcKind"
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[HsLit]{Literals}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 
 \begin{code}
 data HsLit
-  = HsChar	    Char		-- Character
-  | HsCharPrim	    Char		-- Unboxed character
-  | HsString	    FastString		-- String
-  | HsStringPrim    ByteString		-- Packed bytes
-  | HsInt	    Integer		-- Genuinely an Int; arises from TcGenDeriv, 
-					--	and from TRANSLATION
+  = HsChar          Char                -- Character
+  | HsCharPrim      Char                -- Unboxed character
+  | HsString        FastString          -- String
+  | HsStringPrim    ByteString          -- Packed bytes
+  | HsInt           Integer             -- Genuinely an Int; arises from TcGenDeriv, 
+                                        --      and from TRANSLATION
   | HsIntPrim       Integer             -- literal Int#
   | HsWordPrim      Integer             -- literal Word#
   | HsInt64Prim     Integer             -- literal Int64#
   | HsWord64Prim    Integer             -- literal Word64#
-  | HsInteger	    Integer  Type	-- Genuinely an integer; arises only from TRANSLATION
-					-- 	(overloaded literals are done with HsOverLit)
-  | HsRat	    FractionalLit Type	-- Genuinely a rational; arises only from TRANSLATION
-					-- 	(overloaded literals are done with HsOverLit)
-  | HsFloatPrim	    FractionalLit	-- Unboxed Float
-  | HsDoublePrim    FractionalLit	-- Unboxed Double
+  | HsInteger       Integer  Type       -- Genuinely an integer; arises only from TRANSLATION
+                                        --      (overloaded literals are done with HsOverLit)
+  | HsRat           FractionalLit Type  -- Genuinely a rational; arises only from TRANSLATION
+                                        --      (overloaded literals are done with HsOverLit)
+  | HsFloatPrim     FractionalLit       -- Unboxed Float
+  | HsDoublePrim    FractionalLit       -- Unboxed Double
   deriving (Data, Typeable)
 
 instance Eq HsLit where
-  (HsChar x1)	    == (HsChar x2)	 = x1==x2
-  (HsCharPrim x1)   == (HsCharPrim x2)	 = x1==x2
-  (HsString x1)     == (HsString x2)	 = x1==x2
+  (HsChar x1)       == (HsChar x2)       = x1==x2
+  (HsCharPrim x1)   == (HsCharPrim x2)   = x1==x2
+  (HsString x1)     == (HsString x2)     = x1==x2
   (HsStringPrim x1) == (HsStringPrim x2) = x1==x2
-  (HsInt x1)	    == (HsInt x2)	 = x1==x2
+  (HsInt x1)        == (HsInt x2)        = x1==x2
   (HsIntPrim x1)    == (HsIntPrim x2)    = x1==x2
   (HsWordPrim x1)   == (HsWordPrim x2)   = x1==x2
   (HsInt64Prim x1)  == (HsInt64Prim x2)  = x1==x2
   (HsWord64Prim x1) == (HsWord64Prim x2) = x1==x2
   (HsInteger x1 _)  == (HsInteger x2 _)  = x1==x2
-  (HsRat x1 _)	    == (HsRat x2 _)      = x1==x2
+  (HsRat x1 _)      == (HsRat x2 _)      = x1==x2
   (HsFloatPrim x1)  == (HsFloatPrim x2)  = x1==x2
   (HsDoublePrim x1) == (HsDoublePrim x2) = x1==x2
   _                 == _                 = False
 
-data HsOverLit id 	-- An overloaded literal
+data HsOverLit id       -- An overloaded literal
   = OverLit {
-	ol_val :: OverLitVal, 
-	ol_rebindable :: Bool,		-- Note [ol_rebindable]
-	ol_witness :: SyntaxExpr id,	-- Note [Overloaded literal witnesses]
-	ol_type :: PostTcType }
+        ol_val :: OverLitVal, 
+        ol_rebindable :: Bool,          -- Note [ol_rebindable]
+        ol_witness :: SyntaxExpr id,    -- Note [Overloaded literal witnesses]
+        ol_type :: PostTcType }
   deriving (Data, Typeable)
 
 data OverLitVal
-  = HsIntegral   !Integer   	-- Integer-looking literals;
-  | HsFractional !FractionalLit	-- Frac-looking literals
-  | HsIsString   !FastString 	-- String-looking literals
+  = HsIntegral   !Integer       -- Integer-looking literals;
+  | HsFractional !FractionalLit -- Frac-looking literals
+  | HsIsString   !FastString    -- String-looking literals
   deriving (Data, Typeable)
 
 overLitType :: HsOverLit a -> Type
@@ -128,7 +122,7 @@ Note [Overloaded literal witnesses]
 *Before* type checking, the SyntaxExpr in an HsOverLit is the
 name of the coercion function, 'fromInteger' or 'fromRational'.
 *After* type checking, it is a witness for the literal, such as
-	(fromInteger 3) or lit_78
+        (fromInteger 3) or lit_78
 This witness should replace the literal.
 
 This dual role is unusual, because we're replacing 'fromInteger' with 
@@ -167,25 +161,25 @@ instance Ord OverLitVal where
 
 \begin{code}
 instance Outputable HsLit where
-	-- Use "show" because it puts in appropriate escapes
-    ppr (HsChar c)	 = pprHsChar c
-    ppr (HsCharPrim c)	 = pprHsChar c <> char '#'
-    ppr (HsString s)	 = pprHsString s
+        -- Use "show" because it puts in appropriate escapes
+    ppr (HsChar c)       = pprHsChar c
+    ppr (HsCharPrim c)   = pprHsChar c <> char '#'
+    ppr (HsString s)     = pprHsString s
     ppr (HsStringPrim s) = pprHsBytes s <> char '#'
-    ppr (HsInt i)	 = integer i
-    ppr (HsInteger i _)	 = integer i
-    ppr (HsRat f _)	 = ppr f
-    ppr (HsFloatPrim f)	 = ppr f <> char '#'
+    ppr (HsInt i)        = integer i
+    ppr (HsInteger i _)  = integer i
+    ppr (HsRat f _)      = ppr f
+    ppr (HsFloatPrim f)  = ppr f <> char '#'
     ppr (HsDoublePrim d) = ppr d <> text "##"
-    ppr (HsIntPrim i)	 = integer i  <> char '#'
-    ppr (HsWordPrim w)	 = integer w  <> text "##"
+    ppr (HsIntPrim i)    = integer i  <> char '#'
+    ppr (HsWordPrim w)   = integer w  <> text "##"
     ppr (HsInt64Prim i)  = integer i  <> text "L#"
     ppr (HsWord64Prim w) = integer w  <> text "L##"
 
 -- in debug mode, print the expression that it's resolved to, too
 instance OutputableBndr id => Outputable (HsOverLit id) where
   ppr (OverLit {ol_val=val, ol_witness=witness}) 
-	= ppr val <+> (ifPprDebug (parens (pprExpr witness)))
+        = ppr val <+> (ifPprDebug (parens (pprExpr witness)))
 
 instance Outputable OverLitVal where
   ppr (HsIntegral i)   = integer i 
diff --git a/compiler/hsSyn/HsUtils.lhs b/compiler/hsSyn/HsUtils.lhs
index 398b97b..f45a6dc 100644
--- a/compiler/hsSyn/HsUtils.lhs
+++ b/compiler/hsSyn/HsUtils.lhs
@@ -6,19 +6,13 @@ Here we collect a variety of helper functions that construct or
 analyse HsSyn.  All these functions deal with generic HsSyn; functions
 which deal with the intantiated versions are located elsewhere:
 
-   Parameterised by	Module
+   Parameterised by     Module
    ----------------     -------------
-   RdrName		parser/RdrHsSyn
-   Name			rename/RnHsSyn
-   Id			typecheck/TcHsSyn	
+   RdrName              parser/RdrHsSyn
+   Name                 rename/RnHsSyn
+   Id                   typecheck/TcHsSyn       
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module HsUtils(
   -- Terms
@@ -77,7 +71,7 @@ import HsDecls
 import HsBinds
 import HsExpr
 import HsPat
-import HsTypes	
+import HsTypes  
 import HsLit
 
 import TcEvidence
@@ -98,9 +92,9 @@ import Data.Either
 
 
 %************************************************************************
-%*									*
-	Some useful helpers for constructing syntax
-%*									*
+%*                                                                      *
+        Some useful helpers for constructing syntax
+%*                                                                      *
 %************************************************************************
 
 These functions attempt to construct a not-completely-useless SrcSpan
@@ -117,8 +111,8 @@ mkSimpleMatch pats rhs
     Match pats Nothing (unguardedGRHSs rhs)
   where
     loc = case pats of
-		[]      -> getLoc rhs
-		(pat:_) -> combineSrcSpans (getLoc pat) (getLoc rhs)
+                []      -> getLoc rhs
+                (pat:_) -> combineSrcSpans (getLoc pat) (getLoc rhs)
 
 unguardedGRHSs :: Located (body id) -> GRHSs id (Located (body id))
 unguardedGRHSs rhs = GRHSs (unguardedRHS rhs) emptyLocalBinds
@@ -137,7 +131,7 @@ mkHsApp e1 e2 = addCLoc e1 e2 (HsApp e1 e2)
 
 mkHsLam :: [LPat id] -> LHsExpr id -> LHsExpr id
 mkHsLam pats body = mkHsPar (L (getLoc body) (HsLam matches))
-	where
+        where
           matches = mkMatchGroup [mkSimpleMatch pats body]
 
 mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr Id -> LHsExpr Id
@@ -196,7 +190,7 @@ mkHsFractional f       = OverLit (HsFractional f)  noRebindableInfo noSyntaxExpr
 mkHsIsString   s       = OverLit (HsIsString   s)  noRebindableInfo noSyntaxExpr
 
 noRebindableInfo :: Bool
-noRebindableInfo = error "noRebindableInfo" 	-- Just another placeholder; 
+noRebindableInfo = error "noRebindableInfo"     -- Just another placeholder; 
 
 mkHsDo ctxt stmts = HsDo ctxt stmts placeHolderType
 mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])
@@ -254,16 +248,16 @@ mkHsSpliceTy e = HsSpliceTy (mkHsSplice e) emptyFVs placeHolderKind
 
 unqualSplice :: RdrName
 unqualSplice = mkRdrUnqual (mkVarOccFS (fsLit "splice"))
-		-- A name (uniquified later) to
-		-- identify the splice
+                -- A name (uniquified later) to
+                -- identify the splice
 
 mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsQuasiQuote RdrName
 mkHsQuasiQuote quoter span quote = HsQuasiQuote quoter span quote
 
 unqualQuasiQuote :: RdrName
 unqualQuasiQuote = mkRdrUnqual (mkVarOccFS (fsLit "quasiquote"))
-		-- A name (uniquified later) to
-		-- identify the quasi-quote
+                -- A name (uniquified later) to
+                -- identify the quasi-quote
 
 mkHsString :: String -> HsLit
 mkHsString s = HsString (mkFastString s)
@@ -276,9 +270,9 @@ userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]
 
 
 %************************************************************************
-%*									*
-	Constructing syntax with no location info
-%*									*
+%*                                                                      *
+        Constructing syntax with no location info
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -302,11 +296,11 @@ nlHsIntLit n = noLoc (HsLit (HsInt n))
 
 nlHsApps :: id -> [LHsExpr id] -> LHsExpr id
 nlHsApps f xs = foldl nlHsApp (nlHsVar f) xs
-	     
+             
 nlHsVarApps :: id -> [id] -> LHsExpr id
 nlHsVarApps f xs = noLoc (foldl mk (HsVar f) (map HsVar xs))
-		 where
-		   mk f a = HsApp (noLoc f) (noLoc a)
+                 where
+                   mk f a = HsApp (noLoc f) (noLoc a)
 
 nlConVarPat :: id -> [id] -> LPat id
 nlConVarPat con vars = nlConPat con (map nlVarPat vars)
@@ -322,10 +316,10 @@ nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))
 
 nlWildConPat :: DataCon -> LPat RdrName
 nlWildConPat con = noLoc (ConPatIn (noLoc (getRdrName con))
-				   (PrefixCon (nOfThem (dataConSourceArity con) nlWildPat)))
+                                   (PrefixCon (nOfThem (dataConSourceArity con) nlWildPat)))
 
 nlWildPat :: LPat id
-nlWildPat  = noLoc (WildPat placeHolderType)	-- Pre-typechecking
+nlWildPat  = noLoc (WildPat placeHolderType)    -- Pre-typechecking
 
 nlHsDo :: HsStmtContext Name -> [LStmt id (LHsExpr id)] -> LHsExpr id
 nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts)
@@ -339,19 +333,19 @@ nlHsIf   :: LHsExpr id -> LHsExpr id -> LHsExpr id -> LHsExpr id
 nlHsCase :: LHsExpr id -> [LMatch id (LHsExpr id)] -> LHsExpr id
 nlList   :: [LHsExpr id] -> LHsExpr id
 
-nlHsLam	match		= noLoc (HsLam (mkMatchGroup [match]))
-nlHsPar e		= noLoc (HsPar e)
-nlHsIf cond true false	= noLoc (mkHsIf cond true false)
-nlHsCase expr matches	= noLoc (HsCase expr (mkMatchGroup matches))
-nlList exprs		= noLoc (ExplicitList placeHolderType Nothing exprs)
+nlHsLam match           = noLoc (HsLam (mkMatchGroup [match]))
+nlHsPar e               = noLoc (HsPar e)
+nlHsIf cond true false  = noLoc (mkHsIf cond true false)
+nlHsCase expr matches   = noLoc (HsCase expr (mkMatchGroup matches))
+nlList exprs            = noLoc (ExplicitList placeHolderType Nothing exprs)
 
 nlHsAppTy :: LHsType name -> LHsType name -> LHsType name
 nlHsTyVar :: name                         -> LHsType name
 nlHsFunTy :: LHsType name -> LHsType name -> LHsType name
 
-nlHsAppTy f t		= noLoc (HsAppTy f t)
-nlHsTyVar x		= noLoc (HsTyVar x)
-nlHsFunTy a b		= noLoc (HsFunTy a b)
+nlHsAppTy f t           = noLoc (HsAppTy f t)
+nlHsTyVar x             = noLoc (HsTyVar x)
+nlHsFunTy a b           = noLoc (HsFunTy a b)
 
 nlHsTyConApp :: name -> [LHsType name] -> LHsType name
 nlHsTyConApp tycon tys  = foldl nlHsAppTy (nlHsTyVar tycon) tys
@@ -383,7 +377,7 @@ mkLHsWrap co_fn (L loc e) = L loc (mkHsWrap co_fn e)
 
 mkHsWrap :: HsWrapper -> HsExpr id -> HsExpr id
 mkHsWrap co_fn e | isIdHsWrapper co_fn = e
-		 | otherwise	       = HsWrap co_fn e
+                 | otherwise           = HsWrap co_fn e
 
 mkHsWrapCo :: TcCoercion -> HsExpr id -> HsExpr id
 mkHsWrapCo co e | isTcReflCo co = e
@@ -403,7 +397,7 @@ coToHsWrapper co | isTcReflCo co = idHsWrapper
 
 mkHsWrapPat :: HsWrapper -> Pat id -> Type -> Pat id
 mkHsWrapPat co_fn p ty | isIdHsWrapper co_fn = p
-		       | otherwise	     = CoPat co_fn p ty
+                       | otherwise           = CoPat co_fn p ty
 
 mkHsWrapPatCo :: TcCoercion -> Pat id -> Type -> Pat id
 mkHsWrapPatCo co pat ty | isTcReflCo co = pat
@@ -414,9 +408,9 @@ mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr
 \end{code}
 l
 %************************************************************************
-%*									*
-		Bindings; with a location at the top
-%*									*
+%*                                                                      *
+                Bindings; with a location at the top
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -424,28 +418,28 @@ mkFunBind :: Located RdrName -> [LMatch RdrName (LHsExpr RdrName)] -> HsBind Rdr
 -- Not infix, with place holders for coercion and free vars
 mkFunBind fn ms = FunBind { fun_id = fn, fun_infix = False
                           , fun_matches = mkMatchGroup ms
-			  , fun_co_fn = idHsWrapper
+                          , fun_co_fn = idHsWrapper
                           , bind_fvs = placeHolderNames
-			  , fun_tick = Nothing }
+                          , fun_tick = Nothing }
 
 mkTopFunBind :: Located Name -> [LMatch Name (LHsExpr Name)] -> HsBind Name
 -- In Name-land, with empty bind_fvs
 mkTopFunBind fn ms = FunBind { fun_id = fn, fun_infix = False
                              , fun_matches = mkMatchGroup ms
-			     , fun_co_fn = idHsWrapper
-                             , bind_fvs = emptyNameSet	-- NB: closed binding
-			     , fun_tick = Nothing }
+                             , fun_co_fn = idHsWrapper
+                             , bind_fvs = emptyNameSet  -- NB: closed binding
+                             , fun_tick = Nothing }
 
 mkHsVarBind :: SrcSpan -> RdrName -> LHsExpr RdrName -> LHsBind RdrName
 mkHsVarBind loc var rhs = mk_easy_FunBind loc var [] rhs
 
 mkVarBind :: id -> LHsExpr id -> LHsBind id
 mkVarBind var rhs = L (getLoc rhs) $
-		    VarBind { var_id = var, var_rhs = rhs, var_inline = False }
+                    VarBind { var_id = var, var_rhs = rhs, var_inline = False }
 
 ------------
 mk_easy_FunBind :: SrcSpan -> RdrName -> [LPat RdrName]
-		-> LHsExpr RdrName -> LHsBind RdrName
+                -> LHsExpr RdrName -> LHsBind RdrName
 mk_easy_FunBind loc fun pats expr
   = L loc $ mkFunBind (L loc fun) [mkMatch pats expr emptyLocalBinds]
 
@@ -453,17 +447,17 @@ mk_easy_FunBind loc fun pats expr
 mkMatch :: [LPat id] -> LHsExpr id -> HsLocalBinds id -> LMatch id (LHsExpr id)
 mkMatch pats expr binds
   = noLoc (Match (map paren pats) Nothing 
-		 (GRHSs (unguardedRHS expr) binds))
+                 (GRHSs (unguardedRHS expr) binds))
   where
     paren lp@(L l p) | hsPatNeedsParens p = L l (ParPat lp) 
-		     | otherwise          = lp
+                     | otherwise          = lp
 \end{code}
 
 
 %************************************************************************
-%*									*
-	Collecting binders
-%*									*
+%*                                                                      *
+        Collecting binders
+%*                                                                      *
 %************************************************************************
 
 Get all the binders in some HsBindGroups, IN THE ORDER OF APPEARANCE. eg.
@@ -505,10 +499,10 @@ collect_bind (FunBind { fun_id = L _ f }) acc = f : acc
 collect_bind (VarBind { var_id = f })     acc = f : acc
 collect_bind (AbsBinds { abs_exports = dbinds, abs_binds = _binds }) acc
   = map abe_poly dbinds ++ acc 
-	-- ++ foldr collect_bind acc binds
-	-- I don't think we want the binders from the nested binds
-	-- The only time we collect binders from a typechecked 
-	-- binding (hence see AbsBinds) is in zonking in TcHsSyn
+        -- ++ foldr collect_bind acc binds
+        -- I don't think we want the binders from the nested binds
+        -- The only time we collect binders from a typechecked 
+        -- binding (hence see AbsBinds) is in zonking in TcHsSyn
 
 collectHsBindsBinders :: LHsBindsLR idL idR -> [idL]
 collectHsBindsBinders binds = collect_binds binds []
@@ -524,7 +518,7 @@ collectMethodBinders :: LHsBindsLR RdrName idR -> [Located RdrName]
 collectMethodBinders binds = foldrBag get [] binds
   where
     get (L _ (FunBind { fun_id = f })) fs = f : fs
-    get _                              fs = fs	
+    get _                              fs = fs  
        -- Someone else complains about non-FunBinds
 
 ----------------- Statements --------------------------
@@ -561,27 +555,27 @@ collect_lpat :: LPat name -> [name] -> [name]
 collect_lpat (L _ pat) bndrs
   = go pat
   where
-    go (VarPat var) 	   	  = var : bndrs
-    go (WildPat _)	      	  = bndrs
-    go (LazyPat pat)     	  = collect_lpat pat bndrs
-    go (BangPat pat)     	  = collect_lpat pat bndrs
-    go (AsPat (L _ a) pat)     	  = a : collect_lpat pat bndrs
+    go (VarPat var)               = var : bndrs
+    go (WildPat _)                = bndrs
+    go (LazyPat pat)              = collect_lpat pat bndrs
+    go (BangPat pat)              = collect_lpat pat bndrs
+    go (AsPat (L _ a) pat)        = a : collect_lpat pat bndrs
     go (ViewPat _ pat _)          = collect_lpat pat bndrs
-    go (ParPat  pat)     	  = collect_lpat pat bndrs
-				  
+    go (ParPat  pat)              = collect_lpat pat bndrs
+                                  
     go (ListPat pats _ _)         = foldr collect_lpat bndrs pats
-    go (PArrPat pats _)    	  = foldr collect_lpat bndrs pats
-    go (TuplePat pats _ _)  	  = foldr collect_lpat bndrs pats
-				  
+    go (PArrPat pats _)           = foldr collect_lpat bndrs pats
+    go (TuplePat pats _ _)        = foldr collect_lpat bndrs pats
+                                  
     go (ConPatIn _ ps)            = foldr collect_lpat bndrs (hsConPatArgs ps)
     go (ConPatOut {pat_args=ps})  = foldr collect_lpat bndrs (hsConPatArgs ps)
-	-- See Note [Dictionary binders in ConPatOut]
-    go (LitPat _)	      	  = bndrs
-    go (NPat _ _ _)		  = bndrs
+        -- See Note [Dictionary binders in ConPatOut]
+    go (LitPat _)                 = bndrs
+    go (NPat _ _ _)               = bndrs
     go (NPlusKPat (L _ n) _ _ _)  = n : bndrs
- 				  
-    go (SigPatIn pat _)	 	  = collect_lpat pat bndrs
-    go (SigPatOut pat _)	  = collect_lpat pat bndrs
+                                  
+    go (SigPatIn pat _)           = collect_lpat pat bndrs
+    go (SigPatOut pat _)          = collect_lpat pat bndrs
     go (QuasiQuotePat _)          = bndrs
     go (CoPat _ pat _)            = go pat
 \end{code}
@@ -682,13 +676,13 @@ hsConDeclsBinders cons
   = snd (foldl do_one ([], []) cons)
   where
     do_one (flds_seen, acc) (L _ (ConDecl { con_name = lname, con_details = RecCon flds }))
-	= (map unLoc new_flds ++ flds_seen, lname : new_flds ++ acc)
-	where
-	  new_flds = filterOut (\f -> unLoc f `elem` flds_seen) 
-			       (map cd_fld_name flds)
+        = (map unLoc new_flds ++ flds_seen, lname : new_flds ++ acc)
+        where
+          new_flds = filterOut (\f -> unLoc f `elem` flds_seen) 
+                               (map cd_fld_name flds)
 
     do_one (flds_seen, acc) (L _ (ConDecl { con_name = lname }))
-	= (flds_seen, lname:acc)
+        = (flds_seen, lname:acc)
 \end{code}
 
 Note [Binders in family instances]
@@ -700,9 +694,9 @@ constructor is an *occurrence* not a binding site
 
 
 %************************************************************************
-%*									*
-	Collecting binders the user did not write
-%*									*
+%*                                                                      *
+        Collecting binders the user did not write
+%*                                                                      *
 %************************************************************************
 
 The job of this family of functions is to run through binding sites and find the set of all Names
diff --git a/compiler/iface/BuildTyCl.lhs b/compiler/iface/BuildTyCl.lhs
index 38bb930..1019707 100644
--- a/compiler/iface/BuildTyCl.lhs
+++ b/compiler/iface/BuildTyCl.lhs
@@ -4,12 +4,6 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module BuildTyCl (
         buildSynTyCon,
@@ -42,7 +36,7 @@ import UniqSupply
 import Util
 import Outputable
 \end{code}
-	
+        
 
 \begin{code}
 ------------------------------------------------------
@@ -66,7 +60,7 @@ mkDataTyConRhs cons
   = DataTyCon {
         data_cons = cons,
         is_enum = not (null cons) && all is_enum_con cons
-		  -- See Note [Enumeration types] in TyCon
+                  -- See Note [Enumeration types] in TyCon
     }
   where
     is_enum_con con
@@ -79,13 +73,13 @@ mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs
 --   We pass the Name of the parent TyCon, as well as the TyCon itself,
 --   because the latter is part of a knot, whereas the former is not.
 mkNewTyConRhs tycon_name tycon con 
-  = do	{ co_tycon_name <- newImplicitBinder tycon_name mkNewTyCoOcc
-	; let co_tycon = mkNewTypeCo co_tycon_name tycon etad_tvs etad_roles etad_rhs
-	; traceIf (text "mkNewTyConRhs" <+> ppr co_tycon)
-	; return (NewTyCon { data_con    = con, 
-		       	     nt_rhs      = rhs_ty,
-		       	     nt_etad_rhs = (etad_tvs, etad_rhs),
- 		       	     nt_co 	 = co_tycon } ) }
+  = do  { co_tycon_name <- newImplicitBinder tycon_name mkNewTyCoOcc
+        ; let co_tycon = mkNewTypeCo co_tycon_name tycon etad_tvs etad_roles etad_rhs
+        ; traceIf (text "mkNewTyConRhs" <+> ppr co_tycon)
+        ; return (NewTyCon { data_con    = con, 
+                             nt_rhs      = rhs_ty,
+                             nt_etad_rhs = (etad_tvs, etad_rhs),
+                             nt_co       = co_tycon } ) }
                              -- Coreview looks through newtypes with a Nothing
                              -- for nt_co, or uses explicit coercions otherwise
   where
@@ -93,89 +87,89 @@ mkNewTyConRhs tycon_name tycon con
     roles  = tyConRoles tycon
     inst_con_ty = applyTys (dataConUserType con) (mkTyVarTys tvs)
     rhs_ty = ASSERT( isFunTy inst_con_ty ) funArgTy inst_con_ty
-	-- Instantiate the data con with the 
-	-- type variables from the tycon
-	-- NB: a newtype DataCon has a type that must look like
-	--        forall tvs.  <arg-ty> -> T tvs
-	-- Note that we *can't* use dataConInstOrigArgTys here because
-	-- the newtype arising from   class Foo a => Bar a where {}
-  	-- has a single argument (Foo a) that is a *type class*, so
-	-- dataConInstOrigArgTys returns [].
+        -- Instantiate the data con with the 
+        -- type variables from the tycon
+        -- NB: a newtype DataCon has a type that must look like
+        --        forall tvs.  <arg-ty> -> T tvs
+        -- Note that we *can't* use dataConInstOrigArgTys here because
+        -- the newtype arising from   class Foo a => Bar a where {}
+        -- has a single argument (Foo a) that is a *type class*, so
+        -- dataConInstOrigArgTys returns [].
 
     etad_tvs   :: [TyVar]  -- Matched lazily, so that mkNewTypeCo can
     etad_roles :: [Role]   -- return a TyCon without pulling on rhs_ty
     etad_rhs   :: Type     -- See Note [Tricky iface loop] in LoadIface
     (etad_tvs, etad_roles, etad_rhs) = eta_reduce (reverse tvs) (reverse roles) rhs_ty
  
-    eta_reduce :: [TyVar]	-- Reversed
+    eta_reduce :: [TyVar]       -- Reversed
                -> [Role]        -- also reversed
-	       -> Type		-- Rhs type
-	       -> ([TyVar], [Role], Type)  -- Eta-reduced version
+               -> Type          -- Rhs type
+               -> ([TyVar], [Role], Type)  -- Eta-reduced version
                                            -- (tyvars in normal order)
     eta_reduce (a:as) (_:rs) ty | Just (fun, arg) <- splitAppTy_maybe ty,
-			          Just tv <- getTyVar_maybe arg,
-			          tv == a,
-			          not (a `elemVarSet` tyVarsOfType fun)
-			        = eta_reduce as rs fun
+                                  Just tv <- getTyVar_maybe arg,
+                                  tv == a,
+                                  not (a `elemVarSet` tyVarsOfType fun)
+                                = eta_reduce as rs fun
     eta_reduce tvs rs ty = (reverse tvs, reverse rs, ty)
-				
+                                
 
 ------------------------------------------------------
 buildDataCon :: FamInstEnvs 
             -> Name -> Bool
-	    -> [HsBang] 
-	    -> [Name]			-- Field labels
-	    -> [TyVar] -> [TyVar]	-- Univ and ext 
+            -> [HsBang] 
+            -> [Name]                   -- Field labels
+            -> [TyVar] -> [TyVar]       -- Univ and ext 
             -> [(TyVar,Type)]           -- Equality spec
-	    -> ThetaType		-- Does not include the "stupid theta"
-					-- or the GADT equalities
-	    -> [Type] -> Type		-- Argument and result types
-	    -> TyCon			-- Rep tycon
-	    -> TcRnIf m n DataCon
+            -> ThetaType                -- Does not include the "stupid theta"
+                                        -- or the GADT equalities
+            -> [Type] -> Type           -- Argument and result types
+            -> TyCon                    -- Rep tycon
+            -> TcRnIf m n DataCon
 -- A wrapper for DataCon.mkDataCon that
 --   a) makes the worker Id
 --   b) makes the wrapper Id if necessary, including
---	allocating its unique (hence monadic)
+--      allocating its unique (hence monadic)
 buildDataCon fam_envs src_name declared_infix arg_stricts field_lbls
-	     univ_tvs ex_tvs eq_spec ctxt arg_tys res_ty rep_tycon
-  = do	{ wrap_name <- newImplicitBinder src_name mkDataConWrapperOcc
-	; work_name <- newImplicitBinder src_name mkDataConWorkerOcc
-	-- This last one takes the name of the data constructor in the source
-	-- code, which (for Haskell source anyway) will be in the DataName name
-	-- space, and puts it into the VarName name space
+             univ_tvs ex_tvs eq_spec ctxt arg_tys res_ty rep_tycon
+  = do  { wrap_name <- newImplicitBinder src_name mkDataConWrapperOcc
+        ; work_name <- newImplicitBinder src_name mkDataConWorkerOcc
+        -- This last one takes the name of the data constructor in the source
+        -- code, which (for Haskell source anyway) will be in the DataName name
+        -- space, and puts it into the VarName name space
 
         ; us <- newUniqueSupply
         ; dflags <- getDynFlags
-	; let
-		stupid_ctxt = mkDataConStupidTheta rep_tycon arg_tys univ_tvs
-		data_con = mkDataCon src_name declared_infix
-				     arg_stricts field_lbls
-				     univ_tvs ex_tvs eq_spec ctxt
-				     arg_tys res_ty rep_tycon
-				     stupid_ctxt dc_wrk dc_rep
+        ; let
+                stupid_ctxt = mkDataConStupidTheta rep_tycon arg_tys univ_tvs
+                data_con = mkDataCon src_name declared_infix
+                                     arg_stricts field_lbls
+                                     univ_tvs ex_tvs eq_spec ctxt
+                                     arg_tys res_ty rep_tycon
+                                     stupid_ctxt dc_wrk dc_rep
                 dc_wrk = mkDataConWorkId work_name data_con
                 dc_rep = initUs_ us (mkDataConRep dflags fam_envs wrap_name data_con)
 
-	; return data_con }
+        ; return data_con }
 
 
 -- The stupid context for a data constructor should be limited to
 -- the type variables mentioned in the arg_tys
 -- ToDo: Or functionally dependent on?  
---	 This whole stupid theta thing is, well, stupid.
+--       This whole stupid theta thing is, well, stupid.
 mkDataConStupidTheta :: TyCon -> [Type] -> [TyVar] -> [PredType]
 mkDataConStupidTheta tycon arg_tys univ_tvs
-  | null stupid_theta = []	-- The common case
-  | otherwise 	      = filter in_arg_tys stupid_theta
+  | null stupid_theta = []      -- The common case
+  | otherwise         = filter in_arg_tys stupid_theta
   where
-    tc_subst	 = zipTopTvSubst (tyConTyVars tycon) (mkTyVarTys univ_tvs)
+    tc_subst     = zipTopTvSubst (tyConTyVars tycon) (mkTyVarTys univ_tvs)
     stupid_theta = substTheta tc_subst (tyConStupidTheta tycon)
-	-- Start by instantiating the master copy of the 
-	-- stupid theta, taken from the TyCon
+        -- Start by instantiating the master copy of the 
+        -- stupid theta, taken from the TyCon
 
     arg_tyvars      = tyVarsOfTypes arg_tys
     in_arg_tys pred = not $ isEmptyVarSet $ 
-		      tyVarsOfType pred `intersectVarSet` arg_tyvars
+                      tyVarsOfType pred `intersectVarSet` arg_tyvars
 \end{code}
 
 
@@ -185,97 +179,97 @@ type TcMethInfo = (Name, DefMethSpec, Type)
         -- A temporary intermediate, to communicate between 
         -- tcClassSigs and buildClass.
 
-buildClass :: Bool		-- True <=> do not include unfoldings 
-				--	    on dict selectors
-				-- Used when importing a class without -O
-	   -> Name -> [TyVar] -> [Role] -> ThetaType
-	   -> [FunDep TyVar]		   -- Functional dependencies
-	   -> [ClassATItem]		   -- Associated types
-	   -> [TcMethInfo]                 -- Method info
-	   -> ClassMinimalDef              -- Minimal complete definition
-	   -> RecFlag			   -- Info for type constructor
-	   -> TcRnIf m n Class
+buildClass :: Bool              -- True <=> do not include unfoldings 
+                                --          on dict selectors
+                                -- Used when importing a class without -O
+           -> Name -> [TyVar] -> [Role] -> ThetaType
+           -> [FunDep TyVar]               -- Functional dependencies
+           -> [ClassATItem]                -- Associated types
+           -> [TcMethInfo]                 -- Method info
+           -> ClassMinimalDef              -- Minimal complete definition
+           -> RecFlag                      -- Info for type constructor
+           -> TcRnIf m n Class
 
 buildClass no_unf tycon_name tvs roles sc_theta fds at_items sig_stuff mindef tc_isrec
-  = fixM  $ \ rec_clas -> 	-- Only name generation inside loop
-    do	{ traceIf (text "buildClass")
+  = fixM  $ \ rec_clas ->       -- Only name generation inside loop
+    do  { traceIf (text "buildClass")
         ; dflags <- getDynFlags
 
-	; datacon_name <- newImplicitBinder tycon_name mkClassDataConOcc
-		-- The class name is the 'parent' for this datacon, not its tycon,
-		-- because one should import the class to get the binding for 
-		-- the datacon
+        ; datacon_name <- newImplicitBinder tycon_name mkClassDataConOcc
+                -- The class name is the 'parent' for this datacon, not its tycon,
+                -- because one should import the class to get the binding for 
+                -- the datacon
 
 
-	; op_items <- mapM (mk_op_item rec_clas) sig_stuff
-	  		-- Build the selector id and default method id
+        ; op_items <- mapM (mk_op_item rec_clas) sig_stuff
+                        -- Build the selector id and default method id
 
-	      -- Make selectors for the superclasses 
-	; sc_sel_names <- mapM  (newImplicitBinder tycon_name . mkSuperDictSelOcc) 
-				[1..length sc_theta]
+              -- Make selectors for the superclasses 
+        ; sc_sel_names <- mapM  (newImplicitBinder tycon_name . mkSuperDictSelOcc) 
+                                [1..length sc_theta]
         ; let sc_sel_ids = [ mkDictSelId dflags no_unf sc_name rec_clas 
                            | sc_name <- sc_sel_names]
-	      -- We number off the Dict superclass selectors, 1, 2, 3 etc so that we 
-	      -- can construct names for the selectors. Thus
-	      --      class (C a, C b) => D a b where ...
-	      -- gives superclass selectors
-	      --      D_sc1, D_sc2
-	      -- (We used to call them D_C, but now we can have two different
-	      --  superclasses both called C!)
-	
-	; let use_newtype = isSingleton arg_tys
-		-- Use a newtype if the data constructor 
-		--   (a) has exactly one value field
-		--       i.e. exactly one operation or superclass taken together
+              -- We number off the Dict superclass selectors, 1, 2, 3 etc so that we 
+              -- can construct names for the selectors. Thus
+              --      class (C a, C b) => D a b where ...
+              -- gives superclass selectors
+              --      D_sc1, D_sc2
+              -- (We used to call them D_C, but now we can have two different
+              --  superclasses both called C!)
+        
+        ; let use_newtype = isSingleton arg_tys
+                -- Use a newtype if the data constructor 
+                --   (a) has exactly one value field
+                --       i.e. exactly one operation or superclass taken together
                 --   (b) that value is of lifted type (which they always are, because
                 --       we box equality superclasses)
-		-- See note [Class newtypes and equality predicates]
+                -- See note [Class newtypes and equality predicates]
 
-		-- We treat the dictionary superclasses as ordinary arguments.  
+                -- We treat the dictionary superclasses as ordinary arguments.  
                 -- That means that in the case of
-		--     class C a => D a
-		-- we don't get a newtype with no arguments!
-	      args      = sc_sel_names ++ op_names
-	      op_tys	= [ty | (_,_,ty) <- sig_stuff]
-	      op_names  = [op | (op,_,_) <- sig_stuff]
-	      arg_tys   = sc_theta ++ op_tys
+                --     class C a => D a
+                -- we don't get a newtype with no arguments!
+              args      = sc_sel_names ++ op_names
+              op_tys    = [ty | (_,_,ty) <- sig_stuff]
+              op_names  = [op | (op,_,_) <- sig_stuff]
+              arg_tys   = sc_theta ++ op_tys
               rec_tycon = classTyCon rec_clas
                
-	; dict_con <- buildDataCon (panic "buildClass: FamInstEnvs")
+        ; dict_con <- buildDataCon (panic "buildClass: FamInstEnvs")
                                    datacon_name
-				   False 	-- Not declared infix
-				   (map (const HsNoBang) args)
-				   [{- No fields -}]
-				   tvs [{- no existentials -}]
+                                   False        -- Not declared infix
+                                   (map (const HsNoBang) args)
+                                   [{- No fields -}]
+                                   tvs [{- no existentials -}]
                                    [{- No GADT equalities -}] 
                                    [{- No theta -}]
                                    arg_tys
-				   (mkTyConApp rec_tycon (mkTyVarTys tvs))
-				   rec_tycon
-
-	; rhs <- if use_newtype
-		 then mkNewTyConRhs tycon_name rec_tycon dict_con
-		 else return (mkDataTyConRhs [dict_con])
-
-	; let {	clas_kind = mkPiKinds tvs constraintKind
-
- 	      ; tycon = mkClassTyCon tycon_name clas_kind tvs roles
- 	                             rhs rec_clas tc_isrec
-		-- A class can be recursive, and in the case of newtypes 
-		-- this matters.  For example
-		-- 	class C a where { op :: C b => a -> b -> Int }
-		-- Because C has only one operation, it is represented by
-		-- a newtype, and it should be a *recursive* newtype.
-		-- [If we don't make it a recursive newtype, we'll expand the
-		-- newtype like a synonym, but that will lead to an infinite
-		-- type]
-
-	      ; result = mkClass tvs fds 
-			         sc_theta sc_sel_ids at_items
-				 op_items mindef tycon
-	      }
-	; traceIf (text "buildClass" <+> ppr tycon) 
-	; return result }
+                                   (mkTyConApp rec_tycon (mkTyVarTys tvs))
+                                   rec_tycon
+
+        ; rhs <- if use_newtype
+                 then mkNewTyConRhs tycon_name rec_tycon dict_con
+                 else return (mkDataTyConRhs [dict_con])
+
+        ; let { clas_kind = mkPiKinds tvs constraintKind
+
+              ; tycon = mkClassTyCon tycon_name clas_kind tvs roles
+                                     rhs rec_clas tc_isrec
+                -- A class can be recursive, and in the case of newtypes 
+                -- this matters.  For example
+                --      class C a where { op :: C b => a -> b -> Int }
+                -- Because C has only one operation, it is represented by
+                -- a newtype, and it should be a *recursive* newtype.
+                -- [If we don't make it a recursive newtype, we'll expand the
+                -- newtype like a synonym, but that will lead to an infinite
+                -- type]
+
+              ; result = mkClass tvs fds 
+                                 sc_theta sc_sel_ids at_items
+                                 op_items mindef tycon
+              }
+        ; traceIf (text "buildClass" <+> ppr tycon) 
+        ; return result }
   where
     mk_op_item :: Class -> TcMethInfo -> TcRnIf n m ClassOpItem
     mk_op_item rec_clas (op_name, dm_spec, _) 
@@ -283,24 +277,24 @@ buildClass no_unf tycon_name tvs roles sc_theta fds at_items sig_stuff mindef tc
            ; dm_info <- case dm_spec of
                           NoDM      -> return NoDefMeth
                           GenericDM -> do { dm_name <- newImplicitBinder op_name mkGenDefMethodOcc
-			  	          ; return (GenDefMeth dm_name) }
+                                          ; return (GenDefMeth dm_name) }
                           VanillaDM -> do { dm_name <- newImplicitBinder op_name mkDefaultMethodOcc
-			  	          ; return (DefMeth dm_name) }
+                                          ; return (DefMeth dm_name) }
            ; return (mkDictSelId dflags no_unf op_name rec_clas, dm_info) }
 \end{code}
 
 Note [Class newtypes and equality predicates]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
-	class (a ~ F b) => C a b where
-	  op :: a -> b
+        class (a ~ F b) => C a b where
+          op :: a -> b
 
 We cannot represent this by a newtype, even though it's not
 existential, because there are two value fields (the equality
 predicate and op. See Trac #2238
 
 Moreover, 
-	  class (a ~ F b) => C a b where {}
+          class (a ~ F b) => C a b where {}
 Here we can't use a newtype either, even though there is only
 one field, because equality predicates are unboxed, and classes
 are boxed.
diff --git a/compiler/iface/IfaceEnv.lhs b/compiler/iface/IfaceEnv.lhs
index 1410675..7db4aa8 100644
--- a/compiler/iface/IfaceEnv.lhs
+++ b/compiler/iface/IfaceEnv.lhs
@@ -1,25 +1,19 @@
 (c) The University of Glasgow 2002-2006
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module IfaceEnv (
-	newGlobalBinder, newImplicitBinder, 
-	lookupIfaceTop,
-	lookupOrig, lookupOrigNameCache, extendNameCache,
-	newIfaceName, newIfaceNames,
-	extendIfaceIdEnv, extendIfaceTyVarEnv, 
-	tcIfaceLclId, tcIfaceTyVar, lookupIfaceTyVar,
+        newGlobalBinder, newImplicitBinder, 
+        lookupIfaceTop,
+        lookupOrig, lookupOrigNameCache, extendNameCache,
+        newIfaceName, newIfaceNames,
+        extendIfaceIdEnv, extendIfaceTyVarEnv, 
+        tcIfaceLclId, tcIfaceTyVar, lookupIfaceTyVar,
 
-	ifaceExportNames,
+        ifaceExportNames,
 
-	-- Name-cache stuff
-	allocateGlobalBinder, initNameCache, updNameCache,
+        -- Name-cache stuff
+        allocateGlobalBinder, initNameCache, updNameCache,
         getNameCache, mkNameCacheUpdater, NameCacheUpdater(..)
    ) where
 
@@ -50,9 +44,9 @@ import Data.IORef    ( atomicModifyIORef, readIORef )
 
 
 %*********************************************************
-%*							*
-	Allocating new Names in the Name Cache
-%*							*
+%*                                                      *
+        Allocating new Names in the Name Cache
+%*                                                      *
 %*********************************************************
 
 Note [The Name Cache]
@@ -82,7 +76,7 @@ newGlobalBinder :: Module -> OccName -> SrcSpan -> TcRnIf a b Name
 -- moment when we know its Module and SrcLoc in their full glory
 
 newGlobalBinder mod occ loc
-  = do mod `seq` occ `seq` return ()	-- See notes with lookupOrig
+  = do mod `seq` occ `seq` return ()    -- See notes with lookupOrig
 --     traceIf (text "newGlobalBinder" <+> ppr mod <+> ppr occ <+> ppr loc)
        updNameCache $ \name_cache ->
          allocateGlobalBinder name_cache mod occ loc
@@ -102,13 +96,13 @@ allocateGlobalBinder name_supply mod occ loc
         -- get different SrcLocs can can be reported as such.
         --
         -- Possible other reason: it might be in the cache because we
-        -- 	encountered an occurrence before the binding site for an
-        --	implicitly-imported Name.  Perhaps the current SrcLoc is
-        --	better... but not really: it'll still just say 'imported'
+        --      encountered an occurrence before the binding site for an
+        --      implicitly-imported Name.  Perhaps the current SrcLoc is
+        --      better... but not really: it'll still just say 'imported'
         --
         -- IMPORTANT: Don't mess with wired-in names.
-        -- 	      Their wired-in-ness is in their NameSort
-        --	      and their Module is correct.
+        --            Their wired-in-ness is in their NameSort
+        --            and their Module is correct.
 
         Just name | isWiredInName name -> (name_supply, name)
                   | mod /= iNTERACTIVE -> (new_name_supply, name')
@@ -138,20 +132,20 @@ for the new Name as for the old, hence this special case.
 See also Note [Outputable Orig RdrName] in HscTypes.
 -}
 
-newImplicitBinder :: Name			-- Base name
-	          -> (OccName -> OccName) 	-- Occurrence name modifier
-	          -> TcRnIf m n Name		-- Implicit name
+newImplicitBinder :: Name                       -- Base name
+                  -> (OccName -> OccName)       -- Occurrence name modifier
+                  -> TcRnIf m n Name            -- Implicit name
 -- Called in BuildTyCl to allocate the implicit binders of type/class decls
 -- For source type/class decls, this is the first occurrence
 -- For iface ones, the LoadIface has alrady allocated a suitable name in the cache
 newImplicitBinder base_name mk_sys_occ
   | Just mod <- nameModule_maybe base_name
   = newGlobalBinder mod occ loc
-  | otherwise	  	-- When typechecking a [d| decl bracket |], 
-    			-- TH generates types, classes etc with Internal names,
-			-- so we follow suit for the implicit binders
-  = do	{ uniq <- newUnique
-	; return (mkInternalName uniq occ loc) }
+  | otherwise           -- When typechecking a [d| decl bracket |], 
+                        -- TH generates types, classes etc with Internal names,
+                        -- so we follow suit for the implicit binders
+  = do  { uniq <- newUnique
+        ; return (mkInternalName uniq occ loc) }
   where
     occ = mk_sys_occ (nameOccName base_name)
     loc = nameSrcSpan base_name
@@ -161,19 +155,19 @@ ifaceExportNames exports = return exports
 
 lookupOrig :: Module -> OccName ->  TcRnIf a b Name
 lookupOrig mod occ
-  = do 	{ 	-- First ensure that mod and occ are evaluated
-		-- If not, chaos can ensue:
-		-- 	we read the name-cache
-		-- 	then pull on mod (say)
-		--	which does some stuff that modifies the name cache
-		-- This did happen, with tycon_mod in TcIface.tcIfaceAlt (DataAlt..)
-	  mod `seq` occ `seq` return ()	
---	; traceIf (text "lookup_orig" <+> ppr mod <+> ppr occ)
+  = do  {       -- First ensure that mod and occ are evaluated
+                -- If not, chaos can ensue:
+                --      we read the name-cache
+                --      then pull on mod (say)
+                --      which does some stuff that modifies the name cache
+                -- This did happen, with tycon_mod in TcIface.tcIfaceAlt (DataAlt..)
+          mod `seq` occ `seq` return () 
+--      ; traceIf (text "lookup_orig" <+> ppr mod <+> ppr occ)
 
         ; updNameCache $ \name_cache ->
             case lookupOrigNameCache (nsNames name_cache) mod occ of {
-	      Just name -> (name_cache, name);
-	      Nothing   ->
+              Just name -> (name_cache, name);
+              Nothing   ->
               case takeUniqFromSupply (nsUniqs name_cache) of {
               (uniq, us) ->
                   let
@@ -184,9 +178,9 @@ lookupOrig mod occ
 \end{code}
 
 %************************************************************************
-%*									*
-		Name cache access
-%*									*
+%*                                                                      *
+                Name cache access
+%*                                                                      *
 %************************************************************************
 
 See Note [The Name Cache] above.
@@ -196,21 +190,21 @@ lookupOrigNameCache :: OrigNameCache -> Module -> OccName -> Maybe Name
 lookupOrigNameCache _ mod occ
   -- Don't need to mention gHC_UNIT here because it is explicitly
   -- included in TysWiredIn.wiredInTyCons
-  | mod == gHC_TUPLE || mod == gHC_PRIM,		-- Boxed tuples from one, 
-    Just tup_info <- isTupleOcc_maybe occ	-- unboxed from the other
-  = 	-- Special case for tuples; there are too many
-	-- of them to pre-populate the original-name cache
+  | mod == gHC_TUPLE || mod == gHC_PRIM,                -- Boxed tuples from one, 
+    Just tup_info <- isTupleOcc_maybe occ       -- unboxed from the other
+  =     -- Special case for tuples; there are too many
+        -- of them to pre-populate the original-name cache
     Just (mk_tup_name tup_info)
   where
     mk_tup_name (ns, sort, arity)
-	| ns == tcName   = tyConName (tupleTyCon sort arity)
-	| ns == dataName = dataConName (tupleCon sort arity)
-	| otherwise      = Var.varName (dataConWorkId (tupleCon sort arity))
+        | ns == tcName   = tyConName (tupleTyCon sort arity)
+        | ns == dataName = dataConName (tupleCon sort arity)
+        | otherwise      = Var.varName (dataConWorkId (tupleCon sort arity))
 
-lookupOrigNameCache nc mod occ	-- The normal case
+lookupOrigNameCache nc mod occ  -- The normal case
   = case lookupModuleEnv nc mod of
-	Nothing      -> Nothing
-	Just occ_env -> lookupOccEnv occ_env occ
+        Nothing      -> Nothing
+        Just occ_env -> lookupOccEnv occ_env occ
 
 extendOrigNameCache :: OrigNameCache -> Name -> OrigNameCache
 extendOrigNameCache nc name 
@@ -225,7 +219,7 @@ extendNameCache nc mod occ name
 
 getNameCache :: TcRnIf a b NameCache
 getNameCache = do { HscEnv { hsc_NC = nc_var } <- getTopEnv; 
-		    readMutVar nc_var }
+                    readMutVar nc_var }
 
 updNameCache :: (NameCache -> (NameCache, c)) -> TcRnIf a b c
 updNameCache upd_fn = do
@@ -252,7 +246,7 @@ mkNameCacheUpdater = do
 initNameCache :: UniqSupply -> [Name] -> NameCache
 initNameCache us names
   = NameCache { nsUniqs = us,
-		nsNames = initOrigNames names }
+                nsNames = initOrigNames names }
 
 initOrigNames :: [Name] -> OrigNameCache
 initOrigNames names = foldl extendOrigNameCache emptyModuleEnv names
@@ -261,70 +255,70 @@ initOrigNames names = foldl extendOrigNameCache emptyModuleEnv names
 
 
 %************************************************************************
-%*									*
-		Type variables and local Ids
-%*									*
+%*                                                                      *
+                Type variables and local Ids
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 tcIfaceLclId :: FastString -> IfL Id
 tcIfaceLclId occ
-  = do	{ lcl <- getLclEnv
-	; case (lookupUFM (if_id_env lcl) occ) of
+  = do  { lcl <- getLclEnv
+        ; case (lookupUFM (if_id_env lcl) occ) of
             Just ty_var -> return ty_var
             Nothing     -> failIfM (text "Iface id out of scope: " <+> ppr occ)
         }
 
 extendIfaceIdEnv :: [Id] -> IfL a -> IfL a
 extendIfaceIdEnv ids thing_inside
-  = do	{ env <- getLclEnv
-	; let { id_env' = addListToUFM (if_id_env env) pairs
-	      ;	pairs   = [(occNameFS (getOccName id), id) | id <- ids] }
-	; setLclEnv (env { if_id_env = id_env' }) thing_inside }
+  = do  { env <- getLclEnv
+        ; let { id_env' = addListToUFM (if_id_env env) pairs
+              ; pairs   = [(occNameFS (getOccName id), id) | id <- ids] }
+        ; setLclEnv (env { if_id_env = id_env' }) thing_inside }
 
 
 tcIfaceTyVar :: FastString -> IfL TyVar
 tcIfaceTyVar occ
-  = do	{ lcl <- getLclEnv
-	; case (lookupUFM (if_tv_env lcl) occ) of
+  = do  { lcl <- getLclEnv
+        ; case (lookupUFM (if_tv_env lcl) occ) of
             Just ty_var -> return ty_var
             Nothing     -> failIfM (text "Iface type variable out of scope: " <+> ppr occ)
         }
 
 lookupIfaceTyVar :: FastString -> IfL (Maybe TyVar)
 lookupIfaceTyVar occ
-  = do	{ lcl <- getLclEnv
-	; return (lookupUFM (if_tv_env lcl) occ) }
+  = do  { lcl <- getLclEnv
+        ; return (lookupUFM (if_tv_env lcl) occ) }
 
 extendIfaceTyVarEnv :: [TyVar] -> IfL a -> IfL a
 extendIfaceTyVarEnv tyvars thing_inside
-  = do	{ env <- getLclEnv
-	; let { tv_env' = addListToUFM (if_tv_env env) pairs
-	      ;	pairs   = [(occNameFS (getOccName tv), tv) | tv <- tyvars] }
-	; setLclEnv (env { if_tv_env = tv_env' }) thing_inside }
+  = do  { env <- getLclEnv
+        ; let { tv_env' = addListToUFM (if_tv_env env) pairs
+              ; pairs   = [(occNameFS (getOccName tv), tv) | tv <- tyvars] }
+        ; setLclEnv (env { if_tv_env = tv_env' }) thing_inside }
 \end{code}
 
 
 %************************************************************************
-%*									*
-		Getting from RdrNames to Names
-%*									*
+%*                                                                      *
+                Getting from RdrNames to Names
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 lookupIfaceTop :: OccName -> IfL Name
 -- Look up a top-level name from the current Iface module
 lookupIfaceTop occ
-  = do	{ env <- getLclEnv; lookupOrig (if_mod env) occ }
+  = do  { env <- getLclEnv; lookupOrig (if_mod env) occ }
 
 newIfaceName :: OccName -> IfL Name
 newIfaceName occ
-  = do	{ uniq <- newUnique
-	; return $! mkInternalName uniq occ noSrcSpan }
+  = do  { uniq <- newUnique
+        ; return $! mkInternalName uniq occ noSrcSpan }
 
 newIfaceNames :: [OccName] -> IfL [Name]
 newIfaceNames occs
-  = do	{ uniqs <- newUniqueSupply
-	; return [ mkInternalName uniq occ noSrcSpan
-		 | (occ,uniq) <- occs `zip` uniqsFromSupply uniqs] }
+  = do  { uniqs <- newUniqueSupply
+        ; return [ mkInternalName uniq occ noSrcSpan
+                 | (occ,uniq) <- occs `zip` uniqsFromSupply uniqs] }
 \end{code}
diff --git a/compiler/iface/IfaceSyn.lhs b/compiler/iface/IfaceSyn.lhs
index 28098ae..174b37b 100644
--- a/compiler/iface/IfaceSyn.lhs
+++ b/compiler/iface/IfaceSyn.lhs
@@ -4,12 +4,6 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module IfaceSyn (
         module IfaceType,
@@ -632,12 +626,12 @@ data IfaceExpr
   | IfaceExt    IfExtName
   | IfaceType   IfaceType
   | IfaceCo     IfaceCoercion
-  | IfaceTuple 	TupleSort [IfaceExpr]	-- Saturated; type arguments omitted
-  | IfaceLam 	IfaceBndr IfaceExpr
-  | IfaceApp 	IfaceExpr IfaceExpr
-  | IfaceCase	IfaceExpr IfLclName [IfaceAlt]
+  | IfaceTuple  TupleSort [IfaceExpr]   -- Saturated; type arguments omitted
+  | IfaceLam    IfaceBndr IfaceExpr
+  | IfaceApp    IfaceExpr IfaceExpr
+  | IfaceCase   IfaceExpr IfLclName [IfaceAlt]
   | IfaceECase  IfaceExpr IfaceType     -- See Note [Empty case alternatives]
-  | IfaceLet	IfaceBinding  IfaceExpr
+  | IfaceLet    IfaceBinding  IfaceExpr
   | IfaceCast   IfaceExpr IfaceCoercion
   | IfaceLit    Literal
   | IfaceFCall  ForeignCall IfaceType
@@ -1203,15 +1197,15 @@ pprIfaceExpr add_par (IfaceECase scrut ty)
 
 pprIfaceExpr add_par (IfaceCase scrut bndr [(con, bs, rhs)])
   = add_par (sep [ptext (sLit "case") 
-			<+> pprIfaceExpr noParens scrut <+> ptext (sLit "of") 
-			<+> ppr bndr <+> char '{' <+> ppr_con_bs con bs <+> arrow,
-  		  pprIfaceExpr noParens rhs <+> char '}'])
+                        <+> pprIfaceExpr noParens scrut <+> ptext (sLit "of") 
+                        <+> ppr bndr <+> char '{' <+> ppr_con_bs con bs <+> arrow,
+                  pprIfaceExpr noParens rhs <+> char '}'])
 
 pprIfaceExpr add_par (IfaceCase scrut bndr alts)
   = add_par (sep [ptext (sLit "case") 
-		 	<+> pprIfaceExpr noParens scrut <+> ptext (sLit "of") 
-			<+> ppr bndr <+> char '{',
-  		  nest 2 (sep (map ppr_alt alts)) <+> char '}'])
+                        <+> pprIfaceExpr noParens scrut <+> ptext (sLit "of") 
+                        <+> ppr bndr <+> char '{',
+                  nest 2 (sep (map ppr_alt alts)) <+> char '}'])
 
 pprIfaceExpr _       (IfaceCast expr co)
   = sep [pprParendIfaceExpr expr,
diff --git a/compiler/main/PprTyThing.hs b/compiler/main/PprTyThing.hs
index 947d8b2..cba8ea0 100644
--- a/compiler/main/PprTyThing.hs
+++ b/compiler/main/PprTyThing.hs
@@ -6,20 +6,14 @@
 --
 -----------------------------------------------------------------------------
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module PprTyThing (
-	pprTyThing,
-	pprTyThingInContext, 
-	pprTyThingLoc,
-	pprTyThingInContextLoc,
-	pprTyThingHdr,
-  	pprTypeForUser
+        pprTyThing,
+        pprTyThingInContext, 
+        pprTyThingLoc,
+        pprTyThingInContextLoc,
+        pprTyThingHdr,
+        pprTypeForUser
   ) where
 
 import qualified GHC
@@ -120,8 +114,8 @@ pprTyConHdr tyCon
     <+> pprTvBndrs (suppressKinds dflags (tyConKind tyCon) vars)
   where
     vars | GHC.isPrimTyCon tyCon ||
-	   GHC.isFunTyCon tyCon = take (GHC.tyConArity tyCon) GHC.alphaTyVars
-	 | otherwise = GHC.tyConTyVars tyCon
+           GHC.isFunTyCon tyCon = take (GHC.tyConArity tyCon) GHC.alphaTyVars
+         | otherwise = GHC.tyConTyVars tyCon
 
     keyword | GHC.isSynTyCon tyCon = sLit "type"
             | GHC.isNewTyCon tyCon = sLit "newtype"
@@ -131,9 +125,9 @@ pprTyConHdr tyCon
       | GHC.isFamilyTyCon tyCon = ptext (sLit "family")
       | otherwise             = empty
 
-    opt_stupid 	-- The "stupid theta" part of the declaration
-	| isAlgTyCon tyCon = GHC.pprThetaArrowTy (tyConStupidTheta tyCon)
-	| otherwise	   = empty	-- Returns 'empty' if null theta
+    opt_stupid  -- The "stupid theta" part of the declaration
+        | isAlgTyCon tyCon = GHC.pprThetaArrowTy (tyConStupidTheta tyCon)
+        | otherwise        = empty      -- Returns 'empty' if null theta
 
 pprDataConSig :: GHC.DataCon -> SDoc
 pprDataConSig dataCon
@@ -153,17 +147,17 @@ pprClassHdr cls
 pprId :: Var -> SDoc
 pprId ident
   = hang (ppr_bndr ident <+> dcolon)
-	 2 (pprTypeForUser (GHC.idType ident))
+         2 (pprTypeForUser (GHC.idType ident))
 
 pprTypeForUser :: GHC.Type -> SDoc
 -- We do two things here.
 -- a) We tidy the type, regardless
 -- b) If Opt_PrintExplicitForAlls is True, we discard the foralls
--- 	but we do so `deeply'
+--      but we do so `deeply'
 -- Prime example: a class op might have type
---	forall a. C a => forall b. Ord b => stuff
+--      forall a. C a => forall b. Ord b => stuff
 -- Then we want to display
---	(C a, Ord b) => stuff
+--      (C a, Ord b) => stuff
 pprTypeForUser ty
   = sdocWithDynFlags $ \ dflags ->
     if gopt Opt_PrintExplicitForalls dflags
@@ -206,9 +200,9 @@ pprTyCon ss tyCon
 pprAlgTyCon :: ShowSub -> TyCon -> SDoc
 pprAlgTyCon ss tyCon
   | gadt      = pprTyConHdr tyCon <+> ptext (sLit "where") $$
-		   nest 2 (vcat (ppr_trim (map show_con datacons)))
+                   nest 2 (vcat (ppr_trim (map show_con datacons)))
   | otherwise = hang (pprTyConHdr tyCon)
-    		   2 (add_bars (ppr_trim (map show_con datacons)))
+                   2 (add_bars (ppr_trim (map show_con datacons)))
   where
     datacons = GHC.tyConDataCons tyCon
     gadt = any (not . GHC.isVanillaDataCon) datacons
@@ -222,8 +216,8 @@ pprDataConDecl :: ShowSub -> Bool -> GHC.DataCon -> SDoc
 pprDataConDecl ss gadt_style dataCon
   | not gadt_style = ppr_fields tys_w_strs
   | otherwise      = ppr_bndr dataCon <+> dcolon <+>
-			sep [ pp_foralls, GHC.pprThetaArrowTy theta, pp_tau ]
-	-- Printing out the dataCon as a type signature, in GADT style
+                        sep [ pp_foralls, GHC.pprThetaArrowTy theta, pp_tau ]
+        -- Printing out the dataCon as a type signature, in GADT style
   where
     (forall_tvs, theta, tau) = tcSplitSigmaTy (GHC.dataConUserType dataCon)
     (arg_tys, res_ty)        = tcSplitFunTys tau
@@ -248,18 +242,18 @@ pprDataConDecl ss gadt_style dataCon
     user_ify bang                      = bang
 
     maybe_show_label (lbl,bty)
-	| showSub ss lbl = Just (ppr_bndr lbl <+> dcolon <+> pprBangTy bty)
-	| otherwise      = Nothing
+        | showSub ss lbl = Just (ppr_bndr lbl <+> dcolon <+> pprBangTy bty)
+        | otherwise      = Nothing
 
     ppr_fields [ty1, ty2]
-	| GHC.dataConIsInfix dataCon && null labels
-	= sep [pprParendBangTy ty1, pprInfixName dataCon, pprParendBangTy ty2]
+        | GHC.dataConIsInfix dataCon && null labels
+        = sep [pprParendBangTy ty1, pprInfixName dataCon, pprParendBangTy ty2]
     ppr_fields fields
-	| null labels
-	= ppr_bndr dataCon <+> sep (map pprParendBangTy fields)
-	| otherwise
-	= ppr_bndr dataCon
-	  <+> (braces $ sep $ punctuate comma $ ppr_trim $
+        | null labels
+        = ppr_bndr dataCon <+> sep (map pprParendBangTy fields)
+        | otherwise
+        = ppr_bndr dataCon
+          <+> (braces $ sep $ punctuate comma $ ppr_trim $
                map maybe_show_label (zip labels fields))
 
 pprClass :: ShowSub -> GHC.Class -> SDoc
@@ -274,7 +268,7 @@ pprClass ss cls
     methods  = GHC.classMethods cls
     assoc_ts = GHC.classATs cls
     show_meth id | showSub ss id  = Just (pprClassMethod id)
-	         | otherwise      = Nothing
+                 | otherwise      = Nothing
     show_at tc = case showSub_maybe ss tc of
                       Just ss' -> Just (pprTyCon ss' tc)
                       Nothing  -> Nothing
@@ -287,12 +281,12 @@ pprClassMethod id
   -- from the class op type.  Stolen from IfaceSyn.tyThingToIfaceDecl.
   --
   -- It's important to tidy it *before* splitting it up, so that if
-  -- we have	class C a b where
-  --	          op :: forall a. a -> b
+  -- we have    class C a b where
+  --              op :: forall a. a -> b
   -- then the inner forall on op gets renamed to a1, and we print
   -- (when dropping foralls)
-  --		class C a b where
-  --		  op :: a1 -> b
+  --            class C a b where
+  --              op :: a1 -> b
 
   tidy_sel_ty = tidyTopType (GHC.idType id)
   (_sel_tyvars, rho_ty) = GHC.splitForAllTys tidy_sel_ty
@@ -319,7 +313,7 @@ ppr_bndr a = GHC.pprParenSymName a
 showWithLoc :: SDoc -> SDoc -> SDoc
 showWithLoc loc doc
     = hang doc 2 (char '\t' <> comment <+> loc)
-		-- The tab tries to make them line up a bit
+                -- The tab tries to make them line up a bit
   where
     comment = ptext (sLit "--")
 
diff --git a/compiler/nativeGen/PPC/Cond.hs b/compiler/nativeGen/PPC/Cond.hs
index b8c5208..0c525f8 100644
--- a/compiler/nativeGen/PPC/Cond.hs
+++ b/compiler/nativeGen/PPC/Cond.hs
@@ -1,17 +1,11 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module PPC.Cond (
-	Cond(..),
-	condNegate,
-	condUnsigned,
-	condToSigned,
-	condToUnsigned,
+        Cond(..),
+        condNegate,
+        condUnsigned,
+        condToSigned,
+        condToUnsigned,
 )
 
 where
@@ -19,18 +13,18 @@ where
 import Panic
 
 data Cond
-	= ALWAYS
-	| EQQ
-	| GE
-	| GEU
-	| GTT
-	| GU
-	| LE
-	| LEU
-	| LTT
-	| LU
-	| NE
-	deriving Eq
+        = ALWAYS
+        | EQQ
+        | GE
+        | GEU
+        | GTT
+        | GU
+        | LE
+        | LEU
+        | LTT
+        | LU
+        | NE
+        deriving Eq
 
 
 condNegate :: Cond -> Cond
diff --git a/compiler/nativeGen/PPC/RegInfo.hs b/compiler/nativeGen/PPC/RegInfo.hs
index 8b35d87..2bf4091 100644
--- a/compiler/nativeGen/PPC/RegInfo.hs
+++ b/compiler/nativeGen/PPC/RegInfo.hs
@@ -6,19 +6,13 @@
 --
 -----------------------------------------------------------------------------
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module PPC.RegInfo (
         JumpDest( DestBlockId ), getJumpDestBlockId,
-	canShortcut, 
-	shortcutJump, 
+        canShortcut, 
+        shortcutJump, 
 
-	shortcutStatics
+        shortcutStatics
 )
 
 where
@@ -69,9 +63,9 @@ shortcutStatic _ other_static
         = other_static
 
 shortBlockId 
-	:: (BlockId -> Maybe JumpDest)
-	-> BlockId
-	-> CLabel
+        :: (BlockId -> Maybe JumpDest)
+        -> BlockId
+        -> CLabel
 
 shortBlockId fn blockid =
    case fn blockid of
diff --git a/compiler/nativeGen/Reg.hs b/compiler/nativeGen/Reg.hs
index fee74be..0633e59 100644
--- a/compiler/nativeGen/Reg.hs
+++ b/compiler/nativeGen/Reg.hs
@@ -1,36 +1,30 @@
 
 -- | An architecture independent description of a register.
---	This needs to stay architecture independent because it is used
---	by NCGMonad and the register allocators, which are shared
---	by all architectures.
+--      This needs to stay architecture independent because it is used
+--      by NCGMonad and the register allocators, which are shared
+--      by all architectures.
 --
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module Reg (
-	RegNo,
-	Reg(..),
-	regPair,
-	regSingle,
-	isRealReg,	takeRealReg,
-	isVirtualReg,	takeVirtualReg,
-	
-	VirtualReg(..),
-	renameVirtualReg,
-	classOfVirtualReg,
-	getHiVirtualRegFromLo,
-	getHiVRegFromLo,
-
-	RealReg(..),
-	regNosOfRealReg,
-	realRegsAlias,
-	
-	liftPatchFnToRegReg
+        RegNo,
+        Reg(..),
+        regPair,
+        regSingle,
+        isRealReg,      takeRealReg,
+        isVirtualReg,   takeVirtualReg,
+        
+        VirtualReg(..),
+        renameVirtualReg,
+        classOfVirtualReg,
+        getHiVirtualRegFromLo,
+        getHiVRegFromLo,
+
+        RealReg(..),
+        regNosOfRealReg,
+        realRegsAlias,
+        
+        liftPatchFnToRegReg
 )
 
 where
@@ -42,67 +36,67 @@ import Data.List
 
 -- | An identifier for a primitive real machine register.
 type RegNo 
-	= Int
+        = Int
 
 -- VirtualRegs are virtual registers.  The register allocator will
--- 	eventually have to map them into RealRegs, or into spill slots.
+--      eventually have to map them into RealRegs, or into spill slots.
 --
--- 	VirtualRegs are allocated on the fly, usually to represent a single
--- 	value in the abstract assembly code (i.e. dynamic registers are
--- 	usually single assignment).  
+--      VirtualRegs are allocated on the fly, usually to represent a single
+--      value in the abstract assembly code (i.e. dynamic registers are
+--      usually single assignment).  
 --
---	The  single assignment restriction isn't necessary to get correct code,
--- 	although a better register allocation will result if single
--- 	assignment is used -- because the allocator maps a VirtualReg into
--- 	a single RealReg, even if the VirtualReg has multiple live ranges.
+--      The  single assignment restriction isn't necessary to get correct code,
+--      although a better register allocation will result if single
+--      assignment is used -- because the allocator maps a VirtualReg into
+--      a single RealReg, even if the VirtualReg has multiple live ranges.
 --
--- 	Virtual regs can be of either class, so that info is attached.
+--      Virtual regs can be of either class, so that info is attached.
 --
 data VirtualReg
-	= VirtualRegI  {-# UNPACK #-} !Unique
-	| VirtualRegHi {-# UNPACK #-} !Unique  -- High part of 2-word register
-	| VirtualRegF  {-# UNPACK #-} !Unique
-	| VirtualRegD  {-# UNPACK #-} !Unique
-	| VirtualRegSSE {-# UNPACK #-} !Unique
-	deriving (Eq, Show, Ord)
+        = VirtualRegI  {-# UNPACK #-} !Unique
+        | VirtualRegHi {-# UNPACK #-} !Unique  -- High part of 2-word register
+        | VirtualRegF  {-# UNPACK #-} !Unique
+        | VirtualRegD  {-# UNPACK #-} !Unique
+        | VirtualRegSSE {-# UNPACK #-} !Unique
+        deriving (Eq, Show, Ord)
 
 instance Uniquable VirtualReg where
-	getUnique reg
-	 = case reg of
-	 	VirtualRegI u	-> u
-		VirtualRegHi u	-> u
-		VirtualRegF u	-> u
-		VirtualRegD u	-> u
-		VirtualRegSSE u	-> u
+        getUnique reg
+         = case reg of
+                VirtualRegI u   -> u
+                VirtualRegHi u  -> u
+                VirtualRegF u   -> u
+                VirtualRegD u   -> u
+                VirtualRegSSE u -> u
 
 instance Outputable VirtualReg where
-	ppr reg
-	 = case reg of
-		VirtualRegI  u  -> text "%vI_" 	<> pprUnique u
-		VirtualRegHi u  -> text "%vHi_" <> pprUnique u
-		VirtualRegF  u  -> text "%vF_" 	<> pprUnique u
-		VirtualRegD  u  -> text "%vD_" 	<> pprUnique u
-		VirtualRegSSE u -> text "%vSSE_" <> pprUnique u
+        ppr reg
+         = case reg of
+                VirtualRegI  u  -> text "%vI_"  <> pprUnique u
+                VirtualRegHi u  -> text "%vHi_" <> pprUnique u
+                VirtualRegF  u  -> text "%vF_"  <> pprUnique u
+                VirtualRegD  u  -> text "%vD_"  <> pprUnique u
+                VirtualRegSSE u -> text "%vSSE_" <> pprUnique u
 
 
 renameVirtualReg :: Unique -> VirtualReg -> VirtualReg
 renameVirtualReg u r
  = case r of
-	VirtualRegI _	-> VirtualRegI  u
-	VirtualRegHi _	-> VirtualRegHi u
-	VirtualRegF _	-> VirtualRegF  u
-	VirtualRegD _	-> VirtualRegD  u
-	VirtualRegSSE _	-> VirtualRegSSE u
+        VirtualRegI _   -> VirtualRegI  u
+        VirtualRegHi _  -> VirtualRegHi u
+        VirtualRegF _   -> VirtualRegF  u
+        VirtualRegD _   -> VirtualRegD  u
+        VirtualRegSSE _ -> VirtualRegSSE u
 
 
 classOfVirtualReg :: VirtualReg -> RegClass
 classOfVirtualReg vr
  = case vr of
- 	VirtualRegI{}	-> RcInteger
-	VirtualRegHi{}	-> RcInteger
-	VirtualRegF{}	-> RcFloat
-	VirtualRegD{}	-> RcDouble
-	VirtualRegSSE{}	-> RcDoubleSSE
+        VirtualRegI{}   -> RcInteger
+        VirtualRegHi{}  -> RcInteger
+        VirtualRegF{}   -> RcFloat
+        VirtualRegD{}   -> RcDouble
+        VirtualRegSSE{} -> RcDoubleSSE
 
 
 -- Determine the upper-half vreg for a 64-bit quantity on a 32-bit platform
@@ -111,118 +105,118 @@ classOfVirtualReg vr
 getHiVirtualRegFromLo :: VirtualReg -> VirtualReg
 getHiVirtualRegFromLo reg
  = case reg of
-	-- makes a pseudo-unique with tag 'H'
- 	VirtualRegI u	-> VirtualRegHi (newTagUnique u 'H') 
-	_		-> panic "Reg.getHiVirtualRegFromLo"
+        -- makes a pseudo-unique with tag 'H'
+        VirtualRegI u   -> VirtualRegHi (newTagUnique u 'H') 
+        _               -> panic "Reg.getHiVirtualRegFromLo"
 
 getHiVRegFromLo :: Reg -> Reg
 getHiVRegFromLo reg
  = case reg of
- 	RegVirtual  vr	-> RegVirtual (getHiVirtualRegFromLo vr)
-	RegReal _	-> panic "Reg.getHiVRegFromLo"
- 	
+        RegVirtual  vr  -> RegVirtual (getHiVirtualRegFromLo vr)
+        RegReal _       -> panic "Reg.getHiVRegFromLo"
+        
 
 ------------------------------------------------------------------------------------
 -- | RealRegs are machine regs which are available for allocation, in
--- 	the usual way.  We know what class they are, because that's part of
--- 	the processor's architecture.
+--      the usual way.  We know what class they are, because that's part of
+--      the processor's architecture.
 --
--- 	RealRegPairs are pairs of real registers that are allocated together
---	to hold a larger value, such as with Double regs on SPARC.
+--      RealRegPairs are pairs of real registers that are allocated together
+--      to hold a larger value, such as with Double regs on SPARC.
 --
 data RealReg
-	= RealRegSingle	{-# UNPACK #-} !RegNo
-	| RealRegPair	{-# UNPACK #-} !RegNo {-# UNPACK #-} !RegNo
-	deriving (Eq, Show, Ord)
+        = RealRegSingle {-# UNPACK #-} !RegNo
+        | RealRegPair   {-# UNPACK #-} !RegNo {-# UNPACK #-} !RegNo
+        deriving (Eq, Show, Ord)
 
 instance Uniquable RealReg where
-	getUnique reg
-	 = case reg of
-	 	RealRegSingle i		-> mkRegSingleUnique i
-		RealRegPair r1 r2	-> mkRegPairUnique (r1 * 65536 + r2)
+        getUnique reg
+         = case reg of
+                RealRegSingle i         -> mkRegSingleUnique i
+                RealRegPair r1 r2       -> mkRegPairUnique (r1 * 65536 + r2)
 
 instance Outputable RealReg where
-	ppr reg
-	 = case reg of
-	 	RealRegSingle i		-> text "%r" 	<> int i
-		RealRegPair r1 r2	-> text "%r(" <> int r1 <> text "|" <> int r2 <> text ")"
+        ppr reg
+         = case reg of
+                RealRegSingle i         -> text "%r"    <> int i
+                RealRegPair r1 r2       -> text "%r(" <> int r1 <> text "|" <> int r2 <> text ")"
 
 regNosOfRealReg :: RealReg -> [RegNo]
 regNosOfRealReg rr
  = case rr of
- 	RealRegSingle r1	-> [r1]
-	RealRegPair   r1 r2	-> [r1, r2]
-	
+        RealRegSingle r1        -> [r1]
+        RealRegPair   r1 r2     -> [r1, r2]
+        
 
 realRegsAlias :: RealReg -> RealReg -> Bool
 realRegsAlias rr1 rr2
-	= not $ null $ intersect (regNosOfRealReg rr1) (regNosOfRealReg rr2)
+        = not $ null $ intersect (regNosOfRealReg rr1) (regNosOfRealReg rr2)
 
 --------------------------------------------------------------------------------
 -- | A register, either virtual or real
 data Reg
-	= RegVirtual !VirtualReg
-	| RegReal    !RealReg
-	deriving (Eq, Ord)
+        = RegVirtual !VirtualReg
+        | RegReal    !RealReg
+        deriving (Eq, Ord)
 
 regSingle :: RegNo -> Reg
-regSingle regNo		= RegReal $ RealRegSingle regNo
+regSingle regNo         = RegReal $ RealRegSingle regNo
 
 regPair :: RegNo -> RegNo -> Reg
-regPair regNo1 regNo2	= RegReal $ RealRegPair regNo1 regNo2
+regPair regNo1 regNo2   = RegReal $ RealRegPair regNo1 regNo2
 
 
 -- We like to have Uniques for Reg so that we can make UniqFM and UniqSets 
 -- in the register allocator.
 instance Uniquable Reg where
-	getUnique reg
-	 = case reg of
-	 	RegVirtual vr	-> getUnique vr
-		RegReal    rr	-> getUnique rr
-	
+        getUnique reg
+         = case reg of
+                RegVirtual vr   -> getUnique vr
+                RegReal    rr   -> getUnique rr
+        
 -- | Print a reg in a generic manner
---	If you want the architecture specific names, then use the pprReg 
---	function from the appropriate Ppr module.
+--      If you want the architecture specific names, then use the pprReg 
+--      function from the appropriate Ppr module.
 instance Outputable Reg where
-	ppr reg
-	 = case reg of
-	 	RegVirtual vr	-> ppr vr
-		RegReal    rr	-> ppr rr
+        ppr reg
+         = case reg of
+                RegVirtual vr   -> ppr vr
+                RegReal    rr   -> ppr rr
 
 
 isRealReg :: Reg -> Bool
 isRealReg reg 
  = case reg of
- 	RegReal _	-> True
-	RegVirtual _	-> False
+        RegReal _       -> True
+        RegVirtual _    -> False
 
 takeRealReg :: Reg -> Maybe RealReg
 takeRealReg reg
  = case reg of
- 	RegReal rr	-> Just rr
-	_		-> Nothing
+        RegReal rr      -> Just rr
+        _               -> Nothing
 
 
 isVirtualReg :: Reg -> Bool
 isVirtualReg reg
  = case reg of
- 	RegReal _	-> False
-	RegVirtual _	-> True
+        RegReal _       -> False
+        RegVirtual _    -> True
 
 takeVirtualReg :: Reg -> Maybe VirtualReg
 takeVirtualReg reg
  = case reg of
- 	RegReal _	-> Nothing
-	RegVirtual vr	-> Just vr
+        RegReal _       -> Nothing
+        RegVirtual vr   -> Just vr
 
 
 -- | The patch function supplied by the allocator maps VirtualReg to RealReg
---	regs, but sometimes we want to apply it to plain old Reg.
+--      regs, but sometimes we want to apply it to plain old Reg.
 --
 liftPatchFnToRegReg  :: (VirtualReg -> RealReg) -> (Reg -> Reg)
 liftPatchFnToRegReg patchF reg
  = case reg of
- 	RegVirtual vr	-> RegReal (patchF vr)
-	RegReal _	-> reg
-	
+        RegVirtual vr   -> RegReal (patchF vr)
+        RegReal _       -> reg
+        
 
diff --git a/compiler/nativeGen/RegClass.hs b/compiler/nativeGen/RegClass.hs
index 7ccc0c1..1494376 100644
--- a/compiler/nativeGen/RegClass.hs
+++ b/compiler/nativeGen/RegClass.hs
@@ -1,41 +1,35 @@
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 
 -- | An architecture independent description of a register's class.
 module RegClass 
-	( RegClass (..) )
+        ( RegClass (..) )
 
 where
 
-import	Outputable
-import	Unique
+import  Outputable
+import  Unique
 
 
 -- | The class of a register. 
---	Used in the register allocator.
---	We treat all registers in a class as being interchangable.
+--      Used in the register allocator.
+--      We treat all registers in a class as being interchangable.
 --
 data RegClass 
-	= RcInteger 
-	| RcFloat
-	| RcDouble
-	| RcDoubleSSE -- x86 only: the SSE regs are a separate class
-	deriving Eq
+        = RcInteger 
+        | RcFloat
+        | RcDouble
+        | RcDoubleSSE -- x86 only: the SSE regs are a separate class
+        deriving Eq
 
 
 instance Uniquable RegClass where
-    getUnique RcInteger	= mkRegClassUnique 0
-    getUnique RcFloat	= mkRegClassUnique 1
-    getUnique RcDouble	= mkRegClassUnique 2
+    getUnique RcInteger = mkRegClassUnique 0
+    getUnique RcFloat   = mkRegClassUnique 1
+    getUnique RcDouble  = mkRegClassUnique 2
     getUnique RcDoubleSSE = mkRegClassUnique 3
 
 instance Outputable RegClass where
-    ppr RcInteger	= Outputable.text "I"
-    ppr RcFloat		= Outputable.text "F"
-    ppr RcDouble	= Outputable.text "D"
-    ppr RcDoubleSSE	= Outputable.text "S"
+    ppr RcInteger       = Outputable.text "I"
+    ppr RcFloat         = Outputable.text "F"
+    ppr RcDouble        = Outputable.text "D"
+    ppr RcDoubleSSE     = Outputable.text "S"
diff --git a/compiler/nativeGen/SPARC/CodeGen/Amode.hs b/compiler/nativeGen/SPARC/CodeGen/Amode.hs
index 324eda9..927ed7b 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Amode.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Amode.hs
@@ -1,13 +1,7 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.CodeGen.Amode (
-	getAmode
+        getAmode
 )
 
 where
@@ -29,8 +23,8 @@ import OrdList
 
 -- | Generate code to reference a memory address.
 getAmode 
-	:: CmmExpr 	-- ^ expr producing an address
-	-> NatM Amode
+        :: CmmExpr      -- ^ expr producing an address
+        -> NatM Amode
 
 getAmode tree@(CmmRegOff _ _) 
     = do dflags <- getDynFlags
@@ -50,7 +44,7 @@ getAmode (CmmMachOp (MO_Add _) [x, CmmLit (CmmInt i _)])
   = do
        (reg, code) <- getSomeReg x
        let
-     	 off  = ImmInt (fromInteger i)
+         off  = ImmInt (fromInteger i)
        return (Amode (AddrRegImm reg off) code)
 
 getAmode (CmmMachOp (MO_Add _) [x, y])
@@ -58,23 +52,23 @@ getAmode (CmmMachOp (MO_Add _) [x, y])
     (regX, codeX) <- getSomeReg x
     (regY, codeY) <- getSomeReg y
     let
-    	code = codeX `appOL` codeY
+        code = codeX `appOL` codeY
     return (Amode (AddrRegReg regX regY) code)
 
 getAmode (CmmLit lit)
   = do
-	let imm__2	= litToImm lit
-	tmp1 	<- getNewRegNat II32
-	tmp2	<- getNewRegNat II32
+        let imm__2      = litToImm lit
+        tmp1    <- getNewRegNat II32
+        tmp2    <- getNewRegNat II32
 
-	let code = toOL	[ SETHI (HI imm__2) tmp1
-			, OR    False tmp1 (RIImm (LO imm__2)) tmp2]
-		
-	return (Amode (AddrRegReg tmp2 g0) code)
+        let code = toOL [ SETHI (HI imm__2) tmp1
+                        , OR    False tmp1 (RIImm (LO imm__2)) tmp2]
+                
+        return (Amode (AddrRegReg tmp2 g0) code)
 
 getAmode other
   = do
        (reg, code) <- getSomeReg other
        let
-    	    off  = ImmInt 0
+            off  = ImmInt 0
        return (Amode (AddrRegImm reg off) code)
diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs
index 03b31e0..1cac698 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Base.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs
@@ -1,22 +1,16 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.CodeGen.Base (
-	InstrBlock,
-	CondCode(..),
-	ChildCode64(..),
-	Amode(..),
-
-	Register(..),
-	setSizeOfRegister,
-	
-	getRegisterReg,
-	mangleIndexTree
+        InstrBlock,
+        CondCode(..),
+        ChildCode64(..),
+        Amode(..),
+
+        Register(..),
+        setSizeOfRegister,
+        
+        getRegisterReg,
+        mangleIndexTree
 )
 
 where
@@ -39,63 +33,63 @@ import OrdList
 
 --------------------------------------------------------------------------------
 -- | 'InstrBlock's are the insn sequences generated by the insn selectors.
--- 	They are really trees of insns to facilitate fast appending, where a
--- 	left-to-right traversal yields the insns in the correct	order.
+--      They are really trees of insns to facilitate fast appending, where a
+--      left-to-right traversal yields the insns in the correct order.
 --
 type InstrBlock 
-	= OrdList Instr
+        = OrdList Instr
 
 
 -- | Condition codes passed up the tree.
 --
-data CondCode 	
-	= CondCode Bool Cond InstrBlock
+data CondCode   
+        = CondCode Bool Cond InstrBlock
 
 
 -- | a.k.a "Register64"
---	Reg is the lower 32-bit temporary which contains the result. 
---	Use getHiVRegFromLo to find the other VRegUnique.  
+--      Reg is the lower 32-bit temporary which contains the result. 
+--      Use getHiVRegFromLo to find the other VRegUnique.  
 --
---	Rules of this simplified insn selection game are therefore that
---	the returned Reg may be modified
+--      Rules of this simplified insn selection game are therefore that
+--      the returned Reg may be modified
 --
-data ChildCode64 	
+data ChildCode64        
    = ChildCode64 
         InstrBlock
-        Reg	 	
+        Reg             
 
 
 -- | Holds code that references a memory address.
 data Amode 
-	= Amode 
-		-- the AddrMode we can use in the instruction 
-		--	that does the real load\/store.
-		AddrMode 	
+        = Amode 
+                -- the AddrMode we can use in the instruction 
+                --      that does the real load\/store.
+                AddrMode        
 
-		-- other setup code we have to run first before we can use the
-		--	above AddrMode.
-		InstrBlock	
+                -- other setup code we have to run first before we can use the
+                --      above AddrMode.
+                InstrBlock      
 
 
 
 --------------------------------------------------------------------------------
 -- | Code to produce a result into a register.
---	If the result must go in a specific register, it comes out as Fixed.
---	Otherwise, the parent can decide which register to put it in.
+--      If the result must go in a specific register, it comes out as Fixed.
+--      Otherwise, the parent can decide which register to put it in.
 --
 data Register
-	= Fixed	Size Reg InstrBlock
-	| Any	Size (Reg -> InstrBlock)
+        = Fixed Size Reg InstrBlock
+        | Any   Size (Reg -> InstrBlock)
 
 
 -- | Change the size field in a Register.
 setSizeOfRegister
-	:: Register -> Size -> Register
+        :: Register -> Size -> Register
 
 setSizeOfRegister reg size
  = case reg of
- 	Fixed _ reg code 	-> Fixed size reg code
-	Any _ codefn     	-> Any   size codefn
+        Fixed _ reg code        -> Fixed size reg code
+        Any _ codefn            -> Any   size codefn
 
 
 --------------------------------------------------------------------------------
@@ -103,7 +97,7 @@ setSizeOfRegister reg size
 getRegisterReg :: Platform -> CmmReg -> Reg
 
 getRegisterReg _ (CmmLocal (LocalReg u pk))
-  	= RegVirtual $ mkVirtualReg u (cmmTypeSize pk)
+        = RegVirtual $ mkVirtualReg u (cmmTypeSize pk)
 
 getRegisterReg platform (CmmGlobal mid)
   = case globalRegMaybe platform mid of
@@ -118,11 +112,11 @@ getRegisterReg platform (CmmGlobal mid)
 mangleIndexTree :: DynFlags -> CmmExpr -> CmmExpr
 
 mangleIndexTree dflags (CmmRegOff reg off)
-	= CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)]
-	where width = typeWidth (cmmRegType dflags reg)
+        = CmmMachOp (MO_Add width) [CmmReg reg, CmmLit (CmmInt (fromIntegral off) width)]
+        where width = typeWidth (cmmRegType dflags reg)
 
 mangleIndexTree _ _
-	= panic "SPARC.CodeGen.Base.mangleIndexTree: no match"
+        = panic "SPARC.CodeGen.Base.mangleIndexTree: no match"
 
 
 
diff --git a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
index 375a9e1..4f23c55 100644
--- a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
@@ -1,15 +1,9 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.CodeGen.CondCode (
-	getCondCode,
-	condIntCode,
-	condFltCode
+        getCondCode,
+        condIntCode,
+        condFltCode
 )
 
 where
@@ -86,8 +80,8 @@ condIntCode cond x y = do
     (src1, code1) <- getSomeReg x
     (src2, code2) <- getSomeReg y
     let
-	code__2 = code1 `appOL` code2 `snocOL`
-    	    	  SUB False True src1 (RIReg src2) g0
+        code__2 = code1 `appOL` code2 `snocOL`
+                  SUB False True src1 (RIReg src2) g0
     return (CondCode False cond code__2)
 
 
@@ -98,19 +92,19 @@ condFltCode cond x y = do
     (src2, code2) <- getSomeReg y
     tmp <- getNewRegNat FF64
     let
-   	promote x = FxTOy FF32 FF64 x tmp
-
-    	pk1   = cmmExprType dflags x
-    	pk2   = cmmExprType dflags y
-
-    	code__2 =
-		if pk1 `cmmEqType` pk2 then
-    	            code1 `appOL` code2 `snocOL`
-    	    	    FCMP True (cmmTypeSize pk1) src1 src2
-    	    	else if typeWidth pk1 == W32 then
-    	    	    code1 `snocOL` promote src1 `appOL` code2 `snocOL`
-    	    	    FCMP True FF64 tmp src2
-    	    	else
-    	    	    code1 `appOL` code2 `snocOL` promote src2 `snocOL`
-    	    	    FCMP True FF64 src1 tmp
+        promote x = FxTOy FF32 FF64 x tmp
+
+        pk1   = cmmExprType dflags x
+        pk2   = cmmExprType dflags y
+
+        code__2 =
+                if pk1 `cmmEqType` pk2 then
+                    code1 `appOL` code2 `snocOL`
+                    FCMP True (cmmTypeSize pk1) src1 src2
+                else if typeWidth pk1 == W32 then
+                    code1 `snocOL` promote src1 `appOL` code2 `snocOL`
+                    FCMP True FF64 tmp src2
+                else
+                    code1 `appOL` code2 `snocOL` promote src2 `snocOL`
+                    FCMP True FF64 src1 tmp
     return (CondCode True cond code__2)
diff --git a/compiler/nativeGen/SPARC/CodeGen/Expand.hs b/compiler/nativeGen/SPARC/CodeGen/Expand.hs
index 03f571c..15d7456 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Expand.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Expand.hs
@@ -1,14 +1,8 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Expand out synthetic instructions into single machine instrs.
 module SPARC.CodeGen.Expand (
-	expandTop
+        expandTop
 )
 
 where
@@ -17,7 +11,7 @@ import SPARC.Instr
 import SPARC.Imm
 import SPARC.AddrMode
 import SPARC.Regs
-import SPARC.Ppr	()
+import SPARC.Ppr        ()
 import Instruction
 import Reg
 import Size
@@ -30,139 +24,139 @@ import OrdList
 -- | Expand out synthetic instructions in this top level thing
 expandTop :: NatCmmDecl CmmStatics Instr -> NatCmmDecl CmmStatics Instr
 expandTop top@(CmmData{})
-	= top
+        = top
 
 expandTop (CmmProc info lbl live (ListGraph blocks))
-	= CmmProc info lbl live (ListGraph $ map expandBlock blocks)
+        = CmmProc info lbl live (ListGraph $ map expandBlock blocks)
 
 
 -- | Expand out synthetic instructions in this block
 expandBlock :: NatBasicBlock Instr -> NatBasicBlock Instr
 
 expandBlock (BasicBlock label instrs)
- = let	instrs_ol	= expandBlockInstrs instrs
- 	instrs'		= fromOL instrs_ol
-   in	BasicBlock label instrs'
+ = let  instrs_ol       = expandBlockInstrs instrs
+        instrs'         = fromOL instrs_ol
+   in   BasicBlock label instrs'
 
 
 -- | Expand out some instructions
 expandBlockInstrs :: [Instr] -> OrdList Instr
-expandBlockInstrs []	= nilOL
-	
+expandBlockInstrs []    = nilOL
+        
 expandBlockInstrs (ii:is)
- = let	ii_doubleRegs	= remapRegPair ii
-	is_misaligned	= expandMisalignedDoubles ii_doubleRegs
+ = let  ii_doubleRegs   = remapRegPair ii
+        is_misaligned   = expandMisalignedDoubles ii_doubleRegs
 
-   in	is_misaligned `appOL` expandBlockInstrs is
+   in   is_misaligned `appOL` expandBlockInstrs is
    
 
 
 -- | In the SPARC instruction set the FP register pairs that are used
---	to hold 64 bit floats are refered to by just the first reg 
---	of the pair. Remap our internal reg pairs to the appropriate reg.
+--      to hold 64 bit floats are refered to by just the first reg 
+--      of the pair. Remap our internal reg pairs to the appropriate reg.
 --
---	For example:
---	    ldd [%l1], (%f0 | %f1)
+--      For example:
+--          ldd [%l1], (%f0 | %f1)
 --
---	gets mapped to
---	    ldd [$l1], %f0
+--      gets mapped to
+--          ldd [$l1], %f0
 --
 remapRegPair :: Instr -> Instr
 remapRegPair instr
- = let	patchF reg
- 	 = case reg of
-	 	RegReal (RealRegSingle _) 	
-			-> reg
+ = let  patchF reg
+         = case reg of
+                RegReal (RealRegSingle _)       
+                        -> reg
 
-		RegReal (RealRegPair r1 r2)	
+                RegReal (RealRegPair r1 r2)     
 
-			-- sanity checking
-		 	| r1 	     >= 32
-			, r1 	     <= 63
-			, r1 `mod` 2 == 0	
-			, r2         == r1 + 1	
-			-> RegReal (RealRegSingle r1)
+                        -- sanity checking
+                        | r1         >= 32
+                        , r1         <= 63
+                        , r1 `mod` 2 == 0       
+                        , r2         == r1 + 1  
+                        -> RegReal (RealRegSingle r1)
 
-			| otherwise		
-			-> pprPanic "SPARC.CodeGen.Expand: not remapping dodgy looking reg pair " (ppr reg)
+                        | otherwise             
+                        -> pprPanic "SPARC.CodeGen.Expand: not remapping dodgy looking reg pair " (ppr reg)
 
-		RegVirtual _
-			-> pprPanic "SPARC.CodeGen.Expand: not remapping virtual reg " (ppr reg)
-			
-   in	patchRegsOfInstr instr patchF
+                RegVirtual _
+                        -> pprPanic "SPARC.CodeGen.Expand: not remapping virtual reg " (ppr reg)
+                        
+   in   patchRegsOfInstr instr patchF
 
 
 
 
 -- Expand out 64 bit load/stores into individual instructions to handle
---	possible double alignment problems.
+--      possible double alignment problems.
 --
---	TODO: 	It'd be better to use a scratch reg instead of the add/sub thing.
---		We might be able to do this faster if we use the UA2007 instr set
---		instead of restricting ourselves to SPARC V9.
+--      TODO:   It'd be better to use a scratch reg instead of the add/sub thing.
+--              We might be able to do this faster if we use the UA2007 instr set
+--              instead of restricting ourselves to SPARC V9.
 --
 expandMisalignedDoubles :: Instr -> OrdList Instr
 expandMisalignedDoubles instr
 
-	-- Translate to:
-	--    add g1,g2,g1
-	--    ld  [g1],%fn
-	--    ld  [g1+4],%f(n+1)
-	--    sub g1,g2,g1           -- to restore g1
- 	| LD FF64 (AddrRegReg r1 r2) fReg	<- instr
-	= 	toOL	[ ADD False False r1 (RIReg r2) r1
-			, LD  FF32  (AddrRegReg r1 g0) 		fReg
-			, LD  FF32  (AddrRegImm r1 (ImmInt 4))	(fRegHi fReg)
-			, SUB False False r1 (RIReg r2) r1 ]
-
-	-- Translate to
-	--    ld  [addr],%fn
-	--    ld  [addr+4],%f(n+1)
-	| LD FF64 addr fReg			<- instr
-	= let	Just addr'	= addrOffset addr 4
-	  in	toOL	[ LD  FF32  addr	fReg
-	  		, LD  FF32  addr'	(fRegHi fReg) ]
-
-	-- Translate to:
-	--    add g1,g2,g1
-	--    st  %fn,[g1]
-	--    st  %f(n+1),[g1+4]
-	--    sub g1,g2,g1           -- to restore g1
-	| ST FF64 fReg (AddrRegReg r1 r2)	<- instr
-	= 	toOL	[ ADD False False r1 (RIReg r2) r1
-			, ST  FF32  fReg           (AddrRegReg r1 g0) 		
-			, ST  FF32  (fRegHi fReg)  (AddrRegImm r1 (ImmInt 4))	
-			, SUB False False r1 (RIReg r2) r1 ]
-
-	-- Translate to
-	--    ld  [addr],%fn
-	--    ld  [addr+4],%f(n+1)
-	| ST FF64 fReg addr			<- instr
-	= let	Just addr'	= addrOffset addr 4
-	  in	toOL	[ ST  FF32  fReg           addr	
-	  		, ST  FF32  (fRegHi fReg)  addr'	 ]
-
-	-- some other instr
-	| otherwise
-	= unitOL instr
-
-
-
--- | The the high partner for this float reg.	
+        -- Translate to:
+        --    add g1,g2,g1
+        --    ld  [g1],%fn
+        --    ld  [g1+4],%f(n+1)
+        --    sub g1,g2,g1           -- to restore g1
+        | LD FF64 (AddrRegReg r1 r2) fReg       <- instr
+        =       toOL    [ ADD False False r1 (RIReg r2) r1
+                        , LD  FF32  (AddrRegReg r1 g0)          fReg
+                        , LD  FF32  (AddrRegImm r1 (ImmInt 4))  (fRegHi fReg)
+                        , SUB False False r1 (RIReg r2) r1 ]
+
+        -- Translate to
+        --    ld  [addr],%fn
+        --    ld  [addr+4],%f(n+1)
+        | LD FF64 addr fReg                     <- instr
+        = let   Just addr'      = addrOffset addr 4
+          in    toOL    [ LD  FF32  addr        fReg
+                        , LD  FF32  addr'       (fRegHi fReg) ]
+
+        -- Translate to:
+        --    add g1,g2,g1
+        --    st  %fn,[g1]
+        --    st  %f(n+1),[g1+4]
+        --    sub g1,g2,g1           -- to restore g1
+        | ST FF64 fReg (AddrRegReg r1 r2)       <- instr
+        =       toOL    [ ADD False False r1 (RIReg r2) r1
+                        , ST  FF32  fReg           (AddrRegReg r1 g0)           
+                        , ST  FF32  (fRegHi fReg)  (AddrRegImm r1 (ImmInt 4))   
+                        , SUB False False r1 (RIReg r2) r1 ]
+
+        -- Translate to
+        --    ld  [addr],%fn
+        --    ld  [addr+4],%f(n+1)
+        | ST FF64 fReg addr                     <- instr
+        = let   Just addr'      = addrOffset addr 4
+          in    toOL    [ ST  FF32  fReg           addr 
+                        , ST  FF32  (fRegHi fReg)  addr'         ]
+
+        -- some other instr
+        | otherwise
+        = unitOL instr
+
+
+
+-- | The the high partner for this float reg.   
 fRegHi :: Reg -> Reg
 fRegHi (RegReal (RealRegSingle r1))
-	| r1		>= 32
-	, r1		<= 63
-	, r1 `mod` 2 == 0
-	= (RegReal $ RealRegSingle (r1 + 1))
-	
+        | r1            >= 32
+        , r1            <= 63
+        , r1 `mod` 2 == 0
+        = (RegReal $ RealRegSingle (r1 + 1))
+        
 -- Can't take high partner for non-low reg.
 fRegHi reg
-	= pprPanic "SPARC.CodeGen.Expand: can't take fRegHi from " (ppr reg)
-	
-	
-	
-	
-	
+        = pprPanic "SPARC.CodeGen.Expand: can't take fRegHi from " (ppr reg)
+        
+        
+        
+        
+        
 
 
diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs
index 43b792a..14019d5 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs
@@ -1,15 +1,9 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Evaluation of 32 bit values.
 module SPARC.CodeGen.Gen32 (
-	getSomeReg,
-	getRegister
+        getSomeReg,
+        getRegister
 )
 
 where
@@ -37,16 +31,16 @@ import OrdList
 import Outputable
 
 -- | The dual to getAnyReg: compute an expression into a register, but
--- 	we don't mind which one it is.
+--      we don't mind which one it is.
 getSomeReg :: CmmExpr -> NatM (Reg, InstrBlock)
 getSomeReg expr = do
   r <- getRegister expr
   case r of
     Any rep code -> do
-	tmp <- getNewRegNat rep
-	return (tmp, code tmp)
+        tmp <- getNewRegNat rep
+        return (tmp, code tmp)
     Fixed _ reg code -> 
-	return (reg, code)
+        return (reg, code)
 
 
 
@@ -84,8 +78,8 @@ getRegister (CmmMachOp (MO_SS_Conv W64 W32) [x]) = do
 
 
 -- Load a literal float into a float register.
---	The actual literal is stored in a new data area, and we load it 
---	at runtime.
+--      The actual literal is stored in a new data area, and we load it 
+--      at runtime.
 getRegister (CmmLit (CmmFloat f W32)) = do
 
     -- a label for the new data area
@@ -94,12 +88,12 @@ getRegister (CmmLit (CmmFloat f W32)) = do
 
     let code dst = toOL [
             -- the data area         
-	    LDATA ReadOnlyData $ Statics lbl
-			 [CmmStaticLit (CmmFloat f W32)],
+            LDATA ReadOnlyData $ Statics lbl
+                         [CmmStaticLit (CmmFloat f W32)],
 
             -- load the literal
-	    SETHI (HI (ImmCLbl lbl)) tmp,
-	    LD II32 (AddrRegImm tmp (LO (ImmCLbl lbl))) dst] 
+            SETHI (HI (ImmCLbl lbl)) tmp,
+            LD II32 (AddrRegImm tmp (LO (ImmCLbl lbl))) dst] 
 
     return (Any FF32 code)
 
@@ -107,342 +101,342 @@ getRegister (CmmLit (CmmFloat d W64)) = do
     lbl <- getNewLabelNat
     tmp <- getNewRegNat II32
     let code dst = toOL [
-	    LDATA ReadOnlyData $ Statics lbl
-			 [CmmStaticLit (CmmFloat d W64)],
-	    SETHI (HI (ImmCLbl lbl)) tmp,
-	    LD II64 (AddrRegImm tmp (LO (ImmCLbl lbl))) dst] 
+            LDATA ReadOnlyData $ Statics lbl
+                         [CmmStaticLit (CmmFloat d W64)],
+            SETHI (HI (ImmCLbl lbl)) tmp,
+            LD II64 (AddrRegImm tmp (LO (ImmCLbl lbl))) dst] 
     return (Any FF64 code)
 
 
 -- Unary machine ops
 getRegister (CmmMachOp mop [x])
   = case mop of
-	-- Floating point negation -------------------------
-	MO_F_Neg W32		-> trivialUFCode FF32 (FNEG FF32) x
-	MO_F_Neg W64		-> trivialUFCode FF64 (FNEG FF64) x
+        -- Floating point negation -------------------------
+        MO_F_Neg W32            -> trivialUFCode FF32 (FNEG FF32) x
+        MO_F_Neg W64            -> trivialUFCode FF64 (FNEG FF64) x
 
 
-	-- Integer negation --------------------------------
-	MO_S_Neg rep		-> trivialUCode (intSize rep) (SUB False False g0) x
-	MO_Not rep		-> trivialUCode (intSize rep) (XNOR False g0) x
+        -- Integer negation --------------------------------
+        MO_S_Neg rep            -> trivialUCode (intSize rep) (SUB False False g0) x
+        MO_Not rep              -> trivialUCode (intSize rep) (XNOR False g0) x
 
 
-	-- Float word size conversion ----------------------
-	MO_FF_Conv W64 W32	-> coerceDbl2Flt x
-	MO_FF_Conv W32 W64	-> coerceFlt2Dbl x
+        -- Float word size conversion ----------------------
+        MO_FF_Conv W64 W32      -> coerceDbl2Flt x
+        MO_FF_Conv W32 W64      -> coerceFlt2Dbl x
 
 
-	-- Float <-> Signed Int conversion -----------------
-	MO_FS_Conv from to 	-> coerceFP2Int from to x
-	MO_SF_Conv from to 	-> coerceInt2FP from to x
+        -- Float <-> Signed Int conversion -----------------
+        MO_FS_Conv from to      -> coerceFP2Int from to x
+        MO_SF_Conv from to      -> coerceInt2FP from to x
 
 
-	-- Unsigned integer word size conversions ----------
+        -- Unsigned integer word size conversions ----------
 
-	-- If it's the same size, then nothing needs to be done.
-	MO_UU_Conv from to
-	 | from == to    	-> conversionNop (intSize to)  x
+        -- If it's the same size, then nothing needs to be done.
+        MO_UU_Conv from to
+         | from == to           -> conversionNop (intSize to)  x
 
-	-- To narrow an unsigned word, mask out the high bits to simulate what would 
-	--	happen if we copied the value into a smaller register.
-	MO_UU_Conv W16 W8	-> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
-	MO_UU_Conv W32 W8	-> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
+        -- To narrow an unsigned word, mask out the high bits to simulate what would 
+        --      happen if we copied the value into a smaller register.
+        MO_UU_Conv W16 W8       -> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
+        MO_UU_Conv W32 W8       -> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
 
-	-- for narrowing 32 bit to 16 bit, don't use a literal mask value like the W16->W8
-	--	case because the only way we can load it is via SETHI, which needs 2 ops.
-	--	Do some shifts to chop out the high bits instead.
-	MO_UU_Conv W32 W16	
-	 -> do	tmpReg		<- getNewRegNat II32
-		(xReg, xCode)	<- getSomeReg x
-	 	let code dst
-			=  	xCode
-			`appOL` toOL
-				[ SLL xReg   (RIImm $ ImmInt 16) tmpReg
-				, SRL tmpReg (RIImm $ ImmInt 16) dst]
-				
-		return	$ Any II32 code
-			
-		--	 trivialCode W16 (AND False) x (CmmLit (CmmInt 65535 W16))
+        -- for narrowing 32 bit to 16 bit, don't use a literal mask value like the W16->W8
+        --      case because the only way we can load it is via SETHI, which needs 2 ops.
+        --      Do some shifts to chop out the high bits instead.
+        MO_UU_Conv W32 W16      
+         -> do  tmpReg          <- getNewRegNat II32
+                (xReg, xCode)   <- getSomeReg x
+                let code dst
+                        =       xCode
+                        `appOL` toOL
+                                [ SLL xReg   (RIImm $ ImmInt 16) tmpReg
+                                , SRL tmpReg (RIImm $ ImmInt 16) dst]
+                                
+                return  $ Any II32 code
+                        
+                --       trivialCode W16 (AND False) x (CmmLit (CmmInt 65535 W16))
 
-	-- To widen an unsigned word we don't have to do anything.
-	--	Just leave it in the same register and mark the result as the new size.
-	MO_UU_Conv W8  W16	-> conversionNop (intSize W16)  x
-	MO_UU_Conv W8  W32	-> conversionNop (intSize W32)  x
-	MO_UU_Conv W16 W32	-> conversionNop (intSize W32)  x
+        -- To widen an unsigned word we don't have to do anything.
+        --      Just leave it in the same register and mark the result as the new size.
+        MO_UU_Conv W8  W16      -> conversionNop (intSize W16)  x
+        MO_UU_Conv W8  W32      -> conversionNop (intSize W32)  x
+        MO_UU_Conv W16 W32      -> conversionNop (intSize W32)  x
 
 
-	-- Signed integer word size conversions ------------
+        -- Signed integer word size conversions ------------
 
-	-- Mask out high bits when narrowing them
-	MO_SS_Conv W16 W8	-> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
-	MO_SS_Conv W32 W8	-> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
-	MO_SS_Conv W32 W16	-> trivialCode W16 (AND False) x (CmmLit (CmmInt 65535 W16))
+        -- Mask out high bits when narrowing them
+        MO_SS_Conv W16 W8       -> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
+        MO_SS_Conv W32 W8       -> trivialCode W8  (AND False) x (CmmLit (CmmInt 255 W8))
+        MO_SS_Conv W32 W16      -> trivialCode W16 (AND False) x (CmmLit (CmmInt 65535 W16))
 
-	-- Sign extend signed words when widening them.
-	MO_SS_Conv W8  W16	-> integerExtend W8  W16 x
-	MO_SS_Conv W8  W32	-> integerExtend W8  W32 x
-	MO_SS_Conv W16 W32	-> integerExtend W16 W32 x
+        -- Sign extend signed words when widening them.
+        MO_SS_Conv W8  W16      -> integerExtend W8  W16 x
+        MO_SS_Conv W8  W32      -> integerExtend W8  W32 x
+        MO_SS_Conv W16 W32      -> integerExtend W16 W32 x
 
-	_ 		  	-> panic ("Unknown unary mach op: " ++ show mop)
+        _                       -> panic ("Unknown unary mach op: " ++ show mop)
 
 
 -- Binary machine ops
 getRegister (CmmMachOp mop [x, y]) 
   = case mop of
-      MO_Eq _ 		-> condIntReg EQQ x y
-      MO_Ne _ 		-> condIntReg NE x y
-
-      MO_S_Gt _		-> condIntReg GTT x y
-      MO_S_Ge _		-> condIntReg GE x y
-      MO_S_Lt _		-> condIntReg LTT x y
-      MO_S_Le _		-> condIntReg LE x y
-	      
-      MO_U_Gt W32  	-> condIntReg GU  x y
-      MO_U_Ge W32  	-> condIntReg GEU x y
-      MO_U_Lt W32  	-> condIntReg LU  x y
-      MO_U_Le W32  	-> condIntReg LEU x y
-
-      MO_U_Gt W16 	-> condIntReg GU  x y
-      MO_U_Ge W16	-> condIntReg GEU x y
-      MO_U_Lt W16 	-> condIntReg LU  x y
-      MO_U_Le W16 	-> condIntReg LEU x y
-
-      MO_Add W32 	-> trivialCode W32 (ADD False False) x y
-      MO_Sub W32 	-> trivialCode W32 (SUB False False) x y
+      MO_Eq _           -> condIntReg EQQ x y
+      MO_Ne _           -> condIntReg NE x y
+
+      MO_S_Gt _         -> condIntReg GTT x y
+      MO_S_Ge _         -> condIntReg GE x y
+      MO_S_Lt _         -> condIntReg LTT x y
+      MO_S_Le _         -> condIntReg LE x y
+              
+      MO_U_Gt W32       -> condIntReg GU  x y
+      MO_U_Ge W32       -> condIntReg GEU x y
+      MO_U_Lt W32       -> condIntReg LU  x y
+      MO_U_Le W32       -> condIntReg LEU x y
+
+      MO_U_Gt W16       -> condIntReg GU  x y
+      MO_U_Ge W16       -> condIntReg GEU x y
+      MO_U_Lt W16       -> condIntReg LU  x y
+      MO_U_Le W16       -> condIntReg LEU x y
+
+      MO_Add W32        -> trivialCode W32 (ADD False False) x y
+      MO_Sub W32        -> trivialCode W32 (SUB False False) x y
 
       MO_S_MulMayOflo rep -> imulMayOflo rep x y
 
-      MO_S_Quot W32 	-> idiv True  False x y
-      MO_U_Quot W32 	-> idiv False False x y
+      MO_S_Quot W32     -> idiv True  False x y
+      MO_U_Quot W32     -> idiv False False x y
        
-      MO_S_Rem  W32	-> irem True  x y
-      MO_U_Rem	W32	-> irem False x y
+      MO_S_Rem  W32     -> irem True  x y
+      MO_U_Rem  W32     -> irem False x y
        
-      MO_F_Eq _ 	-> condFltReg EQQ x y
-      MO_F_Ne _ 	-> condFltReg NE x y
+      MO_F_Eq _         -> condFltReg EQQ x y
+      MO_F_Ne _         -> condFltReg NE x y
 
-      MO_F_Gt _ 	-> condFltReg GTT x y
-      MO_F_Ge _ 	-> condFltReg GE x y 
-      MO_F_Lt _ 	-> condFltReg LTT x y
-      MO_F_Le _ 	-> condFltReg LE x y
+      MO_F_Gt _         -> condFltReg GTT x y
+      MO_F_Ge _         -> condFltReg GE x y 
+      MO_F_Lt _         -> condFltReg LTT x y
+      MO_F_Le _         -> condFltReg LE x y
 
-      MO_F_Add  w	-> trivialFCode w FADD x y
-      MO_F_Sub  w  	-> trivialFCode w FSUB x y
-      MO_F_Mul  w  	-> trivialFCode w FMUL x y
-      MO_F_Quot w  	-> trivialFCode w FDIV x y
+      MO_F_Add  w       -> trivialFCode w FADD x y
+      MO_F_Sub  w       -> trivialFCode w FSUB x y
+      MO_F_Mul  w       -> trivialFCode w FMUL x y
+      MO_F_Quot w       -> trivialFCode w FDIV x y
 
-      MO_And rep   	-> trivialCode rep (AND False) x y
-      MO_Or  rep    	-> trivialCode rep (OR  False) x y
-      MO_Xor rep   	-> trivialCode rep (XOR False) x y
+      MO_And rep        -> trivialCode rep (AND False) x y
+      MO_Or  rep        -> trivialCode rep (OR  False) x y
+      MO_Xor rep        -> trivialCode rep (XOR False) x y
 
-      MO_Mul rep 	-> trivialCode rep (SMUL False) x y
+      MO_Mul rep        -> trivialCode rep (SMUL False) x y
 
-      MO_Shl rep   	-> trivialCode rep SLL  x y
-      MO_U_Shr rep   	-> trivialCode rep SRL x y
-      MO_S_Shr rep   	-> trivialCode rep SRA x y
+      MO_Shl rep        -> trivialCode rep SLL  x y
+      MO_U_Shr rep      -> trivialCode rep SRL x y
+      MO_S_Shr rep      -> trivialCode rep SRA x y
 
-      _			-> pprPanic "getRegister(sparc) - binary CmmMachOp (1)" (pprMachOp mop)
+      _                 -> pprPanic "getRegister(sparc) - binary CmmMachOp (1)" (pprMachOp mop)
   where
 
 
 getRegister (CmmLoad mem pk) = do
     Amode src code <- getAmode mem
     let
-	code__2 dst 	= code `snocOL` LD (cmmTypeSize pk) src dst
+        code__2 dst     = code `snocOL` LD (cmmTypeSize pk) src dst
     return (Any (cmmTypeSize pk) code__2)
 
 getRegister (CmmLit (CmmInt i _))
   | fits13Bits i
   = let
-    	src = ImmInt (fromInteger i)
-    	code dst = unitOL (OR False g0 (RIImm src) dst)
+        src = ImmInt (fromInteger i)
+        code dst = unitOL (OR False g0 (RIImm src) dst)
     in
-    	return (Any II32 code)
+        return (Any II32 code)
 
 getRegister (CmmLit lit)
   = let imm = litToImm lit
-    	code dst = toOL [
-    	    SETHI (HI imm) dst,
-    	    OR False dst (RIImm (LO imm)) dst]
+        code dst = toOL [
+            SETHI (HI imm) dst,
+            OR False dst (RIImm (LO imm)) dst]
     in return (Any II32 code)
 
 
 getRegister _
-	= panic "SPARC.CodeGen.Gen32.getRegister: no match"
+        = panic "SPARC.CodeGen.Gen32.getRegister: no match"
 
 
 -- | sign extend and widen
 integerExtend 
-	:: Width 		-- ^ width of source expression
-	-> Width 		-- ^ width of result
-	-> CmmExpr 		-- ^ source expression
-	-> NatM Register	
+        :: Width                -- ^ width of source expression
+        -> Width                -- ^ width of result
+        -> CmmExpr              -- ^ source expression
+        -> NatM Register        
 
 integerExtend from to expr
- = do	-- load the expr into some register
- 	(reg, e_code) 	<- getSomeReg expr
-	tmp		<- getNewRegNat II32
-	let bitCount
-		= case (from, to) of
-			(W8,  W32)	-> 24
-			(W16, W32)	-> 16
-			(W8,  W16)	-> 24
-			_		-> panic "SPARC.CodeGen.Gen32: no match"
- 	let code dst
-		= e_code 	
-
-		-- local shift word left to load the sign bit
-		`snocOL`  SLL reg (RIImm (ImmInt bitCount)) tmp
-			
-		-- arithmetic shift right to sign extend
-		`snocOL`  SRA tmp (RIImm (ImmInt bitCount)) dst
-			
-	return (Any (intSize to) code)
-				
+ = do   -- load the expr into some register
+        (reg, e_code)   <- getSomeReg expr
+        tmp             <- getNewRegNat II32
+        let bitCount
+                = case (from, to) of
+                        (W8,  W32)      -> 24
+                        (W16, W32)      -> 16
+                        (W8,  W16)      -> 24
+                        _               -> panic "SPARC.CodeGen.Gen32: no match"
+        let code dst
+                = e_code        
+
+                -- local shift word left to load the sign bit
+                `snocOL`  SLL reg (RIImm (ImmInt bitCount)) tmp
+                        
+                -- arithmetic shift right to sign extend
+                `snocOL`  SRA tmp (RIImm (ImmInt bitCount)) dst
+                        
+        return (Any (intSize to) code)
+                                
 
 -- | For nop word format conversions we set the resulting value to have the
---	required size, but don't need to generate any actual code.
+--      required size, but don't need to generate any actual code.
 --
 conversionNop
-	:: Size -> CmmExpr -> NatM Register
+        :: Size -> CmmExpr -> NatM Register
 
 conversionNop new_rep expr
- = do	e_code <- getRegister expr
-	return (setSizeOfRegister e_code new_rep)
+ = do   e_code <- getRegister expr
+        return (setSizeOfRegister e_code new_rep)
 
 
 
 -- | Generate an integer division instruction.
 idiv :: Bool -> Bool -> CmmExpr -> CmmExpr -> NatM Register
-	
+        
 -- For unsigned division with a 32 bit numerator, 
---		we can just clear the Y register.
+--              we can just clear the Y register.
 idiv False cc x y 
  = do
-	(a_reg, a_code)		<- getSomeReg x
-       	(b_reg, b_code)		<- getSomeReg y
-	
-	let code dst
-		= 	a_code 
-		`appOL`	b_code  
-		`appOL`	toOL
-			[ WRY  g0 g0
-			, UDIV cc a_reg (RIReg b_reg) dst]
-			
-	return (Any II32 code)
-    	
+        (a_reg, a_code)         <- getSomeReg x
+        (b_reg, b_code)         <- getSomeReg y
+        
+        let code dst
+                =       a_code 
+                `appOL` b_code  
+                `appOL` toOL
+                        [ WRY  g0 g0
+                        , UDIV cc a_reg (RIReg b_reg) dst]
+                        
+        return (Any II32 code)
+        
 
 -- For _signed_ division with a 32 bit numerator,
---		we have to sign extend the numerator into the Y register.
+--              we have to sign extend the numerator into the Y register.
 idiv True cc x y 
  = do
-	(a_reg, a_code)		<- getSomeReg x
-       	(b_reg, b_code)		<- getSomeReg y
-	
-	tmp			<- getNewRegNat II32
-	
-	let code dst
-		= 	a_code 
-		`appOL`	b_code  
-		`appOL`	toOL
-			[ SRA  a_reg (RIImm (ImmInt 16)) tmp		-- sign extend
-			, SRA  tmp   (RIImm (ImmInt 16)) tmp
-
-			, WRY  tmp g0				
-			, SDIV cc a_reg (RIReg b_reg) dst]
-			
-	return (Any II32 code)
+        (a_reg, a_code)         <- getSomeReg x
+        (b_reg, b_code)         <- getSomeReg y
+        
+        tmp                     <- getNewRegNat II32
+        
+        let code dst
+                =       a_code 
+                `appOL` b_code  
+                `appOL` toOL
+                        [ SRA  a_reg (RIImm (ImmInt 16)) tmp            -- sign extend
+                        , SRA  tmp   (RIImm (ImmInt 16)) tmp
+
+                        , WRY  tmp g0                           
+                        , SDIV cc a_reg (RIReg b_reg) dst]
+                        
+        return (Any II32 code)
 
 
 -- | Do an integer remainder.
 --
---	 NOTE:	The SPARC v8 architecture manual says that integer division
---		instructions _may_ generate a remainder, depending on the implementation.
---		If so it is _recommended_ that the remainder is placed in the Y register.
+--       NOTE:  The SPARC v8 architecture manual says that integer division
+--              instructions _may_ generate a remainder, depending on the implementation.
+--              If so it is _recommended_ that the remainder is placed in the Y register.
 --
 --          The UltraSparc 2007 manual says Y is _undefined_ after division.
 --
---		The SPARC T2 doesn't store the remainder, not sure about the others. 
---		It's probably best not to worry about it, and just generate our own
---		remainders. 
+--              The SPARC T2 doesn't store the remainder, not sure about the others. 
+--              It's probably best not to worry about it, and just generate our own
+--              remainders. 
 --
 irem :: Bool -> CmmExpr -> CmmExpr -> NatM Register
 
 -- For unsigned operands: 
---		Division is between a 64 bit numerator and a 32 bit denominator, 
---		so we still have to clear the Y register.
+--              Division is between a 64 bit numerator and a 32 bit denominator, 
+--              so we still have to clear the Y register.
 irem False x y 
  = do
-    	(a_reg, a_code)	<- getSomeReg x
-	(b_reg, b_code)	<- getSomeReg y
-
-	tmp_reg		<- getNewRegNat II32
-
-	let code dst
-		= 	a_code
-		`appOL`	b_code
-		`appOL`	toOL
-			[ WRY	g0 g0
-			, UDIV  False         a_reg (RIReg b_reg) tmp_reg
-			, UMUL  False       tmp_reg (RIReg b_reg) tmp_reg
-			, SUB   False False   a_reg (RIReg tmp_reg) dst]
+        (a_reg, a_code) <- getSomeReg x
+        (b_reg, b_code) <- getSomeReg y
+
+        tmp_reg         <- getNewRegNat II32
+
+        let code dst
+                =       a_code
+                `appOL` b_code
+                `appOL` toOL
+                        [ WRY   g0 g0
+                        , UDIV  False         a_reg (RIReg b_reg) tmp_reg
+                        , UMUL  False       tmp_reg (RIReg b_reg) tmp_reg
+                        , SUB   False False   a_reg (RIReg tmp_reg) dst]
     
-    	return	(Any II32 code)
+        return  (Any II32 code)
 
     
 
 -- For signed operands:
---		Make sure to sign extend into the Y register, or the remainder
---		will have the wrong sign when the numerator is negative.
+--              Make sure to sign extend into the Y register, or the remainder
+--              will have the wrong sign when the numerator is negative.
 --
---	TODO:	When sign extending, GCC only shifts the a_reg right by 17 bits,
---		not the full 32. Not sure why this is, something to do with overflow?
---		If anyone cares enough about the speed of signed remainder they
---		can work it out themselves (then tell me). -- BL 2009/01/20
+--      TODO:   When sign extending, GCC only shifts the a_reg right by 17 bits,
+--              not the full 32. Not sure why this is, something to do with overflow?
+--              If anyone cares enough about the speed of signed remainder they
+--              can work it out themselves (then tell me). -- BL 2009/01/20
 irem True x y 
  = do
-    	(a_reg, a_code)	<- getSomeReg x
-	(b_reg, b_code)	<- getSomeReg y
-	
-	tmp1_reg	<- getNewRegNat II32
-	tmp2_reg	<- getNewRegNat II32
-		
-	let code dst
-		=	a_code
-		`appOL`	b_code
-		`appOL`	toOL
-			[ SRA	a_reg      (RIImm (ImmInt 16)) tmp1_reg	-- sign extend
-			, SRA	tmp1_reg   (RIImm (ImmInt 16)) tmp1_reg	-- sign extend
-			, WRY	tmp1_reg g0
-
-			, SDIV  False          a_reg (RIReg b_reg)    tmp2_reg	
-			, SMUL  False       tmp2_reg (RIReg b_reg)    tmp2_reg
-			, SUB   False False    a_reg (RIReg tmp2_reg) dst]
-			
-	return (Any II32 code)
+        (a_reg, a_code) <- getSomeReg x
+        (b_reg, b_code) <- getSomeReg y
+        
+        tmp1_reg        <- getNewRegNat II32
+        tmp2_reg        <- getNewRegNat II32
+                
+        let code dst
+                =       a_code
+                `appOL` b_code
+                `appOL` toOL
+                        [ SRA   a_reg      (RIImm (ImmInt 16)) tmp1_reg -- sign extend
+                        , SRA   tmp1_reg   (RIImm (ImmInt 16)) tmp1_reg -- sign extend
+                        , WRY   tmp1_reg g0
+
+                        , SDIV  False          a_reg (RIReg b_reg)    tmp2_reg  
+                        , SMUL  False       tmp2_reg (RIReg b_reg)    tmp2_reg
+                        , SUB   False False    a_reg (RIReg tmp2_reg) dst]
+                        
+        return (Any II32 code)
    
 
 imulMayOflo :: Width -> CmmExpr -> CmmExpr -> NatM Register
 imulMayOflo rep a b 
  = do
-	(a_reg, a_code) <- getSomeReg a
-	(b_reg, b_code) <- getSomeReg b
-	res_lo <- getNewRegNat II32
-	res_hi <- getNewRegNat II32
-
-	let shift_amt  = case rep of
-			  W32 -> 31
-			  W64 -> 63
-			  _ -> panic "shift_amt"
-	
-	let code dst = a_code `appOL` b_code `appOL`
+        (a_reg, a_code) <- getSomeReg a
+        (b_reg, b_code) <- getSomeReg b
+        res_lo <- getNewRegNat II32
+        res_hi <- getNewRegNat II32
+
+        let shift_amt  = case rep of
+                          W32 -> 31
+                          W64 -> 63
+                          _ -> panic "shift_amt"
+        
+        let code dst = a_code `appOL` b_code `appOL`
                        toOL [
                            SMUL False a_reg (RIReg b_reg) res_lo,
                            RDY res_hi,
                            SRA res_lo (RIImm (ImmInt shift_amt)) res_lo,
                            SUB False False res_lo (RIReg res_hi) dst
                         ]
-	return (Any II32 code)
+        return (Any II32 code)
 
 
 -- -----------------------------------------------------------------------------
@@ -458,19 +452,19 @@ imulMayOflo rep a b
 -- have handled the constant-folding.
 
 trivialCode
-	:: Width
-	-> (Reg -> RI -> Reg -> Instr)
-	-> CmmExpr
-	-> CmmExpr
-	-> NatM Register
-	
+        :: Width
+        -> (Reg -> RI -> Reg -> Instr)
+        -> CmmExpr
+        -> CmmExpr
+        -> NatM Register
+        
 trivialCode _ instr x (CmmLit (CmmInt y _))
   | fits13Bits y
   = do
       (src1, code) <- getSomeReg x
       let
-    	src2 = ImmInt (fromInteger y)
-    	code__2 dst = code `snocOL` instr src1 (RIImm src2) dst
+        src2 = ImmInt (fromInteger y)
+        code__2 dst = code `snocOL` instr src1 (RIImm src2) dst
       return (Any II32 code__2)
 
 
@@ -478,17 +472,17 @@ trivialCode _ instr x y = do
     (src1, code1) <- getSomeReg x
     (src2, code2) <- getSomeReg y
     let
-    	code__2 dst = code1 `appOL` code2 `snocOL`
-    	    	      instr src1 (RIReg src2) dst
+        code__2 dst = code1 `appOL` code2 `snocOL`
+                      instr src1 (RIReg src2) dst
     return (Any II32 code__2)
 
 
 trivialFCode 
-	:: Width
-	-> (Size -> Reg -> Reg -> Reg -> Instr)
-	-> CmmExpr
-	-> CmmExpr
-	-> NatM Register
+        :: Width
+        -> (Size -> Reg -> Reg -> Reg -> Instr)
+        -> CmmExpr
+        -> CmmExpr
+        -> NatM Register
 
 trivialFCode pk instr x y = do
     dflags <- getDynFlags
@@ -496,49 +490,49 @@ trivialFCode pk instr x y = do
     (src2, code2) <- getSomeReg y
     tmp <- getNewRegNat FF64
     let
-    	promote x = FxTOy FF32 FF64 x tmp
-
-    	pk1   = cmmExprType dflags x
-    	pk2   = cmmExprType dflags y
-
-    	code__2 dst =
-    	    	if pk1 `cmmEqType` pk2 then
-    	            code1 `appOL` code2 `snocOL`
-    	    	    instr (floatSize pk) src1 src2 dst
-    	    	else if typeWidth pk1 == W32 then
-    	    	    code1 `snocOL` promote src1 `appOL` code2 `snocOL`
-    	    	    instr FF64 tmp src2 dst
-    	    	else
-    	    	    code1 `appOL` code2 `snocOL` promote src2 `snocOL`
-    	    	    instr FF64 src1 tmp dst
+        promote x = FxTOy FF32 FF64 x tmp
+
+        pk1   = cmmExprType dflags x
+        pk2   = cmmExprType dflags y
+
+        code__2 dst =
+                if pk1 `cmmEqType` pk2 then
+                    code1 `appOL` code2 `snocOL`
+                    instr (floatSize pk) src1 src2 dst
+                else if typeWidth pk1 == W32 then
+                    code1 `snocOL` promote src1 `appOL` code2 `snocOL`
+                    instr FF64 tmp src2 dst
+                else
+                    code1 `appOL` code2 `snocOL` promote src2 `snocOL`
+                    instr FF64 src1 tmp dst
     return (Any (cmmTypeSize $ if pk1 `cmmEqType` pk2 then pk1 else cmmFloat W64) 
-    		code__2)
+                code__2)
 
 
 
 trivialUCode
-	:: Size
-	-> (RI -> Reg -> Instr)
-	-> CmmExpr
-	-> NatM Register
-	
+        :: Size
+        -> (RI -> Reg -> Instr)
+        -> CmmExpr
+        -> NatM Register
+        
 trivialUCode size instr x = do
     (src, code) <- getSomeReg x
     let
-    	code__2 dst = code `snocOL` instr (RIReg src) dst
+        code__2 dst = code `snocOL` instr (RIReg src) dst
     return (Any size code__2)
 
 
 trivialUFCode 
-	:: Size
-	-> (Reg -> Reg -> Instr)
-	-> CmmExpr
-	-> NatM Register 
-	
+        :: Size
+        -> (Reg -> Reg -> Instr)
+        -> CmmExpr
+        -> NatM Register 
+        
 trivialUFCode pk instr x = do
     (src, code) <- getSomeReg x
     let
-    	code__2 dst = code `snocOL` instr src dst
+        code__2 dst = code `snocOL` instr src dst
     return (Any pk code__2)
 
 
@@ -551,10 +545,10 @@ coerceInt2FP :: Width -> Width -> CmmExpr -> NatM Register
 coerceInt2FP width1 width2 x = do
     (src, code) <- getSomeReg x
     let
-    	code__2 dst = code `appOL` toOL [
-    	    ST (intSize width1) src (spRel (-2)),
-    	    LD (intSize width1) (spRel (-2)) dst,
-    	    FxTOy (intSize width1) (floatSize width2) dst dst]
+        code__2 dst = code `appOL` toOL [
+            ST (intSize width1) src (spRel (-2)),
+            LD (intSize width1) (spRel (-2)) dst,
+            FxTOy (intSize width1) (floatSize width2) dst dst]
     return (Any (floatSize $ width2) code__2)
 
 
@@ -562,30 +556,30 @@ coerceInt2FP width1 width2 x = do
 -- | Coerce a floating point value to integer
 --
 --   NOTE: On sparc v9 there are no instructions to move a value from an
---	   FP register directly to an int register, so we have to use a load/store.
+--         FP register directly to an int register, so we have to use a load/store.
 --
 coerceFP2Int :: Width -> Width -> CmmExpr -> NatM Register
 coerceFP2Int width1 width2 x 
- = do	let fsize1	= floatSize width1
-	    fsize2	= floatSize width2
-	
-            isize2	= intSize   width2
+ = do   let fsize1      = floatSize width1
+            fsize2      = floatSize width2
+        
+            isize2      = intSize   width2
 
-	(fsrc, code)	<- getSomeReg x
-	fdst		<- getNewRegNat fsize2
+        (fsrc, code)    <- getSomeReg x
+        fdst            <- getNewRegNat fsize2
     
-	let code2 dst	
-		= 	code
-		`appOL` toOL
-			-- convert float to int format, leaving it in a float reg.
-			[ FxTOy fsize1 isize2 fsrc fdst
+        let code2 dst   
+                =       code
+                `appOL` toOL
+                        -- convert float to int format, leaving it in a float reg.
+                        [ FxTOy fsize1 isize2 fsrc fdst
 
-			-- store the int into mem, then load it back to move
-			--	it into an actual int reg.
-			, ST    fsize2 fdst (spRel (-2))
-			, LD	isize2 (spRel (-2)) dst]
+                        -- store the int into mem, then load it back to move
+                        --      it into an actual int reg.
+                        , ST    fsize2 fdst (spRel (-2))
+                        , LD    isize2 (spRel (-2)) dst]
 
-	return (Any isize2 code2)
+        return (Any isize2 code2)
 
 
 -- | Coerce a double precision floating point value to single precision.
@@ -614,37 +608,37 @@ condIntReg :: Cond -> CmmExpr -> CmmExpr -> NatM Register
 condIntReg EQQ x (CmmLit (CmmInt 0 _)) = do
     (src, code) <- getSomeReg x
     let
-	code__2 dst = code `appOL` toOL [
-    	    SUB False True g0 (RIReg src) g0,
-    	    SUB True False g0 (RIImm (ImmInt (-1))) dst]
+        code__2 dst = code `appOL` toOL [
+            SUB False True g0 (RIReg src) g0,
+            SUB True False g0 (RIImm (ImmInt (-1))) dst]
     return (Any II32 code__2)
 
 condIntReg EQQ x y = do
     (src1, code1) <- getSomeReg x
     (src2, code2) <- getSomeReg y
     let
-    	code__2 dst = code1 `appOL` code2 `appOL` toOL [
-    	    XOR False src1 (RIReg src2) dst,
-    	    SUB False True g0 (RIReg dst) g0,
-    	    SUB True False g0 (RIImm (ImmInt (-1))) dst]
+        code__2 dst = code1 `appOL` code2 `appOL` toOL [
+            XOR False src1 (RIReg src2) dst,
+            SUB False True g0 (RIReg dst) g0,
+            SUB True False g0 (RIImm (ImmInt (-1))) dst]
     return (Any II32 code__2)
 
 condIntReg NE x (CmmLit (CmmInt 0 _)) = do
     (src, code) <- getSomeReg x
     let
-    	code__2 dst = code `appOL` toOL [
-    	    SUB False True g0 (RIReg src) g0,
-    	    ADD True False g0 (RIImm (ImmInt 0)) dst]
+        code__2 dst = code `appOL` toOL [
+            SUB False True g0 (RIReg src) g0,
+            ADD True False g0 (RIImm (ImmInt 0)) dst]
     return (Any II32 code__2)
 
 condIntReg NE x y = do
     (src1, code1) <- getSomeReg x
     (src2, code2) <- getSomeReg y
     let
-	code__2 dst = code1 `appOL` code2 `appOL` toOL [
-    	    XOR False src1 (RIReg src2) dst,
-    	    SUB False True g0 (RIReg dst) g0,
-    	    ADD True False g0 (RIImm (ImmInt 0)) dst]
+        code__2 dst = code1 `appOL` code2 `appOL` toOL [
+            XOR False src1 (RIReg src2) dst,
+            SUB False True g0 (RIReg dst) g0,
+            ADD True False g0 (RIImm (ImmInt 0)) dst]
     return (Any II32 code__2)
 
 condIntReg cond x y = do
@@ -652,22 +646,22 @@ condIntReg cond x y = do
     bid2 <- liftM (\a -> seq a a) getBlockIdNat
     CondCode _ cond cond_code <- condIntCode cond x y
     let
-	code__2 dst 
-	 =	cond_code 
-	  `appOL` toOL 
-		[ BI cond False bid1
-		, NOP
+        code__2 dst 
+         =      cond_code 
+          `appOL` toOL 
+                [ BI cond False bid1
+                , NOP
 
-		, OR False g0 (RIImm (ImmInt 0)) dst
-		, BI ALWAYS False bid2
-		, NOP
+                , OR False g0 (RIImm (ImmInt 0)) dst
+                , BI ALWAYS False bid2
+                , NOP
 
-		, NEWBLOCK bid1
-		, OR False g0 (RIImm (ImmInt 1)) dst
-		, BI ALWAYS False bid2
-		, NOP
+                , NEWBLOCK bid1
+                , OR False g0 (RIImm (ImmInt 1)) dst
+                , BI ALWAYS False bid2
+                , NOP
 
-		, NEWBLOCK bid2]
+                , NEWBLOCK bid2]
 
     return (Any II32 code__2)
 
@@ -679,23 +673,23 @@ condFltReg cond x y = do
 
     CondCode _ cond cond_code <- condFltCode cond x y
     let
-    	code__2 dst 
-	 = 	cond_code 
-	  `appOL` toOL 
-	  	[ NOP
-		, BF cond False bid1
-		, NOP
-
-		, OR False g0 (RIImm (ImmInt 0)) dst
-		, BI ALWAYS False bid2
-		, NOP
-
-		, NEWBLOCK bid1
-		, OR False g0 (RIImm (ImmInt 1)) dst
-		, BI ALWAYS False bid2
-		, NOP
-
-		, NEWBLOCK bid2 ]
+        code__2 dst 
+         =      cond_code 
+          `appOL` toOL 
+                [ NOP
+                , BF cond False bid1
+                , NOP
+
+                , OR False g0 (RIImm (ImmInt 0)) dst
+                , BI ALWAYS False bid2
+                , NOP
+
+                , NEWBLOCK bid1
+                , OR False g0 (RIImm (ImmInt 1)) dst
+                , BI ALWAYS False bid2
+                , NOP
+
+                , NEWBLOCK bid2 ]
 
     return (Any II32 code__2)
 
diff --git a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
index d4cdaf2..8cf2f72 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
@@ -1,22 +1,16 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | One ounce of sanity checking is worth 10000000000000000 ounces 
---	of staring blindly at assembly code trying to find the problem..
+--      of staring blindly at assembly code trying to find the problem..
 --
 module SPARC.CodeGen.Sanity (
-	checkBlock
+        checkBlock
 )
 
 where
 
 import SPARC.Instr
-import SPARC.Ppr	()
+import SPARC.Ppr        ()
 import Instruction
 
 import Cmm
@@ -31,48 +25,48 @@ checkBlock :: CmmBlock
            -> NatBasicBlock Instr
 
 checkBlock cmm block@(BasicBlock _ instrs)
-	| checkBlockInstrs instrs
-	= block
-	
-	| otherwise
-	= pprPanic 
-		("SPARC.CodeGen: bad block\n")
-		( vcat	[ text " -- cmm -----------------\n"
-			, ppr cmm
-			, text " -- native code ---------\n"
-			, ppr block ])
+        | checkBlockInstrs instrs
+        = block
+        
+        | otherwise
+        = pprPanic 
+                ("SPARC.CodeGen: bad block\n")
+                ( vcat  [ text " -- cmm -----------------\n"
+                        , ppr cmm
+                        , text " -- native code ---------\n"
+                        , ppr block ])
 
 
 checkBlockInstrs :: [Instr] -> Bool
 checkBlockInstrs ii
 
-	-- An unconditional jumps end the block.
-	--	There must be an unconditional jump in the block, otherwise
-	--	the register liveness determinator will get the liveness
-	--	information wrong. 
-	--
-	--	If the block ends with a cmm call that never returns
-	--	then there can be unreachable instructions after the jump,
-	--	but we don't mind here.
-	--
-	| instr : NOP : _	<- ii 
-	, isUnconditionalJump instr
-	= True
-	
-	-- All jumps must have a NOP in their branch delay slot.
-	--	The liveness determinator and register allocators aren't smart
-	--	enough to handle branch delay slots.
-	--
-	| instr : NOP : is	<- ii
-	, isJumpishInstr instr
-	= checkBlockInstrs is
-
-	-- keep checking
-	| _:i2:is		<- ii
-	= checkBlockInstrs (i2:is)
-
-	-- this block is no good	
-	| otherwise
-	= False
+        -- An unconditional jumps end the block.
+        --      There must be an unconditional jump in the block, otherwise
+        --      the register liveness determinator will get the liveness
+        --      information wrong. 
+        --
+        --      If the block ends with a cmm call that never returns
+        --      then there can be unreachable instructions after the jump,
+        --      but we don't mind here.
+        --
+        | instr : NOP : _       <- ii 
+        , isUnconditionalJump instr
+        = True
+        
+        -- All jumps must have a NOP in their branch delay slot.
+        --      The liveness determinator and register allocators aren't smart
+        --      enough to handle branch delay slots.
+        --
+        | instr : NOP : is      <- ii
+        , isJumpishInstr instr
+        = checkBlockInstrs is
+
+        -- keep checking
+        | _:i2:is               <- ii
+        = checkBlockInstrs (i2:is)
+
+        -- this block is no good        
+        | otherwise
+        = False
 
 
diff --git a/compiler/nativeGen/SPARC/Cond.hs b/compiler/nativeGen/SPARC/Cond.hs
index b8919a72..707e495 100644
--- a/compiler/nativeGen/SPARC/Cond.hs
+++ b/compiler/nativeGen/SPARC/Cond.hs
@@ -1,39 +1,33 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.Cond (
-	Cond(..),
-	condUnsigned,
-	condToSigned,
-	condToUnsigned
+        Cond(..),
+        condUnsigned,
+        condToSigned,
+        condToUnsigned
 )
 
 where
 
 -- | Branch condition codes.
 data Cond
-	= ALWAYS
-	| EQQ
-	| GE
-	| GEU
-	| GTT
-	| GU
-	| LE
-	| LEU
-	| LTT
-	| LU
-	| NE
-	| NEG
-	| NEVER
-	| POS
-	| VC
-	| VS
-	deriving Eq
+        = ALWAYS
+        | EQQ
+        | GE
+        | GEU
+        | GTT
+        | GU
+        | LE
+        | LEU
+        | LTT
+        | LU
+        | NE
+        | NEG
+        | NEVER
+        | POS
+        | VC
+        | VS
+        deriving Eq
 
 
 condUnsigned :: Cond -> Bool
diff --git a/compiler/nativeGen/SPARC/Imm.hs b/compiler/nativeGen/SPARC/Imm.hs
index 4c2bb5a..1179a66 100644
--- a/compiler/nativeGen/SPARC/Imm.hs
+++ b/compiler/nativeGen/SPARC/Imm.hs
@@ -1,16 +1,10 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.Imm (
-	-- immediate values
-	Imm(..),
-	strImmLit,
-	litToImm
+        -- immediate values
+        Imm(..),
+        strImmLit,
+        litToImm
 )
 
 where
@@ -21,29 +15,29 @@ import CLabel
 import Outputable
 
 -- | An immediate value.
---	Not all of these are directly representable by the machine. 
---	Things like ImmLit are slurped out and put in a data segment instead.
+--      Not all of these are directly representable by the machine. 
+--      Things like ImmLit are slurped out and put in a data segment instead.
 --
 data Imm
-	= ImmInt	Int
+        = ImmInt        Int
 
-	-- Sigh.
-	| ImmInteger	Integer	    
+        -- Sigh.
+        | ImmInteger    Integer     
 
-	-- AbstractC Label (with baggage)
-	| ImmCLbl	CLabel	    
+        -- AbstractC Label (with baggage)
+        | ImmCLbl       CLabel      
 
-	-- Simple string
-	| ImmLit	SDoc
-	| ImmIndex	CLabel Int
-	| ImmFloat	Rational
-	| ImmDouble	Rational
+        -- Simple string
+        | ImmLit        SDoc
+        | ImmIndex      CLabel Int
+        | ImmFloat      Rational
+        | ImmDouble     Rational
 
-	| ImmConstantSum  Imm Imm
-	| ImmConstantDiff Imm Imm
+        | ImmConstantSum  Imm Imm
+        | ImmConstantDiff Imm Imm
 
-	| LO 	Imm		   
-	| HI 	Imm
+        | LO    Imm                
+        | HI    Imm
 
 
 -- | Create a ImmLit containing this string.
@@ -52,23 +46,23 @@ strImmLit s = ImmLit (text s)
 
 
 -- | Convert a CmmLit to an Imm.
--- 	Narrow to the width: a CmmInt might be out of
--- 	range, but we assume that ImmInteger only contains
--- 	in-range values.  A signed value should be fine here.
+--      Narrow to the width: a CmmInt might be out of
+--      range, but we assume that ImmInteger only contains
+--      in-range values.  A signed value should be fine here.
 --
 litToImm :: CmmLit -> Imm
 litToImm lit
  = case lit of
- 	CmmInt i w		-> ImmInteger (narrowS w i)
-	CmmFloat f W32		-> ImmFloat f
-	CmmFloat f W64		-> ImmDouble f
-	CmmLabel l		-> ImmCLbl l
-	CmmLabelOff l off	-> ImmIndex l off
-
-	CmmLabelDiffOff l1 l2 off
-	 -> ImmConstantSum
-		(ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))
-		(ImmInt off)
+        CmmInt i w              -> ImmInteger (narrowS w i)
+        CmmFloat f W32          -> ImmFloat f
+        CmmFloat f W64          -> ImmDouble f
+        CmmLabel l              -> ImmCLbl l
+        CmmLabelOff l off       -> ImmIndex l off
+
+        CmmLabelDiffOff l1 l2 off
+         -> ImmConstantSum
+                (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))
+                (ImmInt off)
 
         _               -> panic "SPARC.Regs.litToImm: no match"
 
diff --git a/compiler/nativeGen/SPARC/Instr.hs b/compiler/nativeGen/SPARC/Instr.hs
index 601e047..8669c7f 100644
--- a/compiler/nativeGen/SPARC/Instr.hs
+++ b/compiler/nativeGen/SPARC/Instr.hs
@@ -6,27 +6,21 @@
 --
 -----------------------------------------------------------------------------
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 #include "HsVersions.h"
 #include "nativeGen/NCG.h"
 
 module SPARC.Instr (
-	RI(..),
-	riZero,
-
-	fpRelEA,
-	moveSp,
-	
-	isUnconditionalJump,
-	
-	Instr(..),
-	maxSpillSlots
+        RI(..),
+        riZero,
+
+        fpRelEA,
+        moveSp,
+        
+        isUnconditionalJump,
+        
+        Instr(..),
+        maxSpillSlots
 )
 
 where
@@ -56,22 +50,22 @@ import Platform
 
 -- | Register or immediate
 data RI 
-	= RIReg Reg
-	| RIImm Imm
+        = RIReg Reg
+        | RIImm Imm
 
 -- | Check if a RI represents a zero value.
---  	- a literal zero
---	- register %g0, which is always zero.
+--      - a literal zero
+--      - register %g0, which is always zero.
 --
-riZero :: RI -> Bool	
-riZero (RIImm (ImmInt 0))			= True
-riZero (RIImm (ImmInteger 0))			= True
-riZero (RIReg (RegReal (RealRegSingle 0)))	= True
-riZero _					= False
+riZero :: RI -> Bool    
+riZero (RIImm (ImmInt 0))                       = True
+riZero (RIImm (ImmInteger 0))                   = True
+riZero (RIReg (RegReal (RealRegSingle 0)))      = True
+riZero _                                        = False
 
 
 -- | Calculate the effective address which would be used by the
--- 	corresponding fpRel sequence. 
+--      corresponding fpRel sequence. 
 fpRelEA :: Int -> Reg -> Instr
 fpRelEA n dst
    = ADD False False fp (RIImm (ImmInt (n * wordLength))) dst
@@ -86,294 +80,294 @@ moveSp n
 isUnconditionalJump :: Instr -> Bool
 isUnconditionalJump ii
  = case ii of
- 	CALL{}		-> True
-	JMP{}		-> True
-	JMP_TBL{}	-> True
-	BI ALWAYS _ _	-> True
-	BF ALWAYS _ _ 	-> True
-	_		-> False
+        CALL{}          -> True
+        JMP{}           -> True
+        JMP_TBL{}       -> True
+        BI ALWAYS _ _   -> True
+        BF ALWAYS _ _   -> True
+        _               -> False
 
 
 -- | instance for sparc instruction set
 instance Instruction Instr where
-	regUsageOfInstr		= sparc_regUsageOfInstr
-	patchRegsOfInstr	= sparc_patchRegsOfInstr
-	isJumpishInstr		= sparc_isJumpishInstr
-	jumpDestsOfInstr	= sparc_jumpDestsOfInstr
-	patchJumpInstr		= sparc_patchJumpInstr
-	mkSpillInstr		= sparc_mkSpillInstr
-	mkLoadInstr		= sparc_mkLoadInstr
-	takeDeltaInstr		= sparc_takeDeltaInstr
-	isMetaInstr		= sparc_isMetaInstr
-	mkRegRegMoveInstr	= sparc_mkRegRegMoveInstr
-	takeRegRegMoveInstr	= sparc_takeRegRegMoveInstr
-	mkJumpInstr		= sparc_mkJumpInstr
+        regUsageOfInstr         = sparc_regUsageOfInstr
+        patchRegsOfInstr        = sparc_patchRegsOfInstr
+        isJumpishInstr          = sparc_isJumpishInstr
+        jumpDestsOfInstr        = sparc_jumpDestsOfInstr
+        patchJumpInstr          = sparc_patchJumpInstr
+        mkSpillInstr            = sparc_mkSpillInstr
+        mkLoadInstr             = sparc_mkLoadInstr
+        takeDeltaInstr          = sparc_takeDeltaInstr
+        isMetaInstr             = sparc_isMetaInstr
+        mkRegRegMoveInstr       = sparc_mkRegRegMoveInstr
+        takeRegRegMoveInstr     = sparc_takeRegRegMoveInstr
+        mkJumpInstr             = sparc_mkJumpInstr
         mkStackAllocInstr       = panic "no sparc_mkStackAllocInstr"
         mkStackDeallocInstr     = panic "no sparc_mkStackDeallocInstr"
 
 
 -- | SPARC instruction set.
---	Not complete. This is only the ones we need.
+--      Not complete. This is only the ones we need.
 --
 data Instr
 
-	-- meta ops --------------------------------------------------
-	-- comment pseudo-op
-	= COMMENT FastString		
-
-	-- some static data spat out during code generation.
-	-- Will be extracted before pretty-printing.
-	| LDATA   Section CmmStatics	
-
-	-- Start a new basic block.  Useful during codegen, removed later.
-	-- Preceding instruction should be a jump, as per the invariants
-	-- for a BasicBlock (see Cmm).
-	| NEWBLOCK BlockId		
-
-	-- specify current stack offset for benefit of subsequent passes.
-	| DELTA   Int
-
-	-- real instrs -----------------------------------------------
-	-- Loads and stores.
-	| LD		Size AddrMode Reg 		-- size, src, dst
-	| ST		Size Reg AddrMode 		-- size, src, dst
-
-	-- Int Arithmetic.
-	--	x:   add/sub with carry bit. 
-	--		In SPARC V9 addx and friends were renamed addc. 
-	--
-	--	cc:  modify condition codes
-	-- 
-	| ADD		Bool Bool Reg RI Reg 		-- x?, cc?, src1, src2, dst
-	| SUB		Bool Bool Reg RI Reg 		-- x?, cc?, src1, src2, dst
-
-	| UMUL		Bool Reg RI Reg 		--     cc?, src1, src2, dst
-	| SMUL	        Bool Reg RI Reg 		--     cc?, src1, src2, dst
-
-
-	-- The SPARC divide instructions perform 64bit by 32bit division
-	--   The Y register is xored into the first operand.
-
-	--   On _some implementations_ the Y register is overwritten by
-	--   the remainder, so we have to make sure it is 0 each time.
-
-	--   dst <- ((Y `shiftL` 32) `or` src1) `div` src2
-	| UDIV          Bool Reg RI Reg 		--     cc?, src1, src2, dst
-	| SDIV          Bool Reg RI Reg 		--     cc?, src1, src2, dst
-
- 	| RDY           Reg                  		-- move contents of Y register to reg
-	| WRY           Reg  Reg             		-- Y <- src1 `xor` src2
-	
-	-- Logic operations.
-	| AND		Bool Reg RI Reg 		-- cc?, src1, src2, dst
-	| ANDN		Bool Reg RI Reg 		-- cc?, src1, src2, dst
-	| OR		Bool Reg RI Reg 		-- cc?, src1, src2, dst
-	| ORN		Bool Reg RI Reg 		-- cc?, src1, src2, dst
-	| XOR		Bool Reg RI Reg 		-- cc?, src1, src2, dst
-	| XNOR		Bool Reg RI Reg 		-- cc?, src1, src2, dst
-	| SLL		Reg RI Reg 			-- src1, src2, dst
-	| SRL		Reg RI Reg 			-- src1, src2, dst
-	| SRA		Reg RI Reg 			-- src1, src2, dst
-
-	-- Load immediates.
-	| SETHI		Imm Reg 			-- src, dst
-
-	-- Do nothing.
-	-- Implemented by the assembler as SETHI 0, %g0, but worth an alias
-	| NOP						
-
-	-- Float Arithmetic.
-	-- Note that we cheat by treating F{ABS,MOV,NEG} of doubles as single
-	-- instructions right up until we spit them out.
-	--
-	| FABS		Size Reg Reg	   		-- src dst
-	| FADD		Size Reg Reg Reg  		-- src1, src2, dst
-	| FCMP		Bool Size Reg Reg 		-- exception?, src1, src2, dst
-	| FDIV		Size Reg Reg Reg 		-- src1, src2, dst
-	| FMOV		Size Reg Reg     		-- src, dst
-	| FMUL		Size Reg Reg Reg 		-- src1, src2, dst
- 	| FNEG		Size Reg Reg     		-- src, dst
-	| FSQRT		Size Reg Reg     		-- src, dst
-	| FSUB		Size Reg Reg Reg 		-- src1, src2, dst
-	| FxTOy		Size Size Reg Reg 		-- src, dst
-
-	-- Jumping around.
-	| BI		Cond Bool BlockId 		-- cond, annul?, target
-	| BF		Cond Bool BlockId 		-- cond, annul?, target
-
-	| JMP		AddrMode     			-- target
-
-	-- With a tabled jump we know all the possible destinations.
-	-- We also need this info so we can work out what regs are live across the jump.
-	-- 
-	| JMP_TBL	AddrMode [Maybe BlockId] CLabel
-
-	| CALL		(Either Imm Reg) Int Bool 	-- target, args, terminal
+        -- meta ops --------------------------------------------------
+        -- comment pseudo-op
+        = COMMENT FastString            
+
+        -- some static data spat out during code generation.
+        -- Will be extracted before pretty-printing.
+        | LDATA   Section CmmStatics    
+
+        -- Start a new basic block.  Useful during codegen, removed later.
+        -- Preceding instruction should be a jump, as per the invariants
+        -- for a BasicBlock (see Cmm).
+        | NEWBLOCK BlockId              
+
+        -- specify current stack offset for benefit of subsequent passes.
+        | DELTA   Int
+
+        -- real instrs -----------------------------------------------
+        -- Loads and stores.
+        | LD            Size AddrMode Reg               -- size, src, dst
+        | ST            Size Reg AddrMode               -- size, src, dst
+
+        -- Int Arithmetic.
+        --      x:   add/sub with carry bit. 
+        --              In SPARC V9 addx and friends were renamed addc. 
+        --
+        --      cc:  modify condition codes
+        -- 
+        | ADD           Bool Bool Reg RI Reg            -- x?, cc?, src1, src2, dst
+        | SUB           Bool Bool Reg RI Reg            -- x?, cc?, src1, src2, dst
+
+        | UMUL          Bool Reg RI Reg                 --     cc?, src1, src2, dst
+        | SMUL          Bool Reg RI Reg                 --     cc?, src1, src2, dst
+
+
+        -- The SPARC divide instructions perform 64bit by 32bit division
+        --   The Y register is xored into the first operand.
+
+        --   On _some implementations_ the Y register is overwritten by
+        --   the remainder, so we have to make sure it is 0 each time.
+
+        --   dst <- ((Y `shiftL` 32) `or` src1) `div` src2
+        | UDIV          Bool Reg RI Reg                 --     cc?, src1, src2, dst
+        | SDIV          Bool Reg RI Reg                 --     cc?, src1, src2, dst
+
+        | RDY           Reg                             -- move contents of Y register to reg
+        | WRY           Reg  Reg                        -- Y <- src1 `xor` src2
+        
+        -- Logic operations.
+        | AND           Bool Reg RI Reg                 -- cc?, src1, src2, dst
+        | ANDN          Bool Reg RI Reg                 -- cc?, src1, src2, dst
+        | OR            Bool Reg RI Reg                 -- cc?, src1, src2, dst
+        | ORN           Bool Reg RI Reg                 -- cc?, src1, src2, dst
+        | XOR           Bool Reg RI Reg                 -- cc?, src1, src2, dst
+        | XNOR          Bool Reg RI Reg                 -- cc?, src1, src2, dst
+        | SLL           Reg RI Reg                      -- src1, src2, dst
+        | SRL           Reg RI Reg                      -- src1, src2, dst
+        | SRA           Reg RI Reg                      -- src1, src2, dst
+
+        -- Load immediates.
+        | SETHI         Imm Reg                         -- src, dst
+
+        -- Do nothing.
+        -- Implemented by the assembler as SETHI 0, %g0, but worth an alias
+        | NOP                                           
+
+        -- Float Arithmetic.
+        -- Note that we cheat by treating F{ABS,MOV,NEG} of doubles as single
+        -- instructions right up until we spit them out.
+        --
+        | FABS          Size Reg Reg                    -- src dst
+        | FADD          Size Reg Reg Reg                -- src1, src2, dst
+        | FCMP          Bool Size Reg Reg               -- exception?, src1, src2, dst
+        | FDIV          Size Reg Reg Reg                -- src1, src2, dst
+        | FMOV          Size Reg Reg                    -- src, dst
+        | FMUL          Size Reg Reg Reg                -- src1, src2, dst
+        | FNEG          Size Reg Reg                    -- src, dst
+        | FSQRT         Size Reg Reg                    -- src, dst
+        | FSUB          Size Reg Reg Reg                -- src1, src2, dst
+        | FxTOy         Size Size Reg Reg               -- src, dst
+
+        -- Jumping around.
+        | BI            Cond Bool BlockId               -- cond, annul?, target
+        | BF            Cond Bool BlockId               -- cond, annul?, target
+
+        | JMP           AddrMode                        -- target
+
+        -- With a tabled jump we know all the possible destinations.
+        -- We also need this info so we can work out what regs are live across the jump.
+        -- 
+        | JMP_TBL       AddrMode [Maybe BlockId] CLabel
+
+        | CALL          (Either Imm Reg) Int Bool       -- target, args, terminal
 
 
 -- | regUsage returns the sets of src and destination registers used
--- 	by a particular instruction.  Machine registers that are
--- 	pre-allocated to stgRegs are filtered out, because they are
--- 	uninteresting from a register allocation standpoint.  (We wouldn't
--- 	want them to end up on the free list!)  As far as we are concerned,
--- 	the fixed registers simply don't exist (for allocation purposes,
--- 	anyway).
-
--- 	regUsage doesn't need to do any trickery for jumps and such.  Just
--- 	state precisely the regs read and written by that insn.  The
--- 	consequences of control flow transfers, as far as register
--- 	allocation goes, are taken care of by the register allocator.
+--      by a particular instruction.  Machine registers that are
+--      pre-allocated to stgRegs are filtered out, because they are
+--      uninteresting from a register allocation standpoint.  (We wouldn't
+--      want them to end up on the free list!)  As far as we are concerned,
+--      the fixed registers simply don't exist (for allocation purposes,
+--      anyway).
+
+--      regUsage doesn't need to do any trickery for jumps and such.  Just
+--      state precisely the regs read and written by that insn.  The
+--      consequences of control flow transfers, as far as register
+--      allocation goes, are taken care of by the register allocator.
 --
 sparc_regUsageOfInstr :: Platform -> Instr -> RegUsage
 sparc_regUsageOfInstr platform instr
  = case instr of
-    LD    _ addr reg  		-> usage (regAddr addr, 	[reg])
-    ST    _ reg addr  		-> usage (reg : regAddr addr, 	[])
-    ADD   _ _ r1 ar r2		-> usage (r1 : regRI ar, 	[r2])
-    SUB   _ _ r1 ar r2		-> usage (r1 : regRI ar, 	[r2])
-    UMUL    _ r1 ar r2		-> usage (r1 : regRI ar, 	[r2])
-    SMUL    _ r1 ar r2		-> usage (r1 : regRI ar, 	[r2])
-    UDIV    _ r1 ar r2		-> usage (r1 : regRI ar, 	[r2])
-    SDIV    _ r1 ar r2		-> usage (r1 : regRI ar, 	[r2])
-    RDY       rd           	-> usage ([], 		 	[rd])
-    WRY       r1 r2        	-> usage ([r1, r2], 	 	[])
-    AND     _ r1 ar r2  	-> usage (r1 : regRI ar, 	[r2])
-    ANDN    _ r1 ar r2 		-> usage (r1 : regRI ar, 	[r2])
-    OR      _ r1 ar r2   	-> usage (r1 : regRI ar, 	[r2])
-    ORN     _ r1 ar r2  	-> usage (r1 : regRI ar, 	[r2])
-    XOR     _ r1 ar r2  	-> usage (r1 : regRI ar, 	[r2])
-    XNOR    _ r1 ar r2 		-> usage (r1 : regRI ar, 	[r2])
-    SLL       r1 ar r2    	-> usage (r1 : regRI ar, 	[r2])
-    SRL       r1 ar r2    	-> usage (r1 : regRI ar,	[r2])
-    SRA       r1 ar r2    	-> usage (r1 : regRI ar, 	[r2])
-    SETHI   _ reg   		-> usage ([], 			[reg])
-    FABS    _ r1 r2    		-> usage ([r1], 		[r2])
-    FADD    _ r1 r2 r3 		-> usage ([r1, r2],		[r3])
-    FCMP    _ _  r1 r2  	-> usage ([r1, r2], 		[])
-    FDIV    _ r1 r2 r3 		-> usage ([r1, r2], 		[r3])
-    FMOV    _ r1 r2    		-> usage ([r1],			[r2])
-    FMUL    _ r1 r2 r3 		-> usage ([r1, r2],	 	[r3])
-    FNEG    _ r1 r2    		-> usage ([r1], 		[r2])
-    FSQRT   _ r1 r2   		-> usage ([r1], 		[r2])
-    FSUB    _ r1 r2 r3 		-> usage ([r1, r2], 		[r3])
-    FxTOy   _ _  r1 r2 		-> usage ([r1], 		[r2])
-
-    JMP     addr 		-> usage (regAddr addr, [])
-    JMP_TBL addr _ _    	-> usage (regAddr addr, [])
-
-    CALL  (Left _  )  _ True  	-> noUsage
-    CALL  (Left _  )  n False 	-> usage (argRegs n, callClobberedRegs)
-    CALL  (Right reg) _ True  	-> usage ([reg], [])
-    CALL  (Right reg) n False 	-> usage (reg : (argRegs n), callClobberedRegs)
-    _ 	    	    		-> noUsage
+    LD    _ addr reg            -> usage (regAddr addr,         [reg])
+    ST    _ reg addr            -> usage (reg : regAddr addr,   [])
+    ADD   _ _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SUB   _ _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    UMUL    _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SMUL    _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    UDIV    _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SDIV    _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    RDY       rd                -> usage ([],                   [rd])
+    WRY       r1 r2             -> usage ([r1, r2],             [])
+    AND     _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    ANDN    _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    OR      _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    ORN     _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    XOR     _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    XNOR    _ r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SLL       r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SRL       r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SRA       r1 ar r2          -> usage (r1 : regRI ar,        [r2])
+    SETHI   _ reg               -> usage ([],                   [reg])
+    FABS    _ r1 r2             -> usage ([r1],                 [r2])
+    FADD    _ r1 r2 r3          -> usage ([r1, r2],             [r3])
+    FCMP    _ _  r1 r2          -> usage ([r1, r2],             [])
+    FDIV    _ r1 r2 r3          -> usage ([r1, r2],             [r3])
+    FMOV    _ r1 r2             -> usage ([r1],                 [r2])
+    FMUL    _ r1 r2 r3          -> usage ([r1, r2],             [r3])
+    FNEG    _ r1 r2             -> usage ([r1],                 [r2])
+    FSQRT   _ r1 r2             -> usage ([r1],                 [r2])
+    FSUB    _ r1 r2 r3          -> usage ([r1, r2],             [r3])
+    FxTOy   _ _  r1 r2          -> usage ([r1],                 [r2])
+
+    JMP     addr                -> usage (regAddr addr, [])
+    JMP_TBL addr _ _            -> usage (regAddr addr, [])
+
+    CALL  (Left _  )  _ True    -> noUsage
+    CALL  (Left _  )  n False   -> usage (argRegs n, callClobberedRegs)
+    CALL  (Right reg) _ True    -> usage ([reg], [])
+    CALL  (Right reg) n False   -> usage (reg : (argRegs n), callClobberedRegs)
+    _                           -> noUsage
 
   where
     usage (src, dst) 
      = RU (filter (interesting platform) src)
           (filter (interesting platform) dst)
 
-    regAddr (AddrRegReg r1 r2)	= [r1, r2]
-    regAddr (AddrRegImm r1 _)	= [r1]
+    regAddr (AddrRegReg r1 r2)  = [r1, r2]
+    regAddr (AddrRegImm r1 _)   = [r1]
 
-    regRI (RIReg r)		= [r]
-    regRI  _			= []
+    regRI (RIReg r)             = [r]
+    regRI  _                    = []
 
 
 -- | Interesting regs are virtuals, or ones that are allocatable 
---	by the register allocator.
+--      by the register allocator.
 interesting :: Platform -> Reg -> Bool
 interesting platform reg
  = case reg of
-	RegVirtual _			-> True
-	RegReal (RealRegSingle r1)	-> isFastTrue (freeReg platform r1)
-	RegReal (RealRegPair r1 _)	-> isFastTrue (freeReg platform r1)
+        RegVirtual _                    -> True
+        RegReal (RealRegSingle r1)      -> isFastTrue (freeReg platform r1)
+        RegReal (RealRegPair r1 _)      -> isFastTrue (freeReg platform r1)
 
 
 
 -- | Apply a given mapping to tall the register references in this instruction.
 sparc_patchRegsOfInstr :: Instr -> (Reg -> Reg) -> Instr
 sparc_patchRegsOfInstr instr env = case instr of
-    LD    sz addr reg   	-> LD sz (fixAddr addr) (env reg)
-    ST    sz reg addr   	-> ST sz (env reg) (fixAddr addr)
-
-    ADD   x cc r1 ar r2 	-> ADD   x cc  (env r1) (fixRI ar) (env r2)
-    SUB   x cc r1 ar r2	 	-> SUB   x cc  (env r1) (fixRI ar) (env r2)
-    UMUL    cc r1 ar r2		-> UMUL    cc  (env r1) (fixRI ar) (env r2)
-    SMUL    cc r1 ar r2		-> SMUL    cc  (env r1) (fixRI ar) (env r2)
-    UDIV    cc r1 ar r2		-> UDIV    cc  (env r1) (fixRI ar) (env r2)
-    SDIV    cc r1 ar r2		-> SDIV    cc  (env r1) (fixRI ar) (env r2)
-    RDY   rd            	-> RDY         (env rd)
-    WRY   r1 r2			-> WRY         (env r1) (env r2)
-    AND   b r1 ar r2   	 	-> AND   b     (env r1) (fixRI ar) (env r2)
-    ANDN  b r1 ar r2    	-> ANDN  b     (env r1) (fixRI ar) (env r2)
-    OR    b r1 ar r2   		-> OR    b     (env r1) (fixRI ar) (env r2)
-    ORN   b r1 ar r2    	-> ORN   b     (env r1) (fixRI ar) (env r2)
-    XOR   b r1 ar r2    	-> XOR   b     (env r1) (fixRI ar) (env r2)
-    XNOR  b r1 ar r2    	-> XNOR  b     (env r1) (fixRI ar) (env r2)
-    SLL   r1 ar r2      	-> SLL         (env r1) (fixRI ar) (env r2)
-    SRL   r1 ar r2      	-> SRL         (env r1) (fixRI ar) (env r2)
-    SRA   r1 ar r2      	-> SRA         (env r1) (fixRI ar) (env r2)
-
-    SETHI imm reg       	-> SETHI imm (env reg)
-
-    FABS  s r1 r2       	-> FABS    s   (env r1) (env r2)
-    FADD  s r1 r2 r3    	-> FADD    s   (env r1) (env r2) (env r3)
-    FCMP  e s r1 r2     	-> FCMP e  s   (env r1) (env r2)
-    FDIV  s r1 r2 r3    	-> FDIV    s   (env r1) (env r2) (env r3)
-    FMOV  s r1 r2       	-> FMOV    s   (env r1) (env r2)
-    FMUL  s r1 r2 r3    	-> FMUL    s   (env r1) (env r2) (env r3)
-    FNEG  s r1 r2       	-> FNEG    s   (env r1) (env r2)
-    FSQRT s r1 r2       	-> FSQRT   s   (env r1) (env r2)
-    FSUB  s r1 r2 r3   	 	-> FSUB    s   (env r1) (env r2) (env r3)
-    FxTOy s1 s2 r1 r2   	-> FxTOy s1 s2 (env r1) (env r2)
-
-    JMP     addr        	-> JMP     (fixAddr addr)
-    JMP_TBL addr ids l  	-> JMP_TBL (fixAddr addr) ids l
-
-    CALL  (Left i) n t  	-> CALL (Left i) n t
-    CALL  (Right r) n t 	-> CALL (Right (env r)) n t
-    _ 				-> instr
+    LD    sz addr reg           -> LD sz (fixAddr addr) (env reg)
+    ST    sz reg addr           -> ST sz (env reg) (fixAddr addr)
+
+    ADD   x cc r1 ar r2         -> ADD   x cc  (env r1) (fixRI ar) (env r2)
+    SUB   x cc r1 ar r2         -> SUB   x cc  (env r1) (fixRI ar) (env r2)
+    UMUL    cc r1 ar r2         -> UMUL    cc  (env r1) (fixRI ar) (env r2)
+    SMUL    cc r1 ar r2         -> SMUL    cc  (env r1) (fixRI ar) (env r2)
+    UDIV    cc r1 ar r2         -> UDIV    cc  (env r1) (fixRI ar) (env r2)
+    SDIV    cc r1 ar r2         -> SDIV    cc  (env r1) (fixRI ar) (env r2)
+    RDY   rd                    -> RDY         (env rd)
+    WRY   r1 r2                 -> WRY         (env r1) (env r2)
+    AND   b r1 ar r2            -> AND   b     (env r1) (fixRI ar) (env r2)
+    ANDN  b r1 ar r2            -> ANDN  b     (env r1) (fixRI ar) (env r2)
+    OR    b r1 ar r2            -> OR    b     (env r1) (fixRI ar) (env r2)
+    ORN   b r1 ar r2            -> ORN   b     (env r1) (fixRI ar) (env r2)
+    XOR   b r1 ar r2            -> XOR   b     (env r1) (fixRI ar) (env r2)
+    XNOR  b r1 ar r2            -> XNOR  b     (env r1) (fixRI ar) (env r2)
+    SLL   r1 ar r2              -> SLL         (env r1) (fixRI ar) (env r2)
+    SRL   r1 ar r2              -> SRL         (env r1) (fixRI ar) (env r2)
+    SRA   r1 ar r2              -> SRA         (env r1) (fixRI ar) (env r2)
+
+    SETHI imm reg               -> SETHI imm (env reg)
+
+    FABS  s r1 r2               -> FABS    s   (env r1) (env r2)
+    FADD  s r1 r2 r3            -> FADD    s   (env r1) (env r2) (env r3)
+    FCMP  e s r1 r2             -> FCMP e  s   (env r1) (env r2)
+    FDIV  s r1 r2 r3            -> FDIV    s   (env r1) (env r2) (env r3)
+    FMOV  s r1 r2               -> FMOV    s   (env r1) (env r2)
+    FMUL  s r1 r2 r3            -> FMUL    s   (env r1) (env r2) (env r3)
+    FNEG  s r1 r2               -> FNEG    s   (env r1) (env r2)
+    FSQRT s r1 r2               -> FSQRT   s   (env r1) (env r2)
+    FSUB  s r1 r2 r3            -> FSUB    s   (env r1) (env r2) (env r3)
+    FxTOy s1 s2 r1 r2           -> FxTOy s1 s2 (env r1) (env r2)
+
+    JMP     addr                -> JMP     (fixAddr addr)
+    JMP_TBL addr ids l          -> JMP_TBL (fixAddr addr) ids l
+
+    CALL  (Left i) n t          -> CALL (Left i) n t
+    CALL  (Right r) n t         -> CALL (Right (env r)) n t
+    _                           -> instr
 
   where
-    fixAddr (AddrRegReg r1 r2) 	= AddrRegReg   (env r1) (env r2)
-    fixAddr (AddrRegImm r1 i)  	= AddrRegImm   (env r1) i
+    fixAddr (AddrRegReg r1 r2)  = AddrRegReg   (env r1) (env r2)
+    fixAddr (AddrRegImm r1 i)   = AddrRegImm   (env r1) i
 
-    fixRI (RIReg r) 		= RIReg (env r)
-    fixRI other			= other
+    fixRI (RIReg r)             = RIReg (env r)
+    fixRI other                 = other
 
 
 --------------------------------------------------------------------------------
 sparc_isJumpishInstr :: Instr -> Bool
 sparc_isJumpishInstr instr
  = case instr of
-	BI{}		-> True
-	BF{}		-> True
-	JMP{}		-> True
-	JMP_TBL{}	-> True
-	CALL{}		-> True
-	_		-> False
+        BI{}            -> True
+        BF{}            -> True
+        JMP{}           -> True
+        JMP_TBL{}       -> True
+        CALL{}          -> True
+        _               -> False
 
 sparc_jumpDestsOfInstr :: Instr -> [BlockId]
 sparc_jumpDestsOfInstr insn
   = case insn of
-	BI   _ _ id	-> [id]
-	BF   _ _ id	-> [id]
-	JMP_TBL _ ids _	-> [id | Just id <- ids]
-	_		-> []
+        BI   _ _ id     -> [id]
+        BF   _ _ id     -> [id]
+        JMP_TBL _ ids _ -> [id | Just id <- ids]
+        _               -> []
 
 
 sparc_patchJumpInstr :: Instr -> (BlockId -> BlockId) -> Instr
 sparc_patchJumpInstr insn patchF
   = case insn of
-	BI cc annul id	-> BI cc annul (patchF id)
-	BF cc annul id	-> BF cc annul (patchF id)
-	JMP_TBL n ids l	-> JMP_TBL n (map (fmap patchF) ids) l
-	_		-> insn
+        BI cc annul id  -> BI cc annul (patchF id)
+        BF cc annul id  -> BF cc annul (patchF id)
+        JMP_TBL n ids l -> JMP_TBL n (map (fmap patchF) ids) l
+        _               -> insn
 
 
 --------------------------------------------------------------------------------
 -- | Make a spill instruction.
--- 	On SPARC we spill below frame pointer leaving 2 words/spill
+--      On SPARC we spill below frame pointer leaving 2 words/spill
 sparc_mkSpillInstr
     :: DynFlags
     -> Reg      -- ^ register to spill
@@ -385,12 +379,12 @@ sparc_mkSpillInstr dflags reg _ slot
  = let  platform = targetPlatform dflags
         off      = spillSlotToOffset dflags slot
         off_w    = 1 + (off `div` 4)
-        sz 	= case targetClassOfReg platform reg of
-			RcInteger -> II32
-			RcFloat   -> FF32
-			RcDouble  -> FF64
-			_         -> panic "sparc_mkSpillInstr"
-		
+        sz      = case targetClassOfReg platform reg of
+                        RcInteger -> II32
+                        RcFloat   -> FF32
+                        RcDouble  -> FF64
+                        _         -> panic "sparc_mkSpillInstr"
+                
     in ST sz reg (fpRel (negate off_w))
 
 
@@ -405,12 +399,12 @@ sparc_mkLoadInstr
 sparc_mkLoadInstr dflags reg _ slot
   = let platform = targetPlatform dflags
         off      = spillSlotToOffset dflags slot
-	off_w	= 1 + (off `div` 4)
-        sz	= case targetClassOfReg platform reg of
-			RcInteger -> II32
-			RcFloat   -> FF32
-			RcDouble  -> FF64
-			_         -> panic "sparc_mkLoadInstr"
+        off_w   = 1 + (off `div` 4)
+        sz      = case targetClassOfReg platform reg of
+                        RcInteger -> II32
+                        RcFloat   -> FF32
+                        RcDouble  -> FF64
+                        _         -> panic "sparc_mkLoadInstr"
 
         in LD sz (fpRel (- off_w)) reg
 
@@ -418,32 +412,32 @@ sparc_mkLoadInstr dflags reg _ slot
 --------------------------------------------------------------------------------
 -- | See if this instruction is telling us the current C stack delta
 sparc_takeDeltaInstr
-	:: Instr
-	-> Maybe Int
-	
+        :: Instr
+        -> Maybe Int
+        
 sparc_takeDeltaInstr instr
  = case instr of
- 	DELTA i		-> Just i
-	_		-> Nothing
+        DELTA i         -> Just i
+        _               -> Nothing
 
 
 sparc_isMetaInstr
-	:: Instr
-	-> Bool
-	
+        :: Instr
+        -> Bool
+        
 sparc_isMetaInstr instr
  = case instr of
- 	COMMENT{}	-> True
-	LDATA{}		-> True
-	NEWBLOCK{}	-> True
-	DELTA{}		-> True
-	_		-> False
-	
+        COMMENT{}       -> True
+        LDATA{}         -> True
+        NEWBLOCK{}      -> True
+        DELTA{}         -> True
+        _               -> False
+        
 
 -- | Make a reg-reg move instruction.
---	On SPARC v8 there are no instructions to move directly between
---	floating point and integer regs. If we need to do that then we
---	have to go via memory.
+--      On SPARC v8 there are no instructions to move directly between
+--      floating point and integer regs. If we need to do that then we
+--      have to go via memory.
 --
 sparc_mkRegRegMoveInstr
     :: Platform
@@ -452,40 +446,40 @@ sparc_mkRegRegMoveInstr
     -> Instr
 
 sparc_mkRegRegMoveInstr platform src dst
-	| srcClass	<- targetClassOfReg platform src
-	, dstClass	<- targetClassOfReg platform dst
-	, srcClass == dstClass
-	= case srcClass of
-		RcInteger -> ADD  False False src (RIReg g0) dst
-		RcDouble  -> FMOV FF64 src dst
-		RcFloat   -> FMOV FF32 src dst
+        | srcClass      <- targetClassOfReg platform src
+        , dstClass      <- targetClassOfReg platform dst
+        , srcClass == dstClass
+        = case srcClass of
+                RcInteger -> ADD  False False src (RIReg g0) dst
+                RcDouble  -> FMOV FF64 src dst
+                RcFloat   -> FMOV FF32 src dst
                 _         -> panic "sparc_mkRegRegMoveInstr"
-	
-	| otherwise
-	= panic "SPARC.Instr.mkRegRegMoveInstr: classes of src and dest not the same"
+        
+        | otherwise
+        = panic "SPARC.Instr.mkRegRegMoveInstr: classes of src and dest not the same"
 
 
 -- | Check whether an instruction represents a reg-reg move.
--- 	The register allocator attempts to eliminate reg->reg moves whenever it can,
--- 	by assigning the src and dest temporaries to the same real register.
+--      The register allocator attempts to eliminate reg->reg moves whenever it can,
+--      by assigning the src and dest temporaries to the same real register.
 --
 sparc_takeRegRegMoveInstr :: Instr -> Maybe (Reg,Reg)
 sparc_takeRegRegMoveInstr instr
  = case instr of
- 	ADD False False src (RIReg src2) dst
-	 | g0 == src2		-> Just (src, dst)
+        ADD False False src (RIReg src2) dst
+         | g0 == src2           -> Just (src, dst)
 
-	FMOV FF64 src dst	-> Just (src, dst)
-	FMOV FF32  src dst	-> Just (src, dst)
-	_			-> Nothing
+        FMOV FF64 src dst       -> Just (src, dst)
+        FMOV FF32  src dst      -> Just (src, dst)
+        _                       -> Nothing
 
 
 -- | Make an unconditional branch instruction.
 sparc_mkJumpInstr
-	:: BlockId
-	-> [Instr]
+        :: BlockId
+        -> [Instr]
 
 sparc_mkJumpInstr id 
- = 	 [BI ALWAYS False id
-	, NOP]			-- fill the branch delay slot.
+ =       [BI ALWAYS False id
+        , NOP]                  -- fill the branch delay slot.
 
diff --git a/compiler/nativeGen/SPARC/Regs.hs b/compiler/nativeGen/SPARC/Regs.hs
index 55b6ac9..b5db1c8 100644
--- a/compiler/nativeGen/SPARC/Regs.hs
+++ b/compiler/nativeGen/SPARC/Regs.hs
@@ -4,36 +4,30 @@
 -- 
 -- -----------------------------------------------------------------------------
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.Regs (
-	-- registers
-	showReg,
-	virtualRegSqueeze,
-	realRegSqueeze,
-	classOfRealReg,
-	allRealRegs,
-
-	-- machine specific info
-	gReg, iReg, lReg, oReg, fReg,
-	fp, sp, g0, g1, g2, o0, o1, f0, f1, f6, f8, f22, f26, f27,
-
-	-- allocatable
-	allocatableRegs,
-
-	-- args
-	argRegs, 
-	allArgRegs, 
-	callClobberedRegs,
-
-	-- 
-	mkVirtualReg,
-	regDotColor
+        -- registers
+        showReg,
+        virtualRegSqueeze,
+        realRegSqueeze,
+        classOfRealReg,
+        allRealRegs,
+
+        -- machine specific info
+        gReg, iReg, lReg, oReg, fReg,
+        fp, sp, g0, g1, g2, o0, o1, f0, f1, f6, f8, f22, f26, f27,
+
+        -- allocatable
+        allocatableRegs,
+
+        -- args
+        argRegs, 
+        allArgRegs, 
+        callClobberedRegs,
+
+        -- 
+        mkVirtualReg,
+        regDotColor
 )
 
 where
@@ -50,65 +44,65 @@ import FastTypes
 import FastBool
 
 {-
-	The SPARC has 64 registers of interest; 32 integer registers and 32
-	floating point registers.  The mapping of STG registers to SPARC
-	machine registers is defined in StgRegs.h.  We are, of course,
-	prepared for any eventuality.
-
-	The whole fp-register pairing thing on sparcs is a huge nuisance.  See
-	includes/stg/MachRegs.h for a description of what's going on
-	here.
+        The SPARC has 64 registers of interest; 32 integer registers and 32
+        floating point registers.  The mapping of STG registers to SPARC
+        machine registers is defined in StgRegs.h.  We are, of course,
+        prepared for any eventuality.
+
+        The whole fp-register pairing thing on sparcs is a huge nuisance.  See
+        includes/stg/MachRegs.h for a description of what's going on
+        here.
 -}
 
 
 -- | Get the standard name for the register with this number.
 showReg :: RegNo -> String
 showReg n
-	| n >= 0  && n < 8   = "%g" ++ show n
-	| n >= 8  && n < 16  = "%o" ++ show (n-8)
-	| n >= 16 && n < 24  = "%l" ++ show (n-16)
-	| n >= 24 && n < 32  = "%i" ++ show (n-24)
-	| n >= 32 && n < 64  = "%f" ++ show (n-32)
-	| otherwise          = panic "SPARC.Regs.showReg: unknown sparc register"
+        | n >= 0  && n < 8   = "%g" ++ show n
+        | n >= 8  && n < 16  = "%o" ++ show (n-8)
+        | n >= 16 && n < 24  = "%l" ++ show (n-16)
+        | n >= 24 && n < 32  = "%i" ++ show (n-24)
+        | n >= 32 && n < 64  = "%f" ++ show (n-32)
+        | otherwise          = panic "SPARC.Regs.showReg: unknown sparc register"
 
 
 -- Get the register class of a certain real reg
 classOfRealReg :: RealReg -> RegClass
 classOfRealReg reg
  = case reg of
- 	RealRegSingle i
-		| i < 32	-> RcInteger
-		| otherwise	-> RcFloat
-		
-	RealRegPair{}		-> RcDouble
+        RealRegSingle i
+                | i < 32        -> RcInteger
+                | otherwise     -> RcFloat
+                
+        RealRegPair{}           -> RcDouble
 
 
 -- | regSqueeze_class reg
---	Calculuate the maximum number of register colors that could be
---	denied to a node of this class due to having this reg 
---	as a neighbour.
+--      Calculuate the maximum number of register colors that could be
+--      denied to a node of this class due to having this reg 
+--      as a neighbour.
 --
 {-# INLINE virtualRegSqueeze #-}
 virtualRegSqueeze :: RegClass -> VirtualReg -> FastInt
 
 virtualRegSqueeze cls vr
  = case cls of
- 	RcInteger
-	 -> case vr of
-	 	VirtualRegI{}		-> _ILIT(1)
-		VirtualRegHi{}		-> _ILIT(1)
+        RcInteger
+         -> case vr of
+                VirtualRegI{}           -> _ILIT(1)
+                VirtualRegHi{}          -> _ILIT(1)
                 _other                  -> _ILIT(0)
 
-	RcFloat
-	 -> case vr of
-		VirtualRegF{}		-> _ILIT(1)
-		VirtualRegD{}		-> _ILIT(2)
+        RcFloat
+         -> case vr of
+                VirtualRegF{}           -> _ILIT(1)
+                VirtualRegD{}           -> _ILIT(2)
                 _other                  -> _ILIT(0)
 
-	RcDouble
-	 -> case vr of
-		VirtualRegF{}		-> _ILIT(1)
-		VirtualRegD{}		-> _ILIT(1)
+        RcDouble
+         -> case vr of
+                VirtualRegF{}           -> _ILIT(1)
+                VirtualRegD{}           -> _ILIT(1)
                 _other                  -> _ILIT(0)
 
         _other -> _ILIT(0)
@@ -118,48 +112,48 @@ realRegSqueeze :: RegClass -> RealReg -> FastInt
 
 realRegSqueeze cls rr
  = case cls of
- 	RcInteger
-	 -> case rr of
-	 	RealRegSingle regNo
-			| regNo	< 32	-> _ILIT(1)
-			| otherwise	-> _ILIT(0)
-			
-		RealRegPair{}		-> _ILIT(0)
-
-	RcFloat
-	 -> case rr of
-	 	RealRegSingle regNo
-			| regNo	< 32	-> _ILIT(0)
-			| otherwise	-> _ILIT(1)
-			
-		RealRegPair{}		-> _ILIT(2)
-
-	RcDouble
-	 -> case rr of
-	 	RealRegSingle regNo
-			| regNo	< 32	-> _ILIT(0)
-			| otherwise	-> _ILIT(1)
-			
-		RealRegPair{}		-> _ILIT(1)
-	 		 	 	
+        RcInteger
+         -> case rr of
+                RealRegSingle regNo
+                        | regNo < 32    -> _ILIT(1)
+                        | otherwise     -> _ILIT(0)
+                        
+                RealRegPair{}           -> _ILIT(0)
+
+        RcFloat
+         -> case rr of
+                RealRegSingle regNo
+                        | regNo < 32    -> _ILIT(0)
+                        | otherwise     -> _ILIT(1)
+                        
+                RealRegPair{}           -> _ILIT(2)
+
+        RcDouble
+         -> case rr of
+                RealRegSingle regNo
+                        | regNo < 32    -> _ILIT(0)
+                        | otherwise     -> _ILIT(1)
+                        
+                RealRegPair{}           -> _ILIT(1)
+                                        
         _other -> _ILIT(0)
- 	
+        
 -- | All the allocatable registers in the machine, 
---	including register pairs.
+--      including register pairs.
 allRealRegs :: [RealReg]
 allRealRegs  
-	=  [ (RealRegSingle i)		| i <- [0..63] ]
-	++ [ (RealRegPair   i (i+1))	| i <- [32, 34 .. 62 ] ]
+        =  [ (RealRegSingle i)          | i <- [0..63] ]
+        ++ [ (RealRegPair   i (i+1))    | i <- [32, 34 .. 62 ] ]
 
 
 -- | Get the regno for this sort of reg
 gReg, lReg, iReg, oReg, fReg :: Int -> RegNo
 
-gReg x	= x		-- global regs
-oReg x	= (8 + x)	-- output regs
-lReg x	= (16 + x)	-- local regs
-iReg x	= (24 + x)	-- input regs
-fReg x	= (32 + x)	-- float regs
+gReg x  = x             -- global regs
+oReg x  = (8 + x)       -- output regs
+lReg x  = (16 + x)      -- local regs
+iReg x  = (24 + x)      -- input regs
+fReg x  = (32 + x)      -- float regs
 
 
 -- | Some specific regs used by the code generator.
@@ -188,87 +182,87 @@ f1  = RegReal (RealRegSingle (fReg 1))
 {-
 fPair :: Reg -> Maybe Reg
 fPair (RealReg n) 
-	| n >= 32 && n `mod` 2 == 0  = Just (RealReg (n+1))
+        | n >= 32 && n `mod` 2 == 0  = Just (RealReg (n+1))
 
 fPair (VirtualRegD u)
-	= Just (VirtualRegHi u)
+        = Just (VirtualRegHi u)
 
 fPair reg
-	= trace ("MachInstrs.fPair: can't get high half of supposed double reg " ++ showPpr reg)
-		Nothing
+        = trace ("MachInstrs.fPair: can't get high half of supposed double reg " ++ showPpr reg)
+                Nothing
 -}
 
 
 -- | All the regs that the register allocator can allocate to, 
---	with the the fixed use regs removed.
+--      with the the fixed use regs removed.
 -- 
 allocatableRegs :: [RealReg]
 allocatableRegs
    = let isFree rr 
-   	   = case rr of
-	   	RealRegSingle r		
-			-> isFastTrue (freeReg r)
+           = case rr of
+                RealRegSingle r         
+                        -> isFastTrue (freeReg r)
 
-		RealRegPair   r1 r2	
-			-> isFastTrue (freeReg r1) 
-			&& isFastTrue (freeReg r2)
+                RealRegPair   r1 r2     
+                        -> isFastTrue (freeReg r1) 
+                        && isFastTrue (freeReg r2)
 
-     in	filter isFree allRealRegs
+     in filter isFree allRealRegs
 
 
 -- | The registers to place arguments for function calls, 
---	for some number of arguments.
+--      for some number of arguments.
 --
 argRegs :: RegNo -> [Reg]
 argRegs r
  = case r of
- 	0	-> []
-	1	-> map (RegReal . RealRegSingle . oReg) [0]
-	2	-> map (RegReal . RealRegSingle . oReg) [0,1]
-	3	-> map (RegReal . RealRegSingle . oReg) [0,1,2]
-	4	-> map (RegReal . RealRegSingle . oReg) [0,1,2,3]
-	5	-> map (RegReal . RealRegSingle . oReg) [0,1,2,3,4]
-	6	-> map (RegReal . RealRegSingle . oReg) [0,1,2,3,4,5]
-	_	-> panic "MachRegs.argRegs(sparc): don't know about >6 arguments!"
+        0       -> []
+        1       -> map (RegReal . RealRegSingle . oReg) [0]
+        2       -> map (RegReal . RealRegSingle . oReg) [0,1]
+        3       -> map (RegReal . RealRegSingle . oReg) [0,1,2]
+        4       -> map (RegReal . RealRegSingle . oReg) [0,1,2,3]
+        5       -> map (RegReal . RealRegSingle . oReg) [0,1,2,3,4]
+        6       -> map (RegReal . RealRegSingle . oReg) [0,1,2,3,4,5]
+        _       -> panic "MachRegs.argRegs(sparc): don't know about >6 arguments!"
 
 
 -- | All all the regs that could possibly be returned by argRegs
 --
 allArgRegs :: [Reg]
 allArgRegs 
-	= map (RegReal . RealRegSingle) [oReg i | i <- [0..5]]
+        = map (RegReal . RealRegSingle) [oReg i | i <- [0..5]]
 
 
 -- These are the regs that we cannot assume stay alive over a C call.  
---	TODO: Why can we assume that o6 isn't clobbered? -- BL 2009/02
+--      TODO: Why can we assume that o6 isn't clobbered? -- BL 2009/02
 --
 callClobberedRegs :: [Reg]
 callClobberedRegs
-	= map (RegReal . RealRegSingle)
-	        (  oReg 7 :
-	          [oReg i | i <- [0..5]] ++
-	          [gReg i | i <- [1..7]] ++
-	          [fReg i | i <- [0..31]] )
+        = map (RegReal . RealRegSingle)
+                (  oReg 7 :
+                  [oReg i | i <- [0..5]] ++
+                  [gReg i | i <- [1..7]] ++
+                  [fReg i | i <- [0..31]] )
 
 
 
 -- | Make a virtual reg with this size.
 mkVirtualReg :: Unique -> Size -> VirtualReg
 mkVirtualReg u size
-	| not (isFloatSize size) 
-	= VirtualRegI u
+        | not (isFloatSize size) 
+        = VirtualRegI u
 
-	| otherwise
-	= case size of
-		FF32    -> VirtualRegF u
-		FF64	-> VirtualRegD u
-		_ 	-> panic "mkVReg"
+        | otherwise
+        = case size of
+                FF32    -> VirtualRegF u
+                FF64    -> VirtualRegD u
+                _       -> panic "mkVReg"
 
 
 regDotColor :: RealReg -> SDoc
 regDotColor reg
  = case classOfRealReg reg of
- 	RcInteger	-> text "blue"
-	RcFloat		-> text "red"
-	_other          -> text "green"
+        RcInteger       -> text "blue"
+        RcFloat         -> text "red"
+        _other          -> text "green"
 
diff --git a/compiler/nativeGen/SPARC/ShortcutJump.hs b/compiler/nativeGen/SPARC/ShortcutJump.hs
index 7f978c1..edaf58b 100644
--- a/compiler/nativeGen/SPARC/ShortcutJump.hs
+++ b/compiler/nativeGen/SPARC/ShortcutJump.hs
@@ -1,17 +1,11 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.ShortcutJump (
-	JumpDest(..), getJumpDestBlockId,
-	canShortcut,
-	shortcutJump,
-	shortcutStatics,
-	shortBlockId
+        JumpDest(..), getJumpDestBlockId,
+        canShortcut,
+        shortcutJump,
+        shortcutStatics,
+        shortBlockId
 )
 
 where
@@ -29,8 +23,8 @@ import Unique
 
 
 data JumpDest 
-	= DestBlockId BlockId 
-	| DestImm Imm
+        = DestBlockId BlockId 
+        | DestImm Imm
 
 getJumpDestBlockId :: JumpDest -> Maybe BlockId
 getJumpDestBlockId (DestBlockId bid) = Just bid
@@ -59,9 +53,9 @@ shortcutLabel fn lab
 
 shortcutStatic :: (BlockId -> Maybe JumpDest) -> CmmStatic -> CmmStatic
 shortcutStatic fn (CmmStaticLit (CmmLabel lab))
-	= CmmStaticLit (CmmLabel (shortcutLabel fn lab))
+        = CmmStaticLit (CmmLabel (shortcutLabel fn lab))
 shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off))
-	= CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off)
+        = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off)
 -- slightly dodgy, we're ignoring the second label, but this
 -- works with the way we use CmmLabelDiffOff for jump tables now.
 shortcutStatic _ other_static
diff --git a/compiler/nativeGen/SPARC/Stack.hs b/compiler/nativeGen/SPARC/Stack.hs
index 4a6f4c1..03b4a4c 100644
--- a/compiler/nativeGen/SPARC/Stack.hs
+++ b/compiler/nativeGen/SPARC/Stack.hs
@@ -1,16 +1,10 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SPARC.Stack (
-	spRel,
-	fpRel,
-	spillSlotToOffset,
-	maxSpillSlots
+        spRel,
+        fpRel,
+        spillSlotToOffset,
+        maxSpillSlots
 )
 
 where
@@ -24,43 +18,43 @@ import DynFlags
 import Outputable
 
 -- | Get an AddrMode relative to the address in sp.
---	This gives us a stack relative addressing mode for volatile
--- 	temporaries and for excess call arguments.  
+--      This gives us a stack relative addressing mode for volatile
+--      temporaries and for excess call arguments.  
 --
-spRel :: Int		-- ^ stack offset in words, positive or negative
+spRel :: Int            -- ^ stack offset in words, positive or negative
       -> AddrMode
 
-spRel n	= AddrRegImm sp (ImmInt (n * wordLength))
+spRel n = AddrRegImm sp (ImmInt (n * wordLength))
 
 
 -- | Get an address relative to the frame pointer.
---	This doesn't work work for offsets greater than 13 bits; we just hope for the best
+--      This doesn't work work for offsets greater than 13 bits; we just hope for the best
 --
 fpRel :: Int -> AddrMode
 fpRel n
-	= AddrRegImm fp (ImmInt (n * wordLength))
+        = AddrRegImm fp (ImmInt (n * wordLength))
 
 
 -- | Convert a spill slot number to a *byte* offset, with no sign.
 --
 spillSlotToOffset :: DynFlags -> Int -> Int
 spillSlotToOffset dflags slot
-	| slot >= 0 && slot < maxSpillSlots dflags
-	= 64 + spillSlotSize * slot
+        | slot >= 0 && slot < maxSpillSlots dflags
+        = 64 + spillSlotSize * slot
 
-	| otherwise
-	= pprPanic "spillSlotToOffset:" 
-	              (   text "invalid spill location: " <> int slot
-		      $$  text "maxSpillSlots:          " <> int (maxSpillSlots dflags))
+        | otherwise
+        = pprPanic "spillSlotToOffset:" 
+                      (   text "invalid spill location: " <> int slot
+                      $$  text "maxSpillSlots:          " <> int (maxSpillSlots dflags))
 
 
 -- | The maximum number of spill slots available on the C stack.
---	If we use up all of the slots, then we're screwed.
+--      If we use up all of the slots, then we're screwed.
 --
---	Why do we reserve 64 bytes, instead of using the whole thing??
---		-- BL 2009/02/15
+--      Why do we reserve 64 bytes, instead of using the whole thing??
+--              -- BL 2009/02/15
 --
 maxSpillSlots :: DynFlags -> Int
 maxSpillSlots dflags
-	= ((spillAreaLength dflags - 64) `div` spillSlotSize) - 1
+        = ((spillAreaLength dflags - 64) `div` spillSlotSize) - 1
 
diff --git a/compiler/nativeGen/Size.hs b/compiler/nativeGen/Size.hs
index 45a3964..39eb4f7 100644
--- a/compiler/nativeGen/Size.hs
+++ b/compiler/nativeGen/Size.hs
@@ -1,22 +1,16 @@
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Sizes on this architecture
--- 	A Size is a combination of width and class
+--      A Size is a combination of width and class
 -- 
--- 	TODO: 	Rename this to "Format" instead of "Size" to reflect
---		the fact that it represents floating point vs integer.
+--      TODO:   Rename this to "Format" instead of "Size" to reflect
+--              the fact that it represents floating point vs integer.
 --
---	TODO: 	Signed vs unsigned?
+--      TODO:   Signed vs unsigned?
 --
---	TODO:	This module is currenly shared by all architectures because
---		NCGMonad need to know about it to make a VReg. It would be better
---		to have architecture specific formats, and do the overloading
---		properly. eg SPARC doesn't care about FF80.
+--      TODO:   This module is currenly shared by all architectures because
+--              NCGMonad need to know about it to make a VReg. It would be better
+--              to have architecture specific formats, and do the overloading
+--              properly. eg SPARC doesn't care about FF80.
 --
 module Size (
     Size(..),
@@ -38,75 +32,75 @@ import Outputable
 -- without global consequences.
 --
 -- A major use is as an opcode qualifier; thus the opcode 
---	mov.l a b
+--      mov.l a b
 -- might be encoded 
--- 	MOV II32 a b
+--      MOV II32 a b
 -- where the Size field encodes the ".l" part.
 
 -- ToDo: it's not clear to me that we need separate signed-vs-unsigned sizes
--- 	  here.  I've removed them from the x86 version, we'll see what happens --SDM
+--        here.  I've removed them from the x86 version, we'll see what happens --SDM
 
 -- ToDo: quite a few occurrences of Size could usefully be replaced by Width
 
 data Size
-	= II8 
-	| II16 
-	| II32 
-	| II64 
-	| FF32 
-	| FF64 
-	| FF80
-	deriving (Show, Eq)
+        = II8 
+        | II16 
+        | II32 
+        | II64 
+        | FF32 
+        | FF64 
+        | FF80
+        deriving (Show, Eq)
 
 
 -- | Get the integer size of this width.
 intSize :: Width -> Size
 intSize width
  = case width of
- 	W8 	-> II8
-	W16	-> II16
-	W32	-> II32
-	W64 	-> II64
-	other	-> pprPanic "Size.intSize" (ppr other)
+        W8      -> II8
+        W16     -> II16
+        W32     -> II32
+        W64     -> II64
+        other   -> pprPanic "Size.intSize" (ppr other)
 
 
 -- | Get the float size of this width.
 floatSize :: Width -> Size
 floatSize width
  = case width of
- 	W32	-> FF32
-	W64	-> FF64
-	other 	-> pprPanic "Size.floatSize" (ppr other)
+        W32     -> FF32
+        W64     -> FF64
+        other   -> pprPanic "Size.floatSize" (ppr other)
 
 
 -- | Check if a size represents a floating point value.
 isFloatSize :: Size -> Bool
 isFloatSize size
  = case size of
- 	FF32	-> True
-	FF64	-> True
-	FF80	-> True
-	_	-> False
+        FF32    -> True
+        FF64    -> True
+        FF80    -> True
+        _       -> False
 
 
 -- | Convert a Cmm type to a Size.
 cmmTypeSize :: CmmType -> Size
 cmmTypeSize ty 
-	| isFloatType ty	= floatSize (typeWidth ty)
-	| otherwise		= intSize (typeWidth ty)
+        | isFloatType ty        = floatSize (typeWidth ty)
+        | otherwise             = intSize (typeWidth ty)
 
 
 -- | Get the Width of a Size.
 sizeToWidth :: Size -> Width
 sizeToWidth size
  = case size of
- 	II8		-> W8
-	II16		-> W16
-	II32		-> W32
-	II64		-> W64
-	FF32		-> W32
-	FF64		-> W64
-	FF80		-> W80
+        II8             -> W8
+        II16            -> W16
+        II32            -> W32
+        II64            -> W64
+        FF32            -> W32
+        FF64            -> W64
+        FF80            -> W80
 
 sizeInBytes :: Size -> Int
 sizeInBytes = widthInBytes . sizeToWidth
diff --git a/compiler/nativeGen/TargetReg.hs b/compiler/nativeGen/TargetReg.hs
index 09c774f..a79f67e 100644
--- a/compiler/nativeGen/TargetReg.hs
+++ b/compiler/nativeGen/TargetReg.hs
@@ -1,28 +1,22 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Hard wired things related to registers.
---	This is module is preventing the native code generator being able to 
---	emit code for non-host architectures.
+--      This is module is preventing the native code generator being able to 
+--      emit code for non-host architectures.
 --
---	TODO: Do a better job of the overloading, and eliminate this module.
---	We'd probably do better with a Register type class, and hook this to 
---	Instruction somehow.
+--      TODO: Do a better job of the overloading, and eliminate this module.
+--      We'd probably do better with a Register type class, and hook this to 
+--      Instruction somehow.
 --
---	TODO: We should also make arch specific versions of RegAlloc.Graph.TrivColorable
+--      TODO: We should also make arch specific versions of RegAlloc.Graph.TrivColorable
 
 module TargetReg (
-	targetVirtualRegSqueeze,
-	targetRealRegSqueeze,
-	targetClassOfRealReg,
-	targetMkVirtualReg,
-	targetRegDotColor,
-	targetClassOfReg
+        targetVirtualRegSqueeze,
+        targetRealRegSqueeze,
+        targetClassOfRealReg,
+        targetMkVirtualReg,
+        targetRegDotColor,
+        targetClassOfReg
 )
 
 where
diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs
index 8c63933..e4483fc 100644
--- a/compiler/nativeGen/X86/RegInfo.hs
+++ b/compiler/nativeGen/X86/RegInfo.hs
@@ -1,14 +1,8 @@
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module X86.RegInfo (
-	mkVirtualReg,
-	regDotColor
+        mkVirtualReg,
+        regDotColor
 )
 
 where
@@ -30,9 +24,9 @@ import X86.Regs
 mkVirtualReg :: Unique -> Size -> VirtualReg
 mkVirtualReg u size
    = case size of
-        FF32	-> VirtualRegSSE u
-        FF64	-> VirtualRegSSE u
-        FF80	-> VirtualRegD   u
+        FF32    -> VirtualRegSSE u
+        FF64    -> VirtualRegSSE u
+        FF80    -> VirtualRegD   u
         _other  -> VirtualRegI   u
 
 regDotColor :: Platform -> RealReg -> SDoc
@@ -65,11 +59,11 @@ normalRegColors platform
 fpRegColors :: [(Reg,String)]
 fpRegColors =
         [ (fake0, "#ff00ff")
-	, (fake1, "#ff00aa")
-	, (fake2, "#aa00ff")
-	, (fake3, "#aa00aa")
-	, (fake4, "#ff0055")
-	, (fake5, "#5500ff") ]
+        , (fake1, "#ff00aa")
+        , (fake2, "#aa00ff")
+        , (fake3, "#aa00aa")
+        , (fake4, "#ff0055")
+        , (fake5, "#5500ff") ]
 
-	++ zip (map regSingle [24..39]) (repeat "red")
+        ++ zip (map regSingle [24..39]) (repeat "red")
 
diff --git a/compiler/parser/Ctype.lhs b/compiler/parser/Ctype.lhs
index b5173b2..f004d63 100644
--- a/compiler/parser/Ctype.lhs
+++ b/compiler/parser/Ctype.lhs
@@ -1,32 +1,26 @@
 Character classification
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module Ctype
-	( is_ident	-- Char# -> Bool
-	, is_symbol	-- Char# -> Bool
-	, is_any	-- Char# -> Bool
-	, is_space	-- Char# -> Bool
-	, is_lower	-- Char# -> Bool
-	, is_upper	-- Char# -> Bool
-	, is_digit	-- Char# -> Bool
-	, is_alphanum   -- Char# -> Bool
-
-	, is_decdigit, is_hexdigit, is_octdigit
-	, hexDigit, octDecDigit
-	) where
+        ( is_ident      -- Char# -> Bool
+        , is_symbol     -- Char# -> Bool
+        , is_any        -- Char# -> Bool
+        , is_space      -- Char# -> Bool
+        , is_lower      -- Char# -> Bool
+        , is_upper      -- Char# -> Bool
+        , is_digit      -- Char# -> Bool
+        , is_alphanum   -- Char# -> Bool
+
+        , is_decdigit, is_hexdigit, is_octdigit
+        , hexDigit, octDecDigit
+        ) where
 
 #include "HsVersions.h"
 
-import Data.Int		( Int32 )
-import Data.Bits	( Bits((.&.)) )
-import Data.Char	( ord, chr )
+import Data.Int         ( Int32 )
+import Data.Bits        ( Bits((.&.)) )
+import Data.Char        ( ord, chr )
 import Panic
 \end{code}
 
@@ -75,13 +69,13 @@ octDecDigit c = ord c - ord '0'
 
 is_decdigit :: Char -> Bool
 is_decdigit c
-	=  c >= '0' && c <= '9'
+        =  c >= '0' && c <= '9'
 
 is_hexdigit :: Char -> Bool
 is_hexdigit c
-	=  is_decdigit c 
-	|| (c >= 'a' && c <= 'f')
-	|| (c >= 'A' && c <= 'F')
+        =  is_decdigit c 
+        || (c >= 'a' && c <= 'f')
+        || (c >= 'A' && c <= 'F')
 
 is_octdigit :: Char -> Bool
 is_octdigit c = c >= '0' && c <= '7'
@@ -108,7 +102,7 @@ charType c = case c of
    '\7'   -> 0                         -- \007
    '\8'   -> 0                         -- \010
    '\9'   -> cSpace                    -- \t  (not allowed in strings, so !cAny)
-   '\10'  -> cSpace	               -- \n  (ditto)
+   '\10'  -> cSpace                    -- \n  (ditto)
    '\11'  -> cSpace                    -- \v  (ditto)
    '\12'  -> cSpace                    -- \f  (ditto)
    '\13'  -> cSpace                    --  ^M (ditto)
diff --git a/compiler/prelude/PrelInfo.lhs b/compiler/prelude/PrelInfo.lhs
index bfcea1c..348c359 100644
--- a/compiler/prelude/PrelInfo.lhs
+++ b/compiler/prelude/PrelInfo.lhs
@@ -4,12 +4,6 @@
 \section[PrelInfo]{The @PrelInfo@ interface to the compiler's prelude knowledge}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module PrelInfo (
         wiredInIds, ghcPrimIds,
@@ -48,9 +42,9 @@ import Data.Array
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[builtinNameInfo]{Lookup built-in names}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Notes about wired in things
@@ -59,7 +53,7 @@ Notes about wired in things
   They are global values in GHC, (e.g.  listTyCon :: TyCon).
 
 * A wired in Name contains the thing itself inside the Name: 
-	see Name.wiredInNameTyThing_maybe
+        see Name.wiredInNameTyThing_maybe
   (E.g. listTyConName contains listTyCon. 
 
 * The name cache is initialised with (the names of) all wired-in things
@@ -77,17 +71,17 @@ wiredInThings :: [TyThing]
 -- This list is used only to initialise HscMain.knownKeyNames
 -- to ensure that when you say "Prelude.map" in your source code, you
 -- get a Name with the correct known key (See Note [Known-key names])
-wiredInThings		
+wiredInThings           
   = concat
-    [		-- Wired in TyCons and their implicit Ids
-	  tycon_things
-	, concatMap implicitTyThings tycon_things
+    [           -- Wired in TyCons and their implicit Ids
+          tycon_things
+        , concatMap implicitTyThings tycon_things
 
-		-- Wired in Ids
-	, map AnId wiredInIds
+                -- Wired in Ids
+        , map AnId wiredInIds
 
-		-- PrimOps
-	, map (AnId . primOpId) allThePrimOps
+                -- PrimOps
+        , map (AnId . primOpId) allThePrimOps
     ]
   where
     tycon_things = map ATyCon ([funTyCon] ++ primTyCons ++ wiredInTyCons
@@ -99,16 +93,16 @@ sense of them in interface pragmas. It's cool, though they all have
 "non-standard" names, so they won't get past the parser in user code.
 
 %************************************************************************
-%*									*
-		PrimOpIds
-%*									*
+%*                                                                      *
+                PrimOpIds
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-primOpIds :: Array Int Id	
+primOpIds :: Array Int Id       
 -- A cache of the PrimOp Ids, indexed by PrimOp tag
 primOpIds = array (1,maxPrimOpTag) [ (primOpTag op, mkPrimOpId op) 
-				   | op <- allThePrimOps ]
+                                   | op <- allThePrimOps ]
 
 primOpId :: PrimOp -> Id
 primOpId op = primOpIds ! primOpTag op
@@ -116,9 +110,9 @@ primOpId op = primOpIds ! primOpTag op
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Export lists for pseudo-modules (GHC.Prim)}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 GHC.Prim "exports" all the primops and primitive types, some 
@@ -135,9 +129,9 @@ ghcPrimExports
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Built-in keys}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 ToDo: make it do the ``like'' part properly (as in 0.26 and before).
@@ -150,9 +144,9 @@ maybeIntLikeCon  con = con `hasKey` intDataConKey
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Class predicates}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/prelude/TysPrim.lhs b/compiler/prelude/TysPrim.lhs
index 6e47889..0a937fa 100644
--- a/compiler/prelude/TysPrim.lhs
+++ b/compiler/prelude/TysPrim.lhs
@@ -6,21 +6,15 @@
 \section[TysPrim]{Wired-in knowledge about primitive types}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | This module defines TyCons that can't be expressed in Haskell. 
 --   They are all, therefore, wired-in TyCons.  C.f module TysWiredIn
 module TysPrim(
-	mkPrimTyConName, -- For implicit parameters in TysWiredIn only
+        mkPrimTyConName, -- For implicit parameters in TysWiredIn only
 
         tyVarList, alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
-	alphaTy, betaTy, gammaTy, deltaTy,
-	openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
+        alphaTy, betaTy, gammaTy, deltaTy,
+        openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar, openAlphaTyVars,
         kKiVar,
 
         -- Kind constructors...
@@ -32,65 +26,65 @@ module TysPrim(
         constraintKindTyConName,
 
         -- Kinds
-	anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, constraintKind,
+        anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, constraintKind,
         mkArrowKind, mkArrowKinds,
 
         funTyCon, funTyConName,
         primTyCons,
 
-	charPrimTyCon, 		charPrimTy,
-	intPrimTyCon,		intPrimTy,
-	wordPrimTyCon,		wordPrimTy,
-	addrPrimTyCon,		addrPrimTy,
-	floatPrimTyCon,		floatPrimTy,
-	doublePrimTyCon,	doublePrimTy,
+        charPrimTyCon,          charPrimTy,
+        intPrimTyCon,           intPrimTy,
+        wordPrimTyCon,          wordPrimTy,
+        addrPrimTyCon,          addrPrimTy,
+        floatPrimTyCon,         floatPrimTy,
+        doublePrimTyCon,        doublePrimTy,
 
-	statePrimTyCon,		mkStatePrimTy,
-	realWorldTyCon,		realWorldTy, realWorldStatePrimTy,
+        statePrimTyCon,         mkStatePrimTy,
+        realWorldTyCon,         realWorldTy, realWorldStatePrimTy,
 
-	proxyPrimTyCon,		mkProxyPrimTy,
+        proxyPrimTyCon,         mkProxyPrimTy,
 
-	arrayPrimTyCon,	mkArrayPrimTy, 
-	byteArrayPrimTyCon,	byteArrayPrimTy,
-	arrayArrayPrimTyCon, mkArrayArrayPrimTy, 
-	mutableArrayPrimTyCon, mkMutableArrayPrimTy,
-	mutableByteArrayPrimTyCon, mkMutableByteArrayPrimTy,
-	mutableArrayArrayPrimTyCon, mkMutableArrayArrayPrimTy,
-	mutVarPrimTyCon, mkMutVarPrimTy,
+        arrayPrimTyCon, mkArrayPrimTy, 
+        byteArrayPrimTyCon,     byteArrayPrimTy,
+        arrayArrayPrimTyCon, mkArrayArrayPrimTy, 
+        mutableArrayPrimTyCon, mkMutableArrayPrimTy,
+        mutableByteArrayPrimTyCon, mkMutableByteArrayPrimTy,
+        mutableArrayArrayPrimTyCon, mkMutableArrayArrayPrimTy,
+        mutVarPrimTyCon, mkMutVarPrimTy,
 
-	mVarPrimTyCon,			mkMVarPrimTy,	
+        mVarPrimTyCon,                  mkMVarPrimTy,   
         tVarPrimTyCon,                  mkTVarPrimTy,
-	stablePtrPrimTyCon,		mkStablePtrPrimTy,
-	stableNamePrimTyCon,		mkStableNamePrimTy,
-	bcoPrimTyCon,			bcoPrimTy,
-	weakPrimTyCon,  		mkWeakPrimTy,
-	threadIdPrimTyCon,		threadIdPrimTy,
-	
-	int32PrimTyCon,		int32PrimTy,
-	word32PrimTyCon,	word32PrimTy,
-
-	int64PrimTyCon,		int64PrimTy,
+        stablePtrPrimTyCon,             mkStablePtrPrimTy,
+        stableNamePrimTyCon,            mkStableNamePrimTy,
+        bcoPrimTyCon,                   bcoPrimTy,
+        weakPrimTyCon,                  mkWeakPrimTy,
+        threadIdPrimTyCon,              threadIdPrimTy,
+        
+        int32PrimTyCon,         int32PrimTy,
+        word32PrimTyCon,        word32PrimTy,
+
+        int64PrimTyCon,         int64PrimTy,
         word64PrimTyCon,        word64PrimTy,
 
         eqPrimTyCon,            -- ty1 ~# ty2
         eqReprPrimTyCon,        -- ty1 ~R# ty2  (at role Representational)
 
-	-- * Any
-	anyTy, anyTyCon, anyTypeOfKind,
+        -- * Any
+        anyTy, anyTyCon, anyTypeOfKind,
 
-	-- * SIMD
+        -- * SIMD
 #include "primop-vector-tys-exports.hs-incl"
   ) where
 
 #include "HsVersions.h"
 
-import Var		( TyVar, KindVar, mkTyVar )
-import Name		( Name, BuiltInSyntax(..), mkInternalName, mkWiredInName )
+import Var              ( TyVar, KindVar, mkTyVar )
+import Name             ( Name, BuiltInSyntax(..), mkInternalName, mkWiredInName )
 import OccName          ( mkTyVarOccFS, mkTcOccFS )
 import TyCon
 import TypeRep
 import SrcLoc
-import Unique		( mkAlphaTyVarUnique )
+import Unique           ( mkAlphaTyVarUnique )
 import PrelNames
 import FastString
 
@@ -98,9 +92,9 @@ import Data.Char
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Primitive type constructors}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -150,61 +144,61 @@ primTyCons
 mkPrimTc :: FastString -> Unique -> TyCon -> Name
 mkPrimTc fs unique tycon
   = mkWiredInName gHC_PRIM (mkTcOccFS fs) 
-		  unique
-		  (ATyCon tycon)	-- Relevant TyCon
-		  UserSyntax		-- None are built-in syntax
+                  unique
+                  (ATyCon tycon)        -- Relevant TyCon
+                  UserSyntax            -- None are built-in syntax
 
 charPrimTyConName, intPrimTyConName, int32PrimTyConName, int64PrimTyConName, wordPrimTyConName, word32PrimTyConName, word64PrimTyConName, addrPrimTyConName, floatPrimTyConName, doublePrimTyConName, statePrimTyConName, proxyPrimTyConName, realWorldTyConName, arrayPrimTyConName, arrayArrayPrimTyConName, byteArrayPrimTyConName, mutableArrayPrimTyConName, mutableByteArrayPrimTyConName, mutableArrayArrayPrimTyConName, mutVarPrimTyConName, mVarPrimTyConName, tVarPrimTyConName, stablePtrPrimTyConName, stableNamePrimTyConName, bcoPrimTyConName, weakPrimTyConName, threadIdPrimTyConName, eqPrimTyConName, eqReprPrimTyConName :: Name
-charPrimTyConName    	      = mkPrimTc (fsLit "Char#") charPrimTyConKey charPrimTyCon
-intPrimTyConName     	      = mkPrimTc (fsLit "Int#") intPrimTyConKey  intPrimTyCon
-int32PrimTyConName	      = mkPrimTc (fsLit "Int32#") int32PrimTyConKey int32PrimTyCon
-int64PrimTyConName   	      = mkPrimTc (fsLit "Int64#") int64PrimTyConKey int64PrimTyCon
-wordPrimTyConName    	      = mkPrimTc (fsLit "Word#") wordPrimTyConKey wordPrimTyCon
-word32PrimTyConName  	      = mkPrimTc (fsLit "Word32#") word32PrimTyConKey word32PrimTyCon
-word64PrimTyConName  	      = mkPrimTc (fsLit "Word64#") word64PrimTyConKey word64PrimTyCon
-addrPrimTyConName    	      = mkPrimTc (fsLit "Addr#") addrPrimTyConKey addrPrimTyCon
-floatPrimTyConName   	      = mkPrimTc (fsLit "Float#") floatPrimTyConKey floatPrimTyCon
-doublePrimTyConName  	      = mkPrimTc (fsLit "Double#") doublePrimTyConKey doublePrimTyCon
+charPrimTyConName             = mkPrimTc (fsLit "Char#") charPrimTyConKey charPrimTyCon
+intPrimTyConName              = mkPrimTc (fsLit "Int#") intPrimTyConKey  intPrimTyCon
+int32PrimTyConName            = mkPrimTc (fsLit "Int32#") int32PrimTyConKey int32PrimTyCon
+int64PrimTyConName            = mkPrimTc (fsLit "Int64#") int64PrimTyConKey int64PrimTyCon
+wordPrimTyConName             = mkPrimTc (fsLit "Word#") wordPrimTyConKey wordPrimTyCon
+word32PrimTyConName           = mkPrimTc (fsLit "Word32#") word32PrimTyConKey word32PrimTyCon
+word64PrimTyConName           = mkPrimTc (fsLit "Word64#") word64PrimTyConKey word64PrimTyCon
+addrPrimTyConName             = mkPrimTc (fsLit "Addr#") addrPrimTyConKey addrPrimTyCon
+floatPrimTyConName            = mkPrimTc (fsLit "Float#") floatPrimTyConKey floatPrimTyCon
+doublePrimTyConName           = mkPrimTc (fsLit "Double#") doublePrimTyConKey doublePrimTyCon
 statePrimTyConName            = mkPrimTc (fsLit "State#") statePrimTyConKey statePrimTyCon
 proxyPrimTyConName            = mkPrimTc (fsLit "Proxy#") proxyPrimTyConKey proxyPrimTyCon
 eqPrimTyConName               = mkPrimTc (fsLit "~#") eqPrimTyConKey eqPrimTyCon
 eqReprPrimTyConName           = mkPrimTc (fsLit "~R#") eqReprPrimTyConKey eqReprPrimTyCon
 realWorldTyConName            = mkPrimTc (fsLit "RealWorld") realWorldTyConKey realWorldTyCon
-arrayPrimTyConName   	      = mkPrimTc (fsLit "Array#") arrayPrimTyConKey arrayPrimTyCon
-byteArrayPrimTyConName	      = mkPrimTc (fsLit "ByteArray#") byteArrayPrimTyConKey byteArrayPrimTyCon
-arrayArrayPrimTyConName   	  = mkPrimTc (fsLit "ArrayArray#") arrayArrayPrimTyConKey arrayArrayPrimTyCon
+arrayPrimTyConName            = mkPrimTc (fsLit "Array#") arrayPrimTyConKey arrayPrimTyCon
+byteArrayPrimTyConName        = mkPrimTc (fsLit "ByteArray#") byteArrayPrimTyConKey byteArrayPrimTyCon
+arrayArrayPrimTyConName           = mkPrimTc (fsLit "ArrayArray#") arrayArrayPrimTyConKey arrayArrayPrimTyCon
 mutableArrayPrimTyConName     = mkPrimTc (fsLit "MutableArray#") mutableArrayPrimTyConKey mutableArrayPrimTyCon
 mutableByteArrayPrimTyConName = mkPrimTc (fsLit "MutableByteArray#") mutableByteArrayPrimTyConKey mutableByteArrayPrimTyCon
 mutableArrayArrayPrimTyConName= mkPrimTc (fsLit "MutableArrayArray#") mutableArrayArrayPrimTyConKey mutableArrayArrayPrimTyCon
-mutVarPrimTyConName	      = mkPrimTc (fsLit "MutVar#") mutVarPrimTyConKey mutVarPrimTyCon
-mVarPrimTyConName	      = mkPrimTc (fsLit "MVar#") mVarPrimTyConKey mVarPrimTyCon
-tVarPrimTyConName	      = mkPrimTc (fsLit "TVar#") tVarPrimTyConKey tVarPrimTyCon
+mutVarPrimTyConName           = mkPrimTc (fsLit "MutVar#") mutVarPrimTyConKey mutVarPrimTyCon
+mVarPrimTyConName             = mkPrimTc (fsLit "MVar#") mVarPrimTyConKey mVarPrimTyCon
+tVarPrimTyConName             = mkPrimTc (fsLit "TVar#") tVarPrimTyConKey tVarPrimTyCon
 stablePtrPrimTyConName        = mkPrimTc (fsLit "StablePtr#") stablePtrPrimTyConKey stablePtrPrimTyCon
 stableNamePrimTyConName       = mkPrimTc (fsLit "StableName#") stableNamePrimTyConKey stableNamePrimTyCon
-bcoPrimTyConName 	      = mkPrimTc (fsLit "BCO#") bcoPrimTyConKey bcoPrimTyCon
-weakPrimTyConName  	      = mkPrimTc (fsLit "Weak#") weakPrimTyConKey weakPrimTyCon
-threadIdPrimTyConName  	      = mkPrimTc (fsLit "ThreadId#") threadIdPrimTyConKey threadIdPrimTyCon
+bcoPrimTyConName              = mkPrimTc (fsLit "BCO#") bcoPrimTyConKey bcoPrimTyCon
+weakPrimTyConName             = mkPrimTc (fsLit "Weak#") weakPrimTyConKey weakPrimTyCon
+threadIdPrimTyConName         = mkPrimTc (fsLit "ThreadId#") threadIdPrimTyConKey threadIdPrimTyCon
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Support code}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 alphaTyVars is a list of type variables for use in templates: 
-	["a", "b", ..., "z", "t1", "t2", ... ]
+        ["a", "b", ..., "z", "t1", "t2", ... ]
 
 \begin{code}
 tyVarList :: Kind -> [TyVar]
 tyVarList kind = [ mkTyVar (mkInternalName (mkAlphaTyVarUnique u) 
-				(mkTyVarOccFS (mkFastString name))
-			 	noSrcSpan) kind
-	         | u <- [2..],
-		   let name | c <= 'z'  = [c]
-		            | otherwise = 't':show u
-			    where c = chr (u-2 + ord 'a')
-	         ]
+                                (mkTyVarOccFS (mkFastString name))
+                                noSrcSpan) kind
+                 | u <- [2..],
+                   let name | c <= 'z'  = [c]
+                            | otherwise = 't':show u
+                            where c = chr (u-2 + ord 'a')
+                 ]
 
 alphaTyVars :: [TyVar]
 alphaTyVars = tyVarList liftedTypeKind
@@ -220,9 +214,9 @@ alphaTys = mkTyVarTys alphaTyVars
 alphaTy, betaTy, gammaTy, deltaTy :: Type
 (alphaTy:betaTy:gammaTy:deltaTy:_) = alphaTys
 
-	-- openAlphaTyVar is prepared to be instantiated
-	-- to a lifted or unlifted type variable.  It's used for the 
-	-- result type for "error", so that we can have (error Int# "Help")
+        -- openAlphaTyVar is prepared to be instantiated
+        -- to a lifted or unlifted type variable.  It's used for the 
+        -- result type for "error", so that we can have (error Int# "Help")
 openAlphaTyVars :: [TyVar]
 openAlphaTyVar, openBetaTyVar :: TyVar
 openAlphaTyVars@(openAlphaTyVar:openBetaTyVar:_) = tyVarList openTypeKind
@@ -238,9 +232,9 @@ kKiVar = (tyVarList superKind) !! 10
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                 FunTyCon
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -251,12 +245,12 @@ funTyCon :: TyCon
 funTyCon = mkFunTyCon funTyConName $ 
            mkArrowKinds [liftedTypeKind, liftedTypeKind] liftedTypeKind
         -- You might think that (->) should have type (?? -> ? -> *), and you'd be right
-	-- But if we do that we get kind errors when saying
-	--	instance Control.Arrow (->)
-	-- because the expected kind is (*->*->*).  The trouble is that the
-	-- expected/actual stuff in the unifier does not go contra-variant, whereas
-	-- the kind sub-typing does.  Sigh.  It really only matters if you use (->) in
-	-- a prefix way, thus:  (->) Int# Int#.  And this is unusual.
+        -- But if we do that we get kind errors when saying
+        --      instance Control.Arrow (->)
+        -- because the expected kind is (*->*->*).  The trouble is that the
+        -- expected/actual stuff in the unifier does not go contra-variant, whereas
+        -- the kind sub-typing does.  Sigh.  It really only matters if you use (->) in
+        -- a prefix way, thus:  (->) Int# Int#.  And this is unusual.
         -- because they are never in scope in the source
 
 -- One step to remove subkinding.
@@ -276,9 +270,9 @@ funTyCon = mkFunTyCon funTyConName $
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                 Kinds
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [SuperKind (BOX)]
@@ -333,11 +327,11 @@ constraintKindTyConName   = mkPrimTyConName (fsLit "Constraint") constraintKindT
 
 mkPrimTyConName :: FastString -> Unique -> TyCon -> Name
 mkPrimTyConName occ key tycon = mkWiredInName gHC_PRIM (mkTcOccFS occ) 
-					      key 
-					      (ATyCon tycon)
-					      BuiltInSyntax
-	-- All of the super kinds and kinds are defined in Prim and use BuiltInSyntax,
-	-- because they are never in scope in the source
+                                              key 
+                                              (ATyCon tycon)
+                                              BuiltInSyntax
+        -- All of the super kinds and kinds are defined in Prim and use BuiltInSyntax,
+        -- because they are never in scope in the source
 \end{code}
 
 
@@ -365,9 +359,9 @@ mkArrowKinds arg_kinds result_kind = foldr mkArrowKind result_kind arg_kinds
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-basic]{Basic primitive types (@Char#@, @Int#@, etc.)}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -386,61 +380,61 @@ pcPrimTyCon0 name rep
     result_kind = unliftedTypeKind
 
 charPrimTy :: Type
-charPrimTy	= mkTyConTy charPrimTyCon
+charPrimTy      = mkTyConTy charPrimTyCon
 charPrimTyCon :: TyCon
-charPrimTyCon	= pcPrimTyCon0 charPrimTyConName WordRep
+charPrimTyCon   = pcPrimTyCon0 charPrimTyConName WordRep
 
 intPrimTy :: Type
-intPrimTy	= mkTyConTy intPrimTyCon
+intPrimTy       = mkTyConTy intPrimTyCon
 intPrimTyCon :: TyCon
-intPrimTyCon	= pcPrimTyCon0 intPrimTyConName IntRep
+intPrimTyCon    = pcPrimTyCon0 intPrimTyConName IntRep
 
 int32PrimTy :: Type
-int32PrimTy	= mkTyConTy int32PrimTyCon
+int32PrimTy     = mkTyConTy int32PrimTyCon
 int32PrimTyCon :: TyCon
-int32PrimTyCon	= pcPrimTyCon0 int32PrimTyConName IntRep
+int32PrimTyCon  = pcPrimTyCon0 int32PrimTyConName IntRep
 
 int64PrimTy :: Type
-int64PrimTy	= mkTyConTy int64PrimTyCon
+int64PrimTy     = mkTyConTy int64PrimTyCon
 int64PrimTyCon :: TyCon
-int64PrimTyCon	= pcPrimTyCon0 int64PrimTyConName Int64Rep
+int64PrimTyCon  = pcPrimTyCon0 int64PrimTyConName Int64Rep
 
 wordPrimTy :: Type
-wordPrimTy	= mkTyConTy wordPrimTyCon
+wordPrimTy      = mkTyConTy wordPrimTyCon
 wordPrimTyCon :: TyCon
-wordPrimTyCon	= pcPrimTyCon0 wordPrimTyConName WordRep
+wordPrimTyCon   = pcPrimTyCon0 wordPrimTyConName WordRep
 
 word32PrimTy :: Type
-word32PrimTy	= mkTyConTy word32PrimTyCon
+word32PrimTy    = mkTyConTy word32PrimTyCon
 word32PrimTyCon :: TyCon
-word32PrimTyCon	= pcPrimTyCon0 word32PrimTyConName WordRep
+word32PrimTyCon = pcPrimTyCon0 word32PrimTyConName WordRep
 
 word64PrimTy :: Type
-word64PrimTy	= mkTyConTy word64PrimTyCon
+word64PrimTy    = mkTyConTy word64PrimTyCon
 word64PrimTyCon :: TyCon
-word64PrimTyCon	= pcPrimTyCon0 word64PrimTyConName Word64Rep
+word64PrimTyCon = pcPrimTyCon0 word64PrimTyConName Word64Rep
 
 addrPrimTy :: Type
-addrPrimTy	= mkTyConTy addrPrimTyCon
+addrPrimTy      = mkTyConTy addrPrimTyCon
 addrPrimTyCon :: TyCon
-addrPrimTyCon	= pcPrimTyCon0 addrPrimTyConName AddrRep
+addrPrimTyCon   = pcPrimTyCon0 addrPrimTyConName AddrRep
 
-floatPrimTy	:: Type
-floatPrimTy	= mkTyConTy floatPrimTyCon
+floatPrimTy     :: Type
+floatPrimTy     = mkTyConTy floatPrimTyCon
 floatPrimTyCon :: TyCon
-floatPrimTyCon	= pcPrimTyCon0 floatPrimTyConName FloatRep
+floatPrimTyCon  = pcPrimTyCon0 floatPrimTyConName FloatRep
 
 doublePrimTy :: Type
-doublePrimTy	= mkTyConTy doublePrimTyCon
-doublePrimTyCon	:: TyCon
-doublePrimTyCon	= pcPrimTyCon0 doublePrimTyConName DoubleRep
+doublePrimTy    = mkTyConTy doublePrimTyCon
+doublePrimTyCon :: TyCon
+doublePrimTyCon = pcPrimTyCon0 doublePrimTyConName DoubleRep
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-state]{The @State#@ type (and @_RealWorld@ types)}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [The ~# TyCon)
@@ -459,9 +453,9 @@ Note [The State# TyCon]
 ~~~~~~~~~~~~~~~~~~~~~~~
 State# is the primitive, unlifted type of states.  It has one type parameter,
 thus
-	State# RealWorld
+        State# RealWorld
 or
-	State# s
+        State# s
 
 where s is a type variable. The only purpose of the type parameter is to
 keep different state threads separate.  It is represented by nothing at all.
@@ -475,7 +469,7 @@ mkStatePrimTy :: Type -> Type
 mkStatePrimTy ty = TyConApp statePrimTyCon [ty]
 
 statePrimTyCon :: TyCon   -- See Note [The State# TyCon]
-statePrimTyCon	 = pcPrimTyCon statePrimTyConName [Nominal] VoidRep
+statePrimTyCon   = pcPrimTyCon statePrimTyConName [Nominal] VoidRep
 
 mkProxyPrimTy :: Type -> Type -> Type
 mkProxyPrimTy k ty = TyConApp proxyPrimTyCon [k, ty]
@@ -487,7 +481,7 @@ proxyPrimTyCon = mkPrimTyCon proxyPrimTyConName kind [Nominal,Nominal] VoidRep
         k    = mkTyVarTy kv
 
 eqPrimTyCon :: TyCon  -- The representation type for equality predicates
-		      -- See Note [The ~# TyCon]
+                      -- See Note [The ~# TyCon]
 eqPrimTyCon  = mkPrimTyCon eqPrimTyConName kind [Nominal, Nominal, Nominal] VoidRep
   where kind = ForAllTy kv $ mkArrowKinds [k, k] unliftedTypeKind
         kv = kKiVar
@@ -513,18 +507,18 @@ RealWorld; it's only used in the type system, to parameterise State#.
 realWorldTyCon :: TyCon
 realWorldTyCon = mkLiftedPrimTyCon realWorldTyConName liftedTypeKind [] PtrRep
 realWorldTy :: Type
-realWorldTy	     = mkTyConTy realWorldTyCon
+realWorldTy          = mkTyConTy realWorldTyCon
 realWorldStatePrimTy :: Type
-realWorldStatePrimTy = mkStatePrimTy realWorldTy	-- State# RealWorld
+realWorldStatePrimTy = mkStatePrimTy realWorldTy        -- State# RealWorld
 \end{code}
 
 Note: the ``state-pairing'' types are not truly primitive, so they are
 defined in \tr{TysWiredIn.lhs}, not here.
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-arrays]{The primitive array types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -538,9 +532,9 @@ arrayArrayPrimTyCon        = pcPrimTyCon0 arrayArrayPrimTyConName       PtrRep
 mutableArrayArrayPrimTyCon = pcPrimTyCon mutableArrayArrayPrimTyConName [Nominal] PtrRep
 
 mkArrayPrimTy :: Type -> Type
-mkArrayPrimTy elt    	    = TyConApp arrayPrimTyCon [elt]
+mkArrayPrimTy elt           = TyConApp arrayPrimTyCon [elt]
 byteArrayPrimTy :: Type
-byteArrayPrimTy	    	    = mkTyConTy byteArrayPrimTyCon
+byteArrayPrimTy             = mkTyConTy byteArrayPrimTyCon
 mkArrayArrayPrimTy :: Type
 mkArrayArrayPrimTy = mkTyConTy arrayArrayPrimTyCon
 mkMutableArrayPrimTy :: Type -> Type -> Type
@@ -552,9 +546,9 @@ mkMutableArrayArrayPrimTy s = TyConApp mutableArrayArrayPrimTyCon [s]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-mut-var]{The mutable variable type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -562,13 +556,13 @@ mutVarPrimTyCon :: TyCon
 mutVarPrimTyCon = pcPrimTyCon mutVarPrimTyConName [Nominal, Representational] PtrRep
 
 mkMutVarPrimTy :: Type -> Type -> Type
-mkMutVarPrimTy s elt 	    = TyConApp mutVarPrimTyCon [s, elt]
+mkMutVarPrimTy s elt        = TyConApp mutVarPrimTyCon [s, elt]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-synch-var]{The synchronizing variable type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -576,13 +570,13 @@ mVarPrimTyCon :: TyCon
 mVarPrimTyCon = pcPrimTyCon mVarPrimTyConName [Nominal, Representational] PtrRep
 
 mkMVarPrimTy :: Type -> Type -> Type
-mkMVarPrimTy s elt 	    = TyConApp mVarPrimTyCon [s, elt]
+mkMVarPrimTy s elt          = TyConApp mVarPrimTyCon [s, elt]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-stm-var]{The transactional variable type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -594,9 +588,9 @@ mkTVarPrimTy s elt = TyConApp tVarPrimTyCon [s, elt]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-stable-ptrs]{The stable-pointer type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -608,9 +602,9 @@ mkStablePtrPrimTy ty = TyConApp stablePtrPrimTyCon [ty]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-stable-names]{The stable-name type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -622,9 +616,9 @@ mkStableNamePrimTy ty = TyConApp stableNamePrimTyCon [ty]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-BCOs]{The ``bytecode object'' type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -635,9 +629,9 @@ bcoPrimTyCon = pcPrimTyCon0 bcoPrimTyConName PtrRep
 \end{code}
   
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-Weak]{The ``weak pointer'' type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -649,9 +643,9 @@ mkWeakPrimTy v = TyConApp weakPrimTyCon [v]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysPrim-thread-ids]{The ``thread id'' type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 A thread id is represented by a pointer to the TSO itself, to ensure
@@ -671,9 +665,9 @@ threadIdPrimTyCon = pcPrimTyCon0 threadIdPrimTyConName PtrRep
 \end{code}
 
 %************************************************************************
-%*									*
-		Any
-%*									*
+%*                                                                      *
+                Any
+%*                                                                      *
 %************************************************************************
 
 Note [Any types]
@@ -704,7 +698,7 @@ The type constructor Any of kind forall k. k -> k has these properties:
     but never enters a function value. 
 
   * It is used to instantiate otherwise un-constrained type variables
-    For example   	length Any []
+    For example         length Any []
     See Note [Strangely-kinded void TyCons]
 
 Note [Any kinds]
@@ -728,17 +722,17 @@ When the type checker finds a type variable with no binding, which
 means it can be instantiated with an arbitrary type, it usually
 instantiates it to Void.  Eg.
 
-	length []
+        length []
 ===>
-	length Any (Nil Any)
+        length Any (Nil Any)
 
 But in really obscure programs, the type variable might have a kind
 other than *, so we need to invent a suitably-kinded type.
 
 This commit uses
-	Any for kind *
-	Any(*->*) for kind *->*
-	etc
+        Any for kind *
+        Any(*->*) for kind *->*
+        etc
 
 \begin{code}
 anyTyConName :: Name
@@ -768,9 +762,9 @@ anyTypeOfKind kind = TyConApp anyTyCon [kind]
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{SIMD vector types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/profiling/CostCentre.lhs b/compiler/profiling/CostCentre.lhs
index fffd646..e2ec2d4 100644
--- a/compiler/profiling/CostCentre.lhs
+++ b/compiler/profiling/CostCentre.lhs
@@ -1,32 +1,26 @@
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# LANGUAGE BangPatterns, DeriveDataTypeable #-}
 
 module CostCentre (
         CostCentre(..), CcName, IsCafCC(..),
-		-- All abstract except to friend: ParseIface.y
+                -- All abstract except to friend: ParseIface.y
 
-	CostCentreStack,
-	CollectedCCs,
+        CostCentreStack,
+        CollectedCCs,
         noCCS, currentCCS, dontCareCCS,
         noCCSAttached, isCurrentCCS,
         maybeSingletonCCS,
 
-	mkUserCC, mkAutoCC, mkAllCafsCC, 
+        mkUserCC, mkAutoCC, mkAllCafsCC, 
         mkSingletonCCS,
         isCafCCS, isCafCC, isSccCountCC, sccAbleCC, ccFromThisModule,
 
-	pprCostCentreCore,
+        pprCostCentreCore,
         costCentreUserName, costCentreUserNameFS,
         costCentreSrcSpan,
 
-	cmpCostCentre	-- used for removing dups in a list
+        cmpCostCentre   -- used for removing dups in a list
     ) where
 
 import Binary
@@ -34,7 +28,7 @@ import Var
 import Name
 import Module
 import Unique
-import Outputable	
+import Outputable       
 import FastTypes
 import SrcLoc
 import FastString
@@ -66,7 +60,7 @@ data CostCentre
                 cc_is_caf  :: IsCafCC   -- see below
     }
 
-  | AllCafsCC {	
+  | AllCafsCC { 
                 cc_mod  :: Module,      -- Name of module defining this CC.
                 cc_loc  :: SrcSpan
     }
@@ -79,10 +73,10 @@ data IsCafCC = NotCafCC | CafCC
 
 
 instance Eq CostCentre where
-	c1 == c2 = case c1 `cmpCostCentre` c2 of { EQ -> True; _ -> False }
+        c1 == c2 = case c1 `cmpCostCentre` c2 of { EQ -> True; _ -> False }
 
 instance Ord CostCentre where
-	compare = cmpCostCentre
+        compare = cmpCostCentre
 
 cmpCostCentre :: CostCentre -> CostCentre -> Ordering
 
@@ -96,8 +90,8 @@ cmpCostCentre NormalCC {cc_key = n1, cc_mod =  m1}
 
 cmpCostCentre other_1 other_2
   = let
-	!tag1 = tag_CC other_1
-	!tag2 = tag_CC other_2
+        !tag1 = tag_CC other_1
+        !tag2 = tag_CC other_2
     in
     if tag1 <# tag2 then LT else GT
   where
@@ -161,28 +155,28 @@ mkAllCafsCC m loc = AllCafsCC { cc_mod = m, cc_loc = loc }
 
 -- | A Cost Centre Stack is something that can be attached to a closure.
 -- This is either:
--- 	
+--      
 --      * the current cost centre stack (CCCS)
 --      * a pre-defined cost centre stack (there are several
--- 	  pre-defined CCSs, see below).
+--        pre-defined CCSs, see below).
 
 data CostCentreStack
   = NoCCS
 
-  | CurrentCCS		-- Pinned on a let(rec)-bound 
-			-- thunk/function/constructor, this says that the 
-			-- cost centre to be attached to the object, when it 
-			-- is allocated, is whatever is in the 
-			-- current-cost-centre-stack register.
+  | CurrentCCS          -- Pinned on a let(rec)-bound 
+                        -- thunk/function/constructor, this says that the 
+                        -- cost centre to be attached to the object, when it 
+                        -- is allocated, is whatever is in the 
+                        -- current-cost-centre-stack register.
 
   | DontCareCCS         -- We need a CCS to stick in static closures
-			-- (for data), but we *don't* expect them to
-			-- accumulate any costs.  But we still need
-			-- the placeholder.  This CCS is it.
+                        -- (for data), but we *don't* expect them to
+                        -- accumulate any costs.  But we still need
+                        -- the placeholder.  This CCS is it.
 
   | SingletonCCS CostCentre
 
-  deriving (Eq, Ord)	-- needed for Ord on CLabel
+  deriving (Eq, Ord)    -- needed for Ord on CLabel
 
 
 -- synonym for triple which describes the cost centre info in the generated
@@ -196,7 +190,7 @@ type CollectedCCs
 
 noCCS, currentCCS, dontCareCCS :: CostCentreStack
 
-noCCS 			= NoCCS
+noCCS                   = NoCCS
 currentCCS              = CurrentCCS
 dontCareCCS             = DontCareCCS
 
@@ -204,20 +198,20 @@ dontCareCCS             = DontCareCCS
 -- Predicates on Cost-Centre Stacks
 
 noCCSAttached :: CostCentreStack -> Bool
-noCCSAttached NoCCS			= True
-noCCSAttached _				= False
+noCCSAttached NoCCS                     = True
+noCCSAttached _                         = False
 
 isCurrentCCS :: CostCentreStack -> Bool
-isCurrentCCS CurrentCCS			= True
-isCurrentCCS _	      			= False
+isCurrentCCS CurrentCCS                 = True
+isCurrentCCS _                          = False
 
 isCafCCS :: CostCentreStack -> Bool
 isCafCCS (SingletonCCS cc)              = isCafCC cc
-isCafCCS _				= False
+isCafCCS _                              = False
 
 maybeSingletonCCS :: CostCentreStack -> Maybe CostCentre
 maybeSingletonCCS (SingletonCCS cc)     = Just cc
-maybeSingletonCCS _			= Nothing
+maybeSingletonCCS _                     = Nothing
 
 mkSingletonCCS :: CostCentre -> CostCentreStack
 mkSingletonCCS cc = SingletonCCS cc
@@ -230,8 +224,8 @@ mkSingletonCCS cc = SingletonCCS cc
 -- expression.
 
 instance Outputable CostCentreStack where
-  ppr NoCCS		= ptext (sLit "NO_CCS")
-  ppr CurrentCCS	= ptext (sLit "CCCS")
+  ppr NoCCS             = ptext (sLit "NO_CCS")
+  ppr CurrentCCS        = ptext (sLit "CCCS")
   ppr DontCareCCS       = ptext (sLit "CCS_DONT_CARE")
   ppr (SingletonCCS cc) = ppr cc <> ptext (sLit "_ccs")
 
@@ -242,19 +236,19 @@ instance Outputable CostCentreStack where
 -- There are several different ways in which we might want to print a
 -- cost centre:
 -- 
--- 	- the name of the cost centre, for profiling output (a C string)
--- 	- the label, i.e. C label for cost centre in .hc file.
--- 	- the debugging name, for output in -ddump things
--- 	- the interface name, for printing in _scc_ exprs in iface files.
+--      - the name of the cost centre, for profiling output (a C string)
+--      - the label, i.e. C label for cost centre in .hc file.
+--      - the debugging name, for output in -ddump things
+--      - the interface name, for printing in _scc_ exprs in iface files.
 -- 
 -- The last 3 are derived from costCentreStr below.  The first is given
 -- by costCentreName.
 
 instance Outputable CostCentre where
   ppr cc = getPprStyle $ \ sty ->
-	   if codeStyle sty
-  	   then ppCostCentreLbl cc
-	   else text (costCentreUserName cc)
+           if codeStyle sty
+           then ppCostCentreLbl cc
+           else text (costCentreUserName cc)
 
 -- Printing in Core
 pprCostCentreCore :: CostCentre -> SDoc
diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs
index 9f9fd38..18d7625 100644
--- a/compiler/rename/RnBinds.lhs
+++ b/compiler/rename/RnBinds.lhs
@@ -9,12 +9,6 @@ type-synonym declarations; those cannot be done at this stage because
 they may be affected by renaming (which isn't fully worked out yet).
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module RnBinds (
    -- Renaming top-level bindings
@@ -45,14 +39,14 @@ import NameEnv
 import NameSet
 import RdrName          ( RdrName, rdrNameOcc )
 import SrcLoc
-import ListSetOps	( findDupsEq )
-import BasicTypes	( RecFlag(..) )
-import Digraph		( SCC(..) )
+import ListSetOps       ( findDupsEq )
+import BasicTypes       ( RecFlag(..) )
+import Digraph          ( SCC(..) )
 import Bag
 import Outputable
 import FastString
-import Data.List	( partition, sort )
-import Maybes		( orElse )
+import Data.List        ( partition, sort )
+import Maybes           ( orElse )
 import Control.Monad
 import Data.Traversable ( traverse )
 \end{code}
@@ -65,7 +59,7 @@ in where-clauses which are all apparently mutually recursive, but which may
 not really depend upon each other. For example, in the top level program
 \begin{verbatim}
 f x = y where a = x
-	      y = x
+              y = x
 \end{verbatim}
 the definitions of @a@ and @y@ do not depend on each other at all.
 Unfortunately, the typechecker cannot always check such definitions.
@@ -85,9 +79,9 @@ within one @MonoBinds@, so that unique-Int plumbing is done explicitly
 
 
 %************************************************************************
-%*									*
-%* naming conventions							*
-%*									*
+%*                                                                      *
+%* naming conventions                                                   *
+%*                                                                      *
 %************************************************************************
 
 \subsection[name-conventions]{Name conventions}
@@ -112,9 +106,9 @@ a set of variables free in @Exp@ is written @fvExp@
 \end{itemize}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 %* analysing polymorphic bindings (HsBindGroup, HsBind)
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \subsubsection[dep-HsBinds]{Polymorphic bindings}
@@ -153,14 +147,14 @@ union of those in the previous set plus those of the newest binding after
 the defined variables of the previous set have been removed.
 
 @rnMethodBinds@ deals only with the declarations in class and
-instance declarations.	It expects only to see @FunMonoBind@s, and
+instance declarations.  It expects only to see @FunMonoBind@s, and
 it expects the global environment to contain bindings for the binders
 (which are all class operations).
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsubsection{ Top-level bindings}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -184,17 +178,17 @@ rnTopBindsBoot :: HsValBindsLR Name RdrName -> RnM (HsValBinds Name, DefUses)
 -- A hs-boot file has no bindings. 
 -- Return a single HsBindGroup with empty binds and renamed signatures
 rnTopBindsBoot (ValBindsIn mbinds sigs)
-  = do	{ checkErr (isEmptyLHsBinds mbinds) (bindsInHsBootFile mbinds)
-	; (sigs', fvs) <- renameSigs HsBootCtxt sigs
-	; return (ValBindsOut [] sigs', usesOnly fvs) }
+  = do  { checkErr (isEmptyLHsBinds mbinds) (bindsInHsBootFile mbinds)
+        ; (sigs', fvs) <- renameSigs HsBootCtxt sigs
+        ; return (ValBindsOut [] sigs', usesOnly fvs) }
 rnTopBindsBoot b = pprPanic "rnTopBindsBoot" (ppr b)
 \end{code}
 
 
 %*********************************************************
-%*							*
-		HsLocalBinds
-%*							*
+%*                                                      *
+                HsLocalBinds
+%*                                                      *
 %*********************************************************
 
 \begin{code}
@@ -202,7 +196,7 @@ rnLocalBindsAndThen :: HsLocalBinds RdrName
                     -> (HsLocalBinds Name -> RnM (result, FreeVars))
                     -> RnM (result, FreeVars)
 -- This version (a) assumes that the binding vars are *not* already in scope
---		 (b) removes the binders from the free vars of the thing inside
+--               (b) removes the binders from the free vars of the thing inside
 -- The parser doesn't produce ThenBinds
 rnLocalBindsAndThen EmptyLocalBinds thing_inside
   = thing_inside EmptyLocalBinds
@@ -229,9 +223,9 @@ rnIPBind (IPBind ~(Left n) expr) = do
 
 
 %************************************************************************
-%*									*
-		ValBinds
-%*									*
+%*                                                                      *
+                ValBinds
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -244,23 +238,23 @@ rnLocalValBindsLHS fix_env binds
   = do { binds' <- rnValBindsLHS (localRecNameMaker fix_env) binds 
 
          -- Check for duplicates and shadowing
-	 -- Must do this *after* renaming the patterns
-	 -- See Note [Collect binders only after renaming] in HsUtils
+         -- Must do this *after* renaming the patterns
+         -- See Note [Collect binders only after renaming] in HsUtils
 
          -- We need to check for dups here because we
-     	 -- don't don't bind all of the variables from the ValBinds at once
-     	 -- with bindLocatedLocals any more.
+         -- don't don't bind all of the variables from the ValBinds at once
+         -- with bindLocatedLocals any more.
          -- 
-     	 -- Note that we don't want to do this at the top level, since
-     	 -- sorting out duplicates and shadowing there happens elsewhere.
-     	 -- The behavior is even different. For example,
-     	 --   import A(f)
-     	 --   f = ...
-     	 -- should not produce a shadowing warning (but it will produce
-     	 -- an ambiguity warning if you use f), but
-     	 --   import A(f)
-     	 --   g = let f = ... in f
-     	 -- should.
+         -- Note that we don't want to do this at the top level, since
+         -- sorting out duplicates and shadowing there happens elsewhere.
+         -- The behavior is even different. For example,
+         --   import A(f)
+         --   f = ...
+         -- should not produce a shadowing warning (but it will produce
+         -- an ambiguity warning if you use f), but
+         --   import A(f)
+         --   g = let f = ... in f
+         -- should.
        ; let bound_names = collectHsValBinders binds'
        ; envs <- getRdrEnvs
        ; checkDupAndShadowedNames envs bound_names
@@ -298,9 +292,9 @@ rnValBindsRHS ctxt (ValBindsIn mbinds sigs)
               where
                 valbind' = ValBindsOut anal_binds sigs'
                 valbind'_dus = anal_dus `plusDU` usesOnly sig_fvs
-			       -- Put the sig uses *after* the bindings
-			       -- so that the binders are removed from 
-			       -- the uses in the sigs
+                               -- Put the sig uses *after* the bindings
+                               -- so that the binders are removed from 
+                               -- the uses in the sigs
        }
 
 rnValBindsRHS _ b = pprPanic "rnValBindsRHS" (ppr b)
@@ -326,51 +320,51 @@ rnLocalValBindsAndThen :: HsValBinds RdrName
                        -> (HsValBinds Name -> RnM (result, FreeVars))
                        -> RnM (result, FreeVars)
 rnLocalValBindsAndThen binds@(ValBindsIn _ sigs) thing_inside
- = do	{     -- (A) Create the local fixity environment 
-	  new_fixities <- makeMiniFixityEnv [L loc sig | L loc (FixSig sig) <- sigs]
+ = do   {     -- (A) Create the local fixity environment 
+          new_fixities <- makeMiniFixityEnv [L loc sig | L loc (FixSig sig) <- sigs]
 
-	      -- (B) Rename the LHSes 
-	; (bound_names, new_lhs) <- rnLocalValBindsLHS new_fixities binds
+              -- (B) Rename the LHSes 
+        ; (bound_names, new_lhs) <- rnLocalValBindsLHS new_fixities binds
 
-	      --     ...and bring them (and their fixities) into scope
-	; bindLocalNamesFV bound_names              $
+              --     ...and bring them (and their fixities) into scope
+        ; bindLocalNamesFV bound_names              $
           addLocalFixities new_fixities bound_names $ do
 
-	{      -- (C) Do the RHS and thing inside
-	  (binds', dus) <- rnLocalValBindsRHS (mkNameSet bound_names) new_lhs 
+        {      -- (C) Do the RHS and thing inside
+          (binds', dus) <- rnLocalValBindsRHS (mkNameSet bound_names) new_lhs 
         ; (result, result_fvs) <- thing_inside binds'
 
-		-- Report unused bindings based on the (accurate) 
-		-- findUses.  E.g.
-		-- 	let x = x in 3
-		-- should report 'x' unused
-	; let real_uses = findUses dus result_fvs
-	      -- Insert fake uses for variables introduced implicitly by wildcards (#4404)
-	      implicit_uses = hsValBindsImplicits binds'
-	; warnUnusedLocalBinds bound_names (real_uses `unionNameSets` implicit_uses)
+                -- Report unused bindings based on the (accurate) 
+                -- findUses.  E.g.
+                --      let x = x in 3
+                -- should report 'x' unused
+        ; let real_uses = findUses dus result_fvs
+              -- Insert fake uses for variables introduced implicitly by wildcards (#4404)
+              implicit_uses = hsValBindsImplicits binds'
+        ; warnUnusedLocalBinds bound_names (real_uses `unionNameSets` implicit_uses)
 
-	; let
+        ; let
             -- The variables "used" in the val binds are: 
             --   (1) the uses of the binds (allUses)
             --   (2) the FVs of the thing-inside
             all_uses = allUses dus `plusFV` result_fvs
-		-- Note [Unused binding hack]
-		-- ~~~~~~~~~~~~~~~~~~~~~~~~~~
-		-- Note that *in contrast* to the above reporting of
-		-- unused bindings, (1) above uses duUses to return *all* 
-		-- the uses, even if the binding is unused.  Otherwise consider:
-                --	x = 3
-                --	y = let p = x in 'x'	-- NB: p not used
+                -- Note [Unused binding hack]
+                -- ~~~~~~~~~~~~~~~~~~~~~~~~~~
+                -- Note that *in contrast* to the above reporting of
+                -- unused bindings, (1) above uses duUses to return *all* 
+                -- the uses, even if the binding is unused.  Otherwise consider:
+                --      x = 3
+                --      y = let p = x in 'x'    -- NB: p not used
                 -- If we don't "see" the dependency of 'y' on 'x', we may put the
                 -- bindings in the wrong order, and the type checker will complain
                 -- that x isn't in scope
-		--
-		-- But note that this means we won't report 'x' as unused, 
-		-- whereas we would if we had { x = 3; p = x; y = 'x' }
+                --
+                -- But note that this means we won't report 'x' as unused, 
+                -- whereas we would if we had { x = 3; p = x; y = 'x' }
 
-	; return (result, all_uses) }}
-         	-- The bound names are pruned out of all_uses
-	        -- by the bindLocalNamesFV call above
+        ; return (result, all_uses) }}
+                -- The bound names are pruned out of all_uses
+                -- by the bindLocalNamesFV call above
 
 rnLocalValBindsAndThen bs _ = pprPanic "rnLocalValBindsAndThen" (ppr bs)
 
@@ -405,7 +399,7 @@ makeMiniFixityEnv decls = foldlM add_one emptyFsEnv decls
 dupFixityDecl :: SrcSpan -> RdrName -> SDoc
 dupFixityDecl loc rdr_name
   = vcat [ptext (sLit "Multiple fixity declarations for") <+> quotes (ppr rdr_name),
-	  ptext (sLit "also at ") <+> ppr loc]
+          ptext (sLit "also at ") <+> ppr loc]
 
 ---------------------
 
@@ -436,7 +430,7 @@ rnBindLHS name_maker _ (L loc bind@(FunBind { fun_id = name@(L nameLoc _) }))
 rnBindLHS _ _ b = pprPanic "rnBindLHS" (ppr b)
 
 -- assumes the left-hands-side vars are in scope
-rnBind :: (Name -> [Name])		-- Signature tyvar function
+rnBind :: (Name -> [Name])              -- Signature tyvar function
        -> LHsBindLR Name RdrName
        -> RnM (LHsBind Name, [Name], Uses)
 rnBind _ (L loc bind@(PatBind { pat_lhs = pat
@@ -445,15 +439,15 @@ rnBind _ (L loc bind@(PatBind { pat_lhs = pat
                                       -- after processing the LHS
                               , bind_fvs = pat_fvs }))
   = setSrcSpan loc $ 
-    do	{ mod <- getModule
+    do  { mod <- getModule
         ; (grhss', rhs_fvs) <- rnGRHSs PatBindRhs rnLExpr grhss
 
-		-- No scoped type variables for pattern bindings
-	; let all_fvs = pat_fvs `plusFV` rhs_fvs
+                -- No scoped type variables for pattern bindings
+        ; let all_fvs = pat_fvs `plusFV` rhs_fvs
               fvs'    = filterNameSet (nameIsLocalOrFrom mod) all_fvs
-	        -- Keep locally-defined Names
-		-- As well as dependency analysis, we need these for the
-		-- MonoLocalBinds test in TcBinds.decideGeneralisationPlan
+                -- Keep locally-defined Names
+                -- As well as dependency analysis, we need these for the
+                -- MonoLocalBinds test in TcBinds.decideGeneralisationPlan
               bndrs = collectPatBinders pat
               bind' = bind { pat_rhs  = grhss', bind_fvs = fvs' }
               is_wild_pat = case pat of
@@ -469,31 +463,31 @@ rnBind _ (L loc bind@(PatBind { pat_lhs = pat
           when (null bndrs && not is_wild_pat) $
           addWarn $ unusedPatBindWarn bind'
 
-	; fvs' `seq` -- See Note [Free-variable space leak]
+        ; fvs' `seq` -- See Note [Free-variable space leak]
           return (L loc bind', bndrs, all_fvs) }
 
 rnBind sig_fn (L loc bind@(FunBind { fun_id = name 
-                            	   , fun_infix = is_infix 
-                            	   , fun_matches = matches })) 
+                                   , fun_infix = is_infix 
+                                   , fun_matches = matches })) 
        -- invariant: no free vars here when it's a FunBind
   = setSrcSpan loc $
-    do	{ let plain_name = unLoc name
+    do  { let plain_name = unLoc name
 
-	; (matches', rhs_fvs) <- bindSigTyVarsFV (sig_fn plain_name) $
-				-- bindSigTyVars tests for Opt_ScopedTyVars
-			         rnMatchGroup (FunRhs plain_name is_infix) rnLExpr matches
-	; when is_infix $ checkPrecMatch plain_name matches'
+        ; (matches', rhs_fvs) <- bindSigTyVarsFV (sig_fn plain_name) $
+                                -- bindSigTyVars tests for Opt_ScopedTyVars
+                                 rnMatchGroup (FunRhs plain_name is_infix) rnLExpr matches
+        ; when is_infix $ checkPrecMatch plain_name matches'
 
         ; mod <- getModule
         ; let fvs' = filterNameSet (nameIsLocalOrFrom mod) rhs_fvs
-	        -- Keep locally-defined Names
-		-- As well as dependency analysis, we need these for the
-		-- MonoLocalBinds test in TcBinds.decideGeneralisationPlan
+                -- Keep locally-defined Names
+                -- As well as dependency analysis, we need these for the
+                -- MonoLocalBinds test in TcBinds.decideGeneralisationPlan
 
-	; fvs' `seq` -- See Note [Free-variable space leak]
+        ; fvs' `seq` -- See Note [Free-variable space leak]
           return (L loc (bind { fun_matches = matches'
-			      , bind_fvs   = fvs' }), 
-		  [plain_name], rhs_fvs)
+                              , bind_fvs   = fvs' }), 
+                  [plain_name], rhs_fvs)
       }
 
 rnBind _ b = pprPanic "rnBind" (ppr b)
@@ -513,7 +507,7 @@ trac ticket #1136.
 
 ---------------------
 depAnalBinds :: Bag (LHsBind Name, [Name], Uses)
-	     -> ([(RecFlag, LHsBinds Name)], DefUses)
+             -> ([(RecFlag, LHsBinds Name)], DefUses)
 -- Dependency analysis; this is important so that 
 -- unused-binding reporting is accurate
 depAnalBinds binds_w_dus
@@ -528,21 +522,21 @@ depAnalBinds binds_w_dus
 
     get_du (AcyclicSCC (_, bndrs, uses)) = (Just (mkNameSet bndrs), uses)
     get_du (CyclicSCC  binds_w_dus)      = (Just defs, uses)
-	where
-	  defs = mkNameSet [b | (_,bs,_) <- binds_w_dus, b <- bs]
-	  uses = unionManyNameSets [u | (_,_,u) <- binds_w_dus]
+        where
+          defs = mkNameSet [b | (_,bs,_) <- binds_w_dus, b <- bs]
+          uses = unionManyNameSets [u | (_,_,u) <- binds_w_dus]
 
 ---------------------
 -- Bind the top-level forall'd type variables in the sigs.
--- E.g 	f :: a -> a
---	f = rhs
---	The 'a' scopes over the rhs
+-- E.g  f :: a -> a
+--      f = rhs
+--      The 'a' scopes over the rhs
 --
 -- NB: there'll usually be just one (for a function binding)
 --     but if there are many, one may shadow the rest; too bad!
---	e.g  x :: [a] -> [a]
---	     y :: [(a,a)] -> a
---	     (x,y) = e
+--      e.g  x :: [a] -> [a]
+--           y :: [(a,a)] -> a
+--           (x,y) = e
 --      In e, 'a' will be in scope, and it'll be the one from 'y'!
 
 mkSigTvFn :: [LSig Name] -> (Name -> [Name])
@@ -553,11 +547,11 @@ mkSigTvFn sigs
   where
     env :: NameEnv [Name]
     env = mkNameEnv [ (name, hsLKiTyVarNames ltvs)  -- Kind variables and type variables
-		    | L _ (TypeSig names
-			           (L _ (HsForAllTy Explicit ltvs _ _))) <- sigs
+                    | L _ (TypeSig names
+                                   (L _ (HsForAllTy Explicit ltvs _ _))) <- sigs
                     , (L _ name) <- names]
-	-- Note the pattern-match on "Explicit"; we only bind
-	-- type variables from signatures with an explicit top-level for-all
+        -- Note the pattern-match on "Explicit"; we only bind
+        -- type variables from signatures with an explicit top-level for-all
 \end{code}
 
 
@@ -567,8 +561,8 @@ declaration.   Like @rnBinds@ but without dependency analysis.
 NOTA BENE: we record each {\em binder} of a method-bind group as a free variable.
 That's crucial when dealing with an instance decl:
 \begin{verbatim}
-	instance Foo (T a) where
-	   op x = ...
+        instance Foo (T a) where
+           op x = ...
 \end{verbatim}
 This might be the {\em sole} occurrence of @op@ for an imported class @Foo@,
 and unless @op@ occurs we won't treat the type signature of @op@ in the class
@@ -577,37 +571,37 @@ in many ways the @op@ in an instance decl is just like an occurrence, not
 a binder.
 
 \begin{code}
-rnMethodBinds :: Name			-- Class name
-	      -> (Name -> [Name])	-- Signature tyvar function
-	      -> LHsBinds RdrName
-	      -> RnM (LHsBinds Name, FreeVars)
+rnMethodBinds :: Name                   -- Class name
+              -> (Name -> [Name])       -- Signature tyvar function
+              -> LHsBinds RdrName
+              -> RnM (LHsBinds Name, FreeVars)
 
 rnMethodBinds cls sig_fn binds
   = do { checkDupRdrNames meth_names
-	     -- Check that the same method is not given twice in the
-	     -- same instance decl	instance C T where
-	     --			      f x = ...
-	     --			      g y = ...
-	     --			      f x = ...
-	     -- We must use checkDupRdrNames because the Name of the
-	     -- method is the Name of the class selector, whose SrcSpan
-	     -- points to the class declaration; and we use rnMethodBinds
-	     -- for instance decls too
+             -- Check that the same method is not given twice in the
+             -- same instance decl      instance C T where
+             --                       f x = ...
+             --                       g y = ...
+             --                       f x = ...
+             -- We must use checkDupRdrNames because the Name of the
+             -- method is the Name of the class selector, whose SrcSpan
+             -- points to the class declaration; and we use rnMethodBinds
+             -- for instance decls too
 
        ; foldlM do_one (emptyBag, emptyFVs) (bagToList binds) }
   where 
     meth_names  = collectMethodBinders binds
     do_one (binds,fvs) bind 
        = do { (bind', fvs_bind) <- rnMethodBind cls sig_fn bind
-	    ; return (binds `unionBags` bind', fvs_bind `plusFV` fvs) }
+            ; return (binds `unionBags` bind', fvs_bind `plusFV` fvs) }
 
 rnMethodBind :: Name
-	      -> (Name -> [Name])
-	      -> LHsBindLR RdrName RdrName
-	      -> RnM (Bag (LHsBindLR Name Name), FreeVars)
+              -> (Name -> [Name])
+              -> LHsBindLR RdrName RdrName
+              -> RnM (Bag (LHsBindLR Name Name), FreeVars)
 rnMethodBind cls sig_fn 
              (L loc bind@(FunBind { fun_id = name, fun_infix = is_infix 
-				  , fun_matches = MG { mg_alts = matches } }))
+                                  , fun_matches = MG { mg_alts = matches } }))
   = setSrcSpan loc $ do
     sel_name <- wrapLocM (lookupInstDeclBndr cls (ptext (sLit "method"))) name
     let plain_name = unLoc sel_name
@@ -635,9 +629,9 @@ rnMethodBind _ _ b = pprPanic "rnMethodBind" (ppr b)
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsubsection[dep-Sigs]{Signatures (and user-pragmas for values)}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @renameSigs@ checks for:
@@ -651,27 +645,27 @@ signatures.  We'd only need this if we wanted to report unused tyvars.
 
 \begin{code}
 renameSigs :: HsSigCtxt 
-	   -> [LSig RdrName]
-	   -> RnM ([LSig Name], FreeVars)
+           -> [LSig RdrName]
+           -> RnM ([LSig Name], FreeVars)
 -- Renames the signatures and performs error checks
 renameSigs ctxt sigs 
-  = do	{ mapM_ dupSigDeclErr (findDupSigs sigs)
+  = do  { mapM_ dupSigDeclErr (findDupSigs sigs)
 
-	; checkDupMinimalSigs sigs
+        ; checkDupMinimalSigs sigs
 
-	; (sigs', sig_fvs) <- mapFvRn (wrapLocFstM (renameSig ctxt)) sigs
+        ; (sigs', sig_fvs) <- mapFvRn (wrapLocFstM (renameSig ctxt)) sigs
 
-	; let (good_sigs, bad_sigs) = partition (okHsSig ctxt) sigs'
-	; mapM_ misplacedSigErr bad_sigs		 -- Misplaced
+        ; let (good_sigs, bad_sigs) = partition (okHsSig ctxt) sigs'
+        ; mapM_ misplacedSigErr bad_sigs                 -- Misplaced
 
-	; return (good_sigs, sig_fvs) } 
+        ; return (good_sigs, sig_fvs) } 
 
 ----------------------
 -- We use lookupSigOccRn in the signatures, which is a little bit unsatisfactory
 -- because this won't work for:
---	instance Foo T where
---	  {-# INLINE op #-}
---	  Baz.op = ...
+--      instance Foo T where
+--        {-# INLINE op #-}
+--        Baz.op = ...
 -- We'll just rename the INLINE prag to refer to whatever other 'op'
 -- is in scope.  (I'm assuming that Baz.op isn't in scope unqualified.)
 -- Doesn't seem worth much trouble to sort this.
@@ -679,42 +673,42 @@ renameSigs ctxt sigs
 renameSig :: HsSigCtxt -> Sig RdrName -> RnM (Sig Name, FreeVars)
 -- FixitySig is renamed elsewhere.
 renameSig _ (IdSig x)
-  = return (IdSig x, emptyFVs)	  -- Actually this never occurs
+  = return (IdSig x, emptyFVs)    -- Actually this never occurs
 
 renameSig ctxt sig@(TypeSig vs ty)
-  = do	{ new_vs <- mapM (lookupSigOccRn ctxt sig) vs
-	; (new_ty, fvs) <- rnHsSigType (ppr_sig_bndrs vs) ty
-	; return (TypeSig new_vs new_ty, fvs) }
+  = do  { new_vs <- mapM (lookupSigOccRn ctxt sig) vs
+        ; (new_ty, fvs) <- rnHsSigType (ppr_sig_bndrs vs) ty
+        ; return (TypeSig new_vs new_ty, fvs) }
 
 renameSig ctxt sig@(GenericSig vs ty)
-  = do	{ defaultSigs_on <- xoptM Opt_DefaultSignatures
+  = do  { defaultSigs_on <- xoptM Opt_DefaultSignatures
         ; unless defaultSigs_on (addErr (defaultSigErr sig))
         ; new_v <- mapM (lookupSigOccRn ctxt sig) vs
-	; (new_ty, fvs) <- rnHsSigType (ppr_sig_bndrs vs) ty
-	; return (GenericSig new_v new_ty, fvs) }
+        ; (new_ty, fvs) <- rnHsSigType (ppr_sig_bndrs vs) ty
+        ; return (GenericSig new_v new_ty, fvs) }
 
 renameSig _ (SpecInstSig ty)
-  = do	{ (new_ty, fvs) <- rnLHsType SpecInstSigCtx ty
-	; return (SpecInstSig new_ty,fvs) }
+  = do  { (new_ty, fvs) <- rnLHsType SpecInstSigCtx ty
+        ; return (SpecInstSig new_ty,fvs) }
 
 -- {-# SPECIALISE #-} pragmas can refer to imported Ids
 -- so, in the top-level case (when mb_names is Nothing)
 -- we use lookupOccRn.  If there's both an imported and a local 'f'
 -- then the SPECIALISE pragma is ambiguous, unlike all other signatures
 renameSig ctxt sig@(SpecSig v ty inl)
-  = do	{ new_v <- case ctxt of 
+  = do  { new_v <- case ctxt of 
                      TopSigCtxt {} -> lookupLocatedOccRn v
                      _             -> lookupSigOccRn ctxt sig v
-	; (new_ty, fvs) <- rnHsSigType (quotes (ppr v)) ty
-	; return (SpecSig new_v new_ty inl, fvs) }
+        ; (new_ty, fvs) <- rnHsSigType (quotes (ppr v)) ty
+        ; return (SpecSig new_v new_ty inl, fvs) }
 
 renameSig ctxt sig@(InlineSig v s)
-  = do	{ new_v <- lookupSigOccRn ctxt sig v
-	; return (InlineSig new_v s, emptyFVs) }
+  = do  { new_v <- lookupSigOccRn ctxt sig v
+        ; return (InlineSig new_v s, emptyFVs) }
 
 renameSig ctxt sig@(FixSig (FixitySig v f))
-  = do	{ new_v <- lookupSigOccRn ctxt sig v
-	; return (FixSig (FixitySig new_v f), emptyFVs) }
+  = do  { new_v <- lookupSigOccRn ctxt sig v
+        ; return (FixSig (FixitySig new_v f), emptyFVs) }
 
 renameSig ctxt sig@(MinimalSig bf)
   = do new_bf <- traverse (lookupSigOccRn ctxt sig) bf
@@ -759,8 +753,8 @@ findDupSigs :: [LSig RdrName] -> [[(Located RdrName, Sig RdrName)]]
 -- not-in-scope binders, which gives bogus dup-sig errors
 -- NB: in a class decl, a 'generic' sig is not considered 
 --     equal to an ordinary sig, so we allow, say
---     	     class C a where
---	       op :: a -> a
+--           class C a where
+--             op :: a -> a
 --             default op :: Eq a => a -> a
 findDupSigs sigs
   = findDupsEq matching_sig (concatMap (expand_sig . unLoc) sigs)
@@ -788,9 +782,9 @@ checkDupMinimalSigs sigs
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Match}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -815,17 +809,17 @@ rnMatch' :: Outputable (body RdrName) => HsMatchContext Name
          -> Match RdrName (Located (body RdrName))
          -> RnM (Match Name (Located (body Name)), FreeVars)
 rnMatch' ctxt rnBody match@(Match pats maybe_rhs_sig grhss)
-  = do 	{ 	-- Result type signatures are no longer supported
-	  case maybe_rhs_sig of	
-	        Nothing -> return ()
-	        Just (L loc ty) -> addErrAt loc (resSigErr ctxt match ty)
+  = do  {       -- Result type signatures are no longer supported
+          case maybe_rhs_sig of 
+                Nothing -> return ()
+                Just (L loc ty) -> addErrAt loc (resSigErr ctxt match ty)
 
-	       -- Now the main event
-	       -- note that there are no local ficity decls for matches
-	; rnPats ctxt pats	$ \ pats' -> do
-	{ (grhss', grhss_fvs) <- rnGRHSs ctxt rnBody grhss
+               -- Now the main event
+               -- note that there are no local ficity decls for matches
+        ; rnPats ctxt pats      $ \ pats' -> do
+        { (grhss', grhss_fvs) <- rnGRHSs ctxt rnBody grhss
 
-	; return (Match pats' Nothing grhss', grhss_fvs) }}
+        ; return (Match pats' Nothing grhss', grhss_fvs) }}
 
 emptyCaseErr :: HsMatchContext Name -> SDoc
 emptyCaseErr ctxt = hang (ptext (sLit "Empty list of alternatives in") <+> pp_ctxt)
@@ -840,15 +834,15 @@ emptyCaseErr ctxt = hang (ptext (sLit "Empty list of alternatives in") <+> pp_ct
 resSigErr :: Outputable body => HsMatchContext Name -> Match RdrName body -> HsType RdrName -> SDoc 
 resSigErr ctxt match ty
    = vcat [ ptext (sLit "Illegal result type signature") <+> quotes (ppr ty)
-	  , nest 2 $ ptext (sLit "Result signatures are no longer supported in pattern matches")
- 	  , pprMatchInCtxt ctxt match ]
+          , nest 2 $ ptext (sLit "Result signatures are no longer supported in pattern matches")
+          , pprMatchInCtxt ctxt match ]
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsubsection{Guarded right-hand sides (GRHSs)}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -857,7 +851,7 @@ rnGRHSs :: HsMatchContext Name
         -> GRHSs RdrName (Located (body RdrName))
         -> RnM (GRHSs Name (Located (body Name)), FreeVars)
 rnGRHSs ctxt rnBody (GRHSs grhss binds)
-  = rnLocalBindsAndThen binds	$ \ binds' -> do
+  = rnLocalBindsAndThen binds   $ \ binds' -> do
     (grhss', fvGRHSs) <- mapFvRn (rnGRHS ctxt rnBody) grhss
     return (GRHSs grhss' binds', fvGRHSs)
 
@@ -872,27 +866,27 @@ rnGRHS' :: HsMatchContext Name
         -> GRHS RdrName (Located (body RdrName))
         -> RnM (GRHS Name (Located (body Name)), FreeVars)
 rnGRHS' ctxt rnBody (GRHS guards rhs)
-  = do	{ pattern_guards_allowed <- xoptM Opt_PatternGuards
+  = do  { pattern_guards_allowed <- xoptM Opt_PatternGuards
         ; ((guards', rhs'), fvs) <- rnStmts (PatGuard ctxt) rnLExpr guards $ \ _ ->
-				    rnBody rhs
+                                    rnBody rhs
 
-	; unless (pattern_guards_allowed || is_standard_guard guards')
-	  	 (addWarn (nonStdGuardErr guards'))
+        ; unless (pattern_guards_allowed || is_standard_guard guards')
+                 (addWarn (nonStdGuardErr guards'))
 
-	; return (GRHS guards' rhs', fvs) }
+        ; return (GRHS guards' rhs', fvs) }
   where
-	-- Standard Haskell 1.4 guards are just a single boolean
-	-- expression, rather than a list of qualifiers as in the
-	-- Glasgow extension
+        -- Standard Haskell 1.4 guards are just a single boolean
+        -- expression, rather than a list of qualifiers as in the
+        -- Glasgow extension
     is_standard_guard []                       = True
     is_standard_guard [L _ (BodyStmt _ _ _ _)] = True
     is_standard_guard _                        = False
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Error messages}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/simplCore/CoreMonad.lhs b/compiler/simplCore/CoreMonad.lhs
index 6d49d38..5a30494 100644
--- a/compiler/simplCore/CoreMonad.lhs
+++ b/compiler/simplCore/CoreMonad.lhs
@@ -4,12 +4,6 @@
 \section[CoreMonad]{The core pipeline monad}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# LANGUAGE UndecidableInstances #-}
 
@@ -71,11 +65,11 @@ import Name( Name )
 import CoreSyn
 import PprCore
 import CoreUtils
-import CoreLint		( lintCoreBindings, lintExpr )
+import CoreLint         ( lintCoreBindings, lintExpr )
 import HscTypes
 import Module
 import DynFlags
-import StaticFlags	
+import StaticFlags      
 import Rules            ( RuleBase )
 import BasicTypes       ( CompilerPhase(..) )
 import Annotations
@@ -98,7 +92,7 @@ import UniqFM       ( UniqFM, mapUFM, filterUFM )
 import MonadUtils
 
 import Util ( split )
-import ListSetOps	( runs )
+import ListSetOps       ( runs )
 import Data.List
 import Data.Ord
 import Data.Dynamic
@@ -126,9 +120,9 @@ restoreLinkerGlobals () = return ()
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                        Debug output
-%*									*
+%*                                                                      *
 %************************************************************************
 
 These functions are not CoreM monad stuff, but they probably ought to
@@ -155,10 +149,10 @@ dumpIfSet dflags dump_me pass extra_info doc
   = Err.dumpIfSet dflags dump_me (showSDoc dflags (ppr pass <+> extra_info)) doc
 
 dumpPassResult :: DynFlags 
-               -> Maybe DumpFlag		-- Just df => show details in a file whose
-	       	  			--            name is specified by df
-               -> SDoc 			-- Header
-               -> SDoc 			-- Extra info to appear after header
+               -> Maybe DumpFlag                -- Just df => show details in a file whose
+                                        --            name is specified by df
+               -> SDoc                  -- Header
+               -> SDoc                  -- Extra info to appear after header
                -> CoreProgram -> [CoreRule] 
                -> IO ()
 dumpPassResult dflags mb_flag hdr extra_info binds rules
@@ -168,13 +162,13 @@ dumpPassResult dflags mb_flag hdr extra_info binds rules
   | otherwise
   = Err.debugTraceMsg dflags 2 size_doc
           -- Report result size 
-	  -- This has the side effect of forcing the intermediate to be evaluated
+          -- This has the side effect of forcing the intermediate to be evaluated
 
   where
     size_doc = sep [text "Result size of" <+> hdr, nest 2 (equals <+> ppr (coreBindsStats binds))]
 
     dump_doc  = vcat [ nest 2 extra_info
-		     , size_doc
+                     , size_doc
                      , blankLine
                      , pprCoreBindings binds 
                      , ppUnless (null rules) pp_rules ]
@@ -207,10 +201,10 @@ displayLintResults dflags pass warns errs binds
 
   | not (isEmptyBag warns)
   , not (case pass of { CoreDesugar -> True; _ -> False })
-    	-- Suppress warnings after desugaring pass because some
-	-- are legitimate. Notably, the desugarer generates instance
-	-- methods with INLINE pragmas that form a mutually recursive
-	-- group.  Only afer a round of simplification are they unravelled.
+        -- Suppress warnings after desugaring pass because some
+        -- are legitimate. Notably, the desugarer generates instance
+        -- methods with INLINE pragmas that form a mutually recursive
+        -- group.  Only afer a round of simplification are they unravelled.
   , not opt_NoDebugOutput
   , showLintWarnings pass
   = log_action dflags dflags Err.SevDump noSrcSpan defaultDumpStyle
@@ -278,10 +272,10 @@ interactiveInScope hsc_env
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
               The CoreToDo type and related types
-	  Abstraction of core-to-core passes to run.
-%*									*
+          Abstraction of core-to-core passes to run.
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -326,8 +320,8 @@ coreDumpFlag (CoreDoPluginPass {})    = Just Opt_D_dump_core_pipeline
 coreDumpFlag CoreDoFloatInwards       = Just Opt_D_verbose_core2core
 coreDumpFlag (CoreDoFloatOutwards {}) = Just Opt_D_verbose_core2core
 coreDumpFlag CoreLiberateCase         = Just Opt_D_verbose_core2core
-coreDumpFlag CoreDoStaticArgs 	      = Just Opt_D_verbose_core2core
-coreDumpFlag CoreDoStrictness 	      = Just Opt_D_dump_stranal
+coreDumpFlag CoreDoStaticArgs         = Just Opt_D_verbose_core2core
+coreDumpFlag CoreDoStrictness         = Just Opt_D_dump_stranal
 coreDumpFlag CoreDoWorkerWrapper      = Just Opt_D_dump_worker_wrapper
 coreDumpFlag CoreDoSpecialising       = Just Opt_D_dump_spec
 coreDumpFlag CoreDoSpecConstr         = Just Opt_D_dump_spec
@@ -349,8 +343,8 @@ instance Outputable CoreToDo where
   ppr CoreDoFloatInwards       = ptext (sLit "Float inwards")
   ppr (CoreDoFloatOutwards f)  = ptext (sLit "Float out") <> parens (ppr f)
   ppr CoreLiberateCase         = ptext (sLit "Liberate case")
-  ppr CoreDoStaticArgs 	       = ptext (sLit "Static argument")
-  ppr CoreDoStrictness 	       = ptext (sLit "Demand analysis")
+  ppr CoreDoStaticArgs         = ptext (sLit "Static argument")
+  ppr CoreDoStrictness         = ptext (sLit "Demand analysis")
   ppr CoreDoWorkerWrapper      = ptext (sLit "Worker Wrapper binds")
   ppr CoreDoSpecialising       = ptext (sLit "Specialise")
   ppr CoreDoSpecConstr         = ptext (sLit "SpecConstr")
@@ -359,7 +353,7 @@ instance Outputable CoreToDo where
   ppr CoreDesugar              = ptext (sLit "Desugar (before optimization)")
   ppr CoreDesugarOpt           = ptext (sLit "Desugar (after optimization)")
   ppr CoreTidy                 = ptext (sLit "Tidy Core")
-  ppr CorePrep 		       = ptext (sLit "CorePrep")
+  ppr CorePrep                 = ptext (sLit "CorePrep")
   ppr CoreDoPrintCore          = ptext (sLit "Print core")
   ppr (CoreDoRuleCheck {})     = ptext (sLit "Rule check")
   ppr CoreDoNothing            = ptext (sLit "CoreDoNothing")
@@ -393,7 +387,7 @@ instance Outputable SimplifierMode where
              , pp_flag r   (sLit "rules") <> comma
              , pp_flag eta (sLit "eta-expand") <> comma
              , pp_flag cc  (sLit "case-of-case") ])
-	 where
+         where
            pp_flag f s = ppUnless f (ptext (sLit "no")) <+> ptext s
 \end{code}
 
@@ -403,7 +397,7 @@ data FloatOutSwitches = FloatOutSwitches {
   floatOutLambdas   :: Maybe Int,  -- ^ Just n <=> float lambdas to top level, if
                                    -- doing so will abstract over n or fewer 
                                    -- value variables
-				   -- Nothing <=> float all lambdas to top level,
+                                   -- Nothing <=> float all lambdas to top level,
                                    --             regardless of how many free variables
                                    -- Just 0 is the vanilla case: float a lambda
                                    --    iff it has no free vars
@@ -481,9 +475,9 @@ to switch off those rules until after floating.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Types for Plugins
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -522,19 +516,19 @@ bindsOnlyPass pass guts
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Counting and logging
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 verboseSimplStats :: Bool
-verboseSimplStats = opt_PprStyle_Debug		-- For now, anyway
+verboseSimplStats = opt_PprStyle_Debug          -- For now, anyway
 
-zeroSimplCount	   :: DynFlags -> SimplCount
+zeroSimplCount     :: DynFlags -> SimplCount
 isZeroSimplCount   :: SimplCount -> Bool
 hasDetailedCounts  :: SimplCount -> Bool
-pprSimplCount	   :: SimplCount -> SDoc
+pprSimplCount      :: SimplCount -> SDoc
 doSimplTick        :: DynFlags -> Tick -> SimplCount -> SimplCount
 doFreeSimplTick    ::             Tick -> SimplCount -> SimplCount
 plusSimplCount     :: SimplCount -> SimplCount -> SimplCount
@@ -542,18 +536,18 @@ plusSimplCount     :: SimplCount -> SimplCount -> SimplCount
 
 \begin{code}
 data SimplCount 
-   = VerySimplCount !Int	-- Used when don't want detailed stats
-
-   | SimplCount	{
-	ticks   :: !Int,	-- Total ticks
-	details :: !TickCounts,	-- How many of each type
-
-	n_log	:: !Int,	-- N
-	log1	:: [Tick],	-- Last N events; <= opt_HistorySize, 
-		   		--   most recent first
-	log2	:: [Tick]	-- Last opt_HistorySize events before that
-		   		-- Having log1, log2 lets us accumulate the
-				-- recent history reasonably efficiently
+   = VerySimplCount !Int        -- Used when don't want detailed stats
+
+   | SimplCount {
+        ticks   :: !Int,        -- Total ticks
+        details :: !TickCounts, -- How many of each type
+
+        n_log   :: !Int,        -- N
+        log1    :: [Tick],      -- Last N events; <= opt_HistorySize, 
+                                --   most recent first
+        log2    :: [Tick]       -- Last opt_HistorySize events before that
+                                -- Having log1, log2 lets us accumulate the
+                                -- recent history reasonably efficiently
      }
 
 type TickCounts = Map Tick Int
@@ -563,15 +557,15 @@ simplCountN (VerySimplCount n)         = n
 simplCountN (SimplCount { ticks = n }) = n
 
 zeroSimplCount dflags
-		-- This is where we decide whether to do
-		-- the VerySimpl version or the full-stats version
+                -- This is where we decide whether to do
+                -- the VerySimpl version or the full-stats version
   | dopt Opt_D_dump_simpl_stats dflags
   = SimplCount {ticks = 0, details = Map.empty,
                 n_log = 0, log1 = [], log2 = []}
   | otherwise
   = VerySimplCount 0
 
-isZeroSimplCount (VerySimplCount n)    	    = n==0
+isZeroSimplCount (VerySimplCount n)         = n==0
 isZeroSimplCount (SimplCount { ticks = n }) = n==0
 
 hasDetailedCounts (VerySimplCount {}) = False
@@ -595,20 +589,20 @@ doSimplTick _ _ (VerySimplCount n) = VerySimplCount (n+1)
 -- be pretty strict here!
 addTick :: TickCounts -> Tick -> TickCounts
 addTick fm tick = case Map.lookup tick fm of
-			Nothing -> Map.insert tick 1 fm
-			Just n  -> n1 `seq` Map.insert tick n1 fm
-				where
-				   n1 = n+1
+                        Nothing -> Map.insert tick 1 fm
+                        Just n  -> n1 `seq` Map.insert tick n1 fm
+                                where
+                                   n1 = n+1
 
 
 plusSimplCount sc1@(SimplCount { ticks = tks1, details = dts1 })
-	       sc2@(SimplCount { ticks = tks2, details = dts2 })
+               sc2@(SimplCount { ticks = tks2, details = dts2 })
   = log_base { ticks = tks1 + tks2, details = Map.unionWith (+) dts1 dts2 }
   where
-	-- A hackish way of getting recent log info
-    log_base | null (log1 sc2) = sc1	-- Nothing at all in sc2
-	     | null (log2 sc2) = sc2 { log2 = log1 sc1 }
-	     | otherwise       = sc2
+        -- A hackish way of getting recent log info
+    log_base | null (log1 sc2) = sc1    -- Nothing at all in sc2
+             | null (log2 sc2) = sc2 { log2 = log1 sc1 }
+             | otherwise       = sc2
 
 plusSimplCount (VerySimplCount n) (VerySimplCount m) = VerySimplCount (n+m)
 plusSimplCount _                  _                  = panic "plusSimplCount"
@@ -617,21 +611,21 @@ plusSimplCount _                  _                  = panic "plusSimplCount"
 pprSimplCount (VerySimplCount n) = ptext (sLit "Total ticks:") <+> int n
 pprSimplCount (SimplCount { ticks = tks, details = dts, log1 = l1, log2 = l2 })
   = vcat [ptext (sLit "Total ticks:    ") <+> int tks,
-	  blankLine,
-	  pprTickCounts dts,
-	  if verboseSimplStats then
-		vcat [blankLine,
-		      ptext (sLit "Log (most recent first)"),
-		      nest 4 (vcat (map ppr l1) $$ vcat (map ppr l2))]
-	  else empty
+          blankLine,
+          pprTickCounts dts,
+          if verboseSimplStats then
+                vcat [blankLine,
+                      ptext (sLit "Log (most recent first)"),
+                      nest 4 (vcat (map ppr l1) $$ vcat (map ppr l2))]
+          else empty
     ]
 
 pprTickCounts :: Map Tick Int -> SDoc
 pprTickCounts counts
   = vcat (map pprTickGroup groups)
   where
-    groups :: [[(Tick,Int)]]	-- Each group shares a comon tag
-    	      			-- toList returns common tags adjacent
+    groups :: [[(Tick,Int)]]    -- Each group shares a comon tag
+                                -- toList returns common tags adjacent
     groups = runs same_tag (Map.toList counts)
     same_tag (tick1,_) (tick2,_) = tickToTag tick1 == tickToTag tick2
 
@@ -647,28 +641,28 @@ pprTickGroup [] = panic "pprTickGroup"
 
 \begin{code}
 data Tick
-  = PreInlineUnconditionally	Id
-  | PostInlineUnconditionally	Id
+  = PreInlineUnconditionally    Id
+  | PostInlineUnconditionally   Id
 
-  | UnfoldingDone    		Id
-  | RuleFired			FastString	-- Rule name
+  | UnfoldingDone               Id
+  | RuleFired                   FastString      -- Rule name
 
   | LetFloatFromLet
-  | EtaExpansion		Id	-- LHS binder
-  | EtaReduction		Id	-- Binder on outer lambda
-  | BetaReduction		Id	-- Lambda binder
+  | EtaExpansion                Id      -- LHS binder
+  | EtaReduction                Id      -- Binder on outer lambda
+  | BetaReduction               Id      -- Lambda binder
 
 
-  | CaseOfCase			Id	-- Bndr on *inner* case
-  | KnownBranch			Id	-- Case binder
-  | CaseMerge			Id	-- Binder on outer case
-  | AltMerge			Id	-- Case binder
-  | CaseElim			Id	-- Case binder
-  | CaseIdentity		Id	-- Case binder
-  | FillInCaseDefault		Id	-- Case binder
+  | CaseOfCase                  Id      -- Bndr on *inner* case
+  | KnownBranch                 Id      -- Case binder
+  | CaseMerge                   Id      -- Binder on outer case
+  | AltMerge                    Id      -- Case binder
+  | CaseElim                    Id      -- Case binder
+  | CaseIdentity                Id      -- Case binder
+  | FillInCaseDefault           Id      -- Case binder
 
-  | BottomFound		
-  | SimplifierDone		-- Ticked at each iteration of the simplifier
+  | BottomFound         
+  | SimplifierDone              -- Ticked at each iteration of the simplifier
 
 instance Outputable Tick where
   ppr tick = text (tickString tick) <+> pprTickCts tick
@@ -682,90 +676,90 @@ instance Ord Tick where
   compare = cmpTick
 
 tickToTag :: Tick -> Int
-tickToTag (PreInlineUnconditionally _)	= 0
-tickToTag (PostInlineUnconditionally _)	= 1
-tickToTag (UnfoldingDone _)		= 2
-tickToTag (RuleFired _)			= 3
-tickToTag LetFloatFromLet		= 4
-tickToTag (EtaExpansion _)		= 5
-tickToTag (EtaReduction _)		= 6
-tickToTag (BetaReduction _)		= 7
-tickToTag (CaseOfCase _)		= 8
-tickToTag (KnownBranch _)		= 9
-tickToTag (CaseMerge _)			= 10
-tickToTag (CaseElim _)			= 11
-tickToTag (CaseIdentity _)		= 12
-tickToTag (FillInCaseDefault _)		= 13
-tickToTag BottomFound			= 14
-tickToTag SimplifierDone		= 16
-tickToTag (AltMerge _)			= 17
+tickToTag (PreInlineUnconditionally _)  = 0
+tickToTag (PostInlineUnconditionally _) = 1
+tickToTag (UnfoldingDone _)             = 2
+tickToTag (RuleFired _)                 = 3
+tickToTag LetFloatFromLet               = 4
+tickToTag (EtaExpansion _)              = 5
+tickToTag (EtaReduction _)              = 6
+tickToTag (BetaReduction _)             = 7
+tickToTag (CaseOfCase _)                = 8
+tickToTag (KnownBranch _)               = 9
+tickToTag (CaseMerge _)                 = 10
+tickToTag (CaseElim _)                  = 11
+tickToTag (CaseIdentity _)              = 12
+tickToTag (FillInCaseDefault _)         = 13
+tickToTag BottomFound                   = 14
+tickToTag SimplifierDone                = 16
+tickToTag (AltMerge _)                  = 17
 
 tickString :: Tick -> String
-tickString (PreInlineUnconditionally _)	= "PreInlineUnconditionally"
+tickString (PreInlineUnconditionally _) = "PreInlineUnconditionally"
 tickString (PostInlineUnconditionally _)= "PostInlineUnconditionally"
-tickString (UnfoldingDone _)		= "UnfoldingDone"
-tickString (RuleFired _)		= "RuleFired"
-tickString LetFloatFromLet		= "LetFloatFromLet"
-tickString (EtaExpansion _)		= "EtaExpansion"
-tickString (EtaReduction _)		= "EtaReduction"
-tickString (BetaReduction _)		= "BetaReduction"
-tickString (CaseOfCase _)		= "CaseOfCase"
-tickString (KnownBranch _)		= "KnownBranch"
-tickString (CaseMerge _)		= "CaseMerge"
-tickString (AltMerge _)			= "AltMerge"
-tickString (CaseElim _)			= "CaseElim"
-tickString (CaseIdentity _)		= "CaseIdentity"
-tickString (FillInCaseDefault _)	= "FillInCaseDefault"
-tickString BottomFound			= "BottomFound"
-tickString SimplifierDone		= "SimplifierDone"
+tickString (UnfoldingDone _)            = "UnfoldingDone"
+tickString (RuleFired _)                = "RuleFired"
+tickString LetFloatFromLet              = "LetFloatFromLet"
+tickString (EtaExpansion _)             = "EtaExpansion"
+tickString (EtaReduction _)             = "EtaReduction"
+tickString (BetaReduction _)            = "BetaReduction"
+tickString (CaseOfCase _)               = "CaseOfCase"
+tickString (KnownBranch _)              = "KnownBranch"
+tickString (CaseMerge _)                = "CaseMerge"
+tickString (AltMerge _)                 = "AltMerge"
+tickString (CaseElim _)                 = "CaseElim"
+tickString (CaseIdentity _)             = "CaseIdentity"
+tickString (FillInCaseDefault _)        = "FillInCaseDefault"
+tickString BottomFound                  = "BottomFound"
+tickString SimplifierDone               = "SimplifierDone"
 
 pprTickCts :: Tick -> SDoc
-pprTickCts (PreInlineUnconditionally v)	= ppr v
+pprTickCts (PreInlineUnconditionally v) = ppr v
 pprTickCts (PostInlineUnconditionally v)= ppr v
-pprTickCts (UnfoldingDone v)		= ppr v
-pprTickCts (RuleFired v)		= ppr v
-pprTickCts LetFloatFromLet		= empty
-pprTickCts (EtaExpansion v)		= ppr v
-pprTickCts (EtaReduction v)		= ppr v
-pprTickCts (BetaReduction v)		= ppr v
-pprTickCts (CaseOfCase v)		= ppr v
-pprTickCts (KnownBranch v)		= ppr v
-pprTickCts (CaseMerge v)		= ppr v
-pprTickCts (AltMerge v)			= ppr v
-pprTickCts (CaseElim v)			= ppr v
-pprTickCts (CaseIdentity v)		= ppr v
-pprTickCts (FillInCaseDefault v)	= ppr v
-pprTickCts _    			= empty
+pprTickCts (UnfoldingDone v)            = ppr v
+pprTickCts (RuleFired v)                = ppr v
+pprTickCts LetFloatFromLet              = empty
+pprTickCts (EtaExpansion v)             = ppr v
+pprTickCts (EtaReduction v)             = ppr v
+pprTickCts (BetaReduction v)            = ppr v
+pprTickCts (CaseOfCase v)               = ppr v
+pprTickCts (KnownBranch v)              = ppr v
+pprTickCts (CaseMerge v)                = ppr v
+pprTickCts (AltMerge v)                 = ppr v
+pprTickCts (CaseElim v)                 = ppr v
+pprTickCts (CaseIdentity v)             = ppr v
+pprTickCts (FillInCaseDefault v)        = ppr v
+pprTickCts _                            = empty
 
 cmpTick :: Tick -> Tick -> Ordering
 cmpTick a b = case (tickToTag a `compare` tickToTag b) of
-		GT -> GT
-		EQ -> cmpEqTick a b
-		LT -> LT
+                GT -> GT
+                EQ -> cmpEqTick a b
+                LT -> LT
 
 cmpEqTick :: Tick -> Tick -> Ordering
-cmpEqTick (PreInlineUnconditionally a)	(PreInlineUnconditionally b)	= a `compare` b
-cmpEqTick (PostInlineUnconditionally a)	(PostInlineUnconditionally b)	= a `compare` b
-cmpEqTick (UnfoldingDone a)		(UnfoldingDone b)		= a `compare` b
-cmpEqTick (RuleFired a)			(RuleFired b)			= a `compare` b
-cmpEqTick (EtaExpansion a)		(EtaExpansion b)		= a `compare` b
-cmpEqTick (EtaReduction a)		(EtaReduction b)		= a `compare` b
-cmpEqTick (BetaReduction a)		(BetaReduction b)		= a `compare` b
-cmpEqTick (CaseOfCase a)		(CaseOfCase b)			= a `compare` b
-cmpEqTick (KnownBranch a)		(KnownBranch b)			= a `compare` b
-cmpEqTick (CaseMerge a)			(CaseMerge b)			= a `compare` b
-cmpEqTick (AltMerge a)			(AltMerge b)			= a `compare` b
-cmpEqTick (CaseElim a)			(CaseElim b)			= a `compare` b
-cmpEqTick (CaseIdentity a)		(CaseIdentity b)		= a `compare` b
-cmpEqTick (FillInCaseDefault a)		(FillInCaseDefault b)		= a `compare` b
-cmpEqTick _     			_     				= EQ
+cmpEqTick (PreInlineUnconditionally a)  (PreInlineUnconditionally b)    = a `compare` b
+cmpEqTick (PostInlineUnconditionally a) (PostInlineUnconditionally b)   = a `compare` b
+cmpEqTick (UnfoldingDone a)             (UnfoldingDone b)               = a `compare` b
+cmpEqTick (RuleFired a)                 (RuleFired b)                   = a `compare` b
+cmpEqTick (EtaExpansion a)              (EtaExpansion b)                = a `compare` b
+cmpEqTick (EtaReduction a)              (EtaReduction b)                = a `compare` b
+cmpEqTick (BetaReduction a)             (BetaReduction b)               = a `compare` b
+cmpEqTick (CaseOfCase a)                (CaseOfCase b)                  = a `compare` b
+cmpEqTick (KnownBranch a)               (KnownBranch b)                 = a `compare` b
+cmpEqTick (CaseMerge a)                 (CaseMerge b)                   = a `compare` b
+cmpEqTick (AltMerge a)                  (AltMerge b)                    = a `compare` b
+cmpEqTick (CaseElim a)                  (CaseElim b)                    = a `compare` b
+cmpEqTick (CaseIdentity a)              (CaseIdentity b)                = a `compare` b
+cmpEqTick (FillInCaseDefault a)         (FillInCaseDefault b)           = a `compare` b
+cmpEqTick _                             _                               = EQ
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Monad and carried data structure definitions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -874,9 +868,9 @@ runCoreM hsc_env rule_base us mod m = do
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Core combinators, not exported
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -919,9 +913,9 @@ liftIOWithCount what = liftIO what >>= (\(count, x) -> addSimplCount count >> re
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Reader, writer and state accessors
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -951,9 +945,9 @@ getOrigNameCache = do
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Initializing globals
-%*									*
+%*                                                                      *
 %************************************************************************
 
 This is a rather annoying function. When a plugin is loaded, it currently
@@ -1006,9 +1000,9 @@ reinitializeGlobals = do
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Dealing with annotations
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1053,9 +1047,9 @@ for every module in the HTP. In the end, it's probably not worth it as long as
 we aren't using annotations heavily.
 
 %************************************************************************
-%*									*
+%*                                                                      *
                 Direct screen output
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1104,9 +1098,9 @@ dumpIfSet_dyn flag str = msg (\dflags -> Err.dumpIfSet_dyn dflags flag str)
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                Finding TyThings
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1117,9 +1111,9 @@ instance MonadThings CoreM where
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                Template Haskell interoperability
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/simplCore/FloatIn.lhs b/compiler/simplCore/FloatIn.lhs
index 8a35749..1c800f5 100644
--- a/compiler/simplCore/FloatIn.lhs
+++ b/compiler/simplCore/FloatIn.lhs
@@ -2,9 +2,9 @@
 % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
 %
 %************************************************************************
-%*									*
+%*                                                                      *
 \section[FloatIn]{Floating Inwards pass}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The main purpose of @floatInwards@ is floating into branches of a
@@ -12,12 +12,6 @@ case, so that we don't allocate things, save them on the stack, and
 then discover that they aren't needed in the chosen branch.
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module FloatIn ( floatInwards ) where
 
@@ -25,11 +19,11 @@ module FloatIn ( floatInwards ) where
 
 import CoreSyn
 import MkCore
-import CoreUtils	( exprIsDupable, exprIsExpandable, exprOkForSideEffects )
-import CoreFVs		( CoreExprWithFVs, freeVars, freeVarsOf, idRuleAndUnfoldingVars )
-import Id		( isOneShotBndr, idType )
+import CoreUtils        ( exprIsDupable, exprIsExpandable, exprOkForSideEffects )
+import CoreFVs          ( CoreExprWithFVs, freeVars, freeVarsOf, idRuleAndUnfoldingVars )
+import Id               ( isOneShotBndr, idType )
 import Var
-import Type		( isUnLiftedType )
+import Type             ( isUnLiftedType )
 import VarSet
 import Util
 import UniqFM
@@ -51,9 +45,9 @@ floatInwards dflags = map fi_top_bind
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Mail from Andr\'e [edited]}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 {\em Will wrote: What??? I thought the idea was to float as far
@@ -115,9 +109,9 @@ still left as a let, if the branch is not taken (or b is not entered)
 the closure for a is not built.
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Main floating-inwards code}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -125,12 +119,12 @@ type FreeVarSet  = IdSet
 type BoundVarSet = IdSet
 
 data FloatInBind = FB BoundVarSet FreeVarSet FloatBind
-	-- The FreeVarSet is the free variables of the binding.  In the case
-	-- of recursive bindings, the set doesn't include the bound
-	-- variables.
+        -- The FreeVarSet is the free variables of the binding.  In the case
+        -- of recursive bindings, the set doesn't include the bound
+        -- variables.
 
 type FloatInBinds = [FloatInBind]
-	-- In reverse dependency order (innermost binder first)
+        -- In reverse dependency order (innermost binder first)
 
 fiExpr :: DynFlags
        -> FloatInBinds      -- Binds we're trying to drop
@@ -176,10 +170,10 @@ Note [Floating in past a lambda group]
   there is no risk of duplicating work thereby, but we do need to be
   careful.  In particular, here is a bad case (it happened in the
   cichelli benchmark:
-   	let v = ...
-   	in let f = /\t -> \a -> ...
-   	   ==>
-   	let f = /\t -> let v = ... in \a -> ...
+        let v = ...
+        in let f = /\t -> \a -> ...
+           ==>
+        let f = /\t -> let v = ... in \a -> ...
   This is bad as now f is an updatable closure (update PAP)
   and has arity 0.
 
@@ -206,11 +200,11 @@ Urk! if all are tyvars, and we don't float in, we may miss an
 
 \begin{code}
 fiExpr dflags to_drop lam@(_, AnnLam _ _)
-  | okToFloatInside bndrs 	-- Float in
+  | okToFloatInside bndrs       -- Float in
      -- NB: Must line up with noFloatIntoRhs (AnnLam...); see Trac #7088
   = mkLams bndrs (fiExpr dflags to_drop body)
 
-  | otherwise	 	-- Dump it all here
+  | otherwise           -- Dump it all here
   = wrapFloats to_drop (mkLams bndrs (fiExpr dflags [] body))
 
   where
@@ -218,9 +212,9 @@ fiExpr dflags to_drop lam@(_, AnnLam _ _)
 \end{code}
 
 We don't float lets inwards past an SCC.
-	ToDo: keep info on current cc, and when passing
-	one, if it is not the same, annotate all lets in binds with current
-	cc, change current cc to the new one and float binds into expr.
+        ToDo: keep info on current cc, and when passing
+        one, if it is not the same, annotate all lets in binds with current
+        cc, change current cc to the new one and float binds into expr.
 
 \begin{code}
 fiExpr dflags to_drop (_, AnnTick tickish expr)
@@ -260,12 +254,12 @@ Consider let x=\y....t... in body.  We do not necessarily want to float
 a binding for t into the RHS, because it'll immediately be floated out
 again.  (It won't go inside the lambda else we risk losing work.)
 In letrec, we need to be more careful still. We don't want to transform
-	let x# = y# +# 1#
-	in
-	letrec f = \z. ...x#...f...
-	in ...
+        let x# = y# +# 1#
+        in
+        letrec f = \z. ...x#...f...
+        in ...
 into
-	letrec f = let x# = y# +# 1# in \z. ...x#...f... in ...
+        letrec f = let x# = y# +# 1# in \z. ...x#...f... in ...
 because now we can't float the let out again, because a letrec
 can't have unboxed bindings.
 
@@ -288,27 +282,27 @@ fiExpr dflags to_drop (_,AnnLet (AnnNonRec id rhs@(rhs_fvs, ann_rhs)) body)
   where
     body_fvs = freeVarsOf body `delVarSet` id
 
-    rule_fvs = idRuleAndUnfoldingVars id	-- See Note [extra_fvs (2): free variables of rules]
+    rule_fvs = idRuleAndUnfoldingVars id        -- See Note [extra_fvs (2): free variables of rules]
     extra_fvs | noFloatIntoRhs ann_rhs
-	      || isUnLiftedType (idType id) = rule_fvs `unionVarSet` rhs_fvs
-	      | otherwise		    = rule_fvs
-	-- See Note [extra_fvs (1): avoid floating into RHS]
-	-- No point in floating in only to float straight out again
-	-- Ditto ok-for-speculation unlifted RHSs
+              || isUnLiftedType (idType id) = rule_fvs `unionVarSet` rhs_fvs
+              | otherwise                   = rule_fvs
+        -- See Note [extra_fvs (1): avoid floating into RHS]
+        -- No point in floating in only to float straight out again
+        -- Ditto ok-for-speculation unlifted RHSs
 
     [shared_binds, extra_binds, rhs_binds, body_binds] 
-	= sepBindsByDropPoint dflags False [extra_fvs, rhs_fvs, body_fvs] to_drop
+        = sepBindsByDropPoint dflags False [extra_fvs, rhs_fvs, body_fvs] to_drop
 
-    new_to_drop = body_binds ++				-- the bindings used only in the body
-		  [FB (unitVarSet id) rhs_fvs'
-                      (FloatLet (NonRec id rhs'))] ++ 	-- the new binding itself
-		  extra_binds ++			-- bindings from extra_fvs
-		  shared_binds  			-- the bindings used both in rhs and body
+    new_to_drop = body_binds ++                         -- the bindings used only in the body
+                  [FB (unitVarSet id) rhs_fvs'
+                      (FloatLet (NonRec id rhs'))] ++   -- the new binding itself
+                  extra_binds ++                        -- bindings from extra_fvs
+                  shared_binds                          -- the bindings used both in rhs and body
 
-	-- Push rhs_binds into the right hand side of the binding
+        -- Push rhs_binds into the right hand side of the binding
     rhs'     = fiExpr dflags rhs_binds rhs
     rhs_fvs' = rhs_fvs `unionVarSet` floatedBindsFVs rhs_binds `unionVarSet` rule_fvs
-			-- Don't forget the rule_fvs; the binding mentions them!
+                        -- Don't forget the rule_fvs; the binding mentions them!
 
 fiExpr dflags to_drop (_,AnnLet (AnnRec bindings) body)
   = fiExpr dflags new_to_drop body
@@ -317,34 +311,34 @@ fiExpr dflags to_drop (_,AnnLet (AnnRec bindings) body)
     rhss_fvs = map freeVarsOf rhss
     body_fvs = freeVarsOf body 
 
-	-- See Note [extra_fvs (1,2)]
+        -- See Note [extra_fvs (1,2)]
     rule_fvs = foldr (unionVarSet . idRuleAndUnfoldingVars) emptyVarSet ids
     extra_fvs = rule_fvs `unionVarSet` 
-		unionVarSets [ fvs | (fvs, rhs) <- rhss
-			     , noFloatIntoRhs rhs ]
+                unionVarSets [ fvs | (fvs, rhs) <- rhss
+                             , noFloatIntoRhs rhs ]
 
     (shared_binds:extra_binds:body_binds:rhss_binds) 
-	= sepBindsByDropPoint dflags False (extra_fvs:body_fvs:rhss_fvs) to_drop
+        = sepBindsByDropPoint dflags False (extra_fvs:body_fvs:rhss_fvs) to_drop
 
-    new_to_drop = body_binds ++		-- the bindings used only in the body
-		  [FB (mkVarSet ids) rhs_fvs' 
+    new_to_drop = body_binds ++         -- the bindings used only in the body
+                  [FB (mkVarSet ids) rhs_fvs' 
                       (FloatLet (Rec (fi_bind rhss_binds bindings)))] ++
-					-- The new binding itself
-		  extra_binds ++	-- Note [extra_fvs (1,2)]
-		  shared_binds		-- Used in more than one place
+                                        -- The new binding itself
+                  extra_binds ++        -- Note [extra_fvs (1,2)]
+                  shared_binds          -- Used in more than one place
 
     rhs_fvs' = unionVarSets rhss_fvs `unionVarSet`
-	       unionVarSets (map floatedBindsFVs rhss_binds) `unionVarSet`
-	       rule_fvs		-- Don't forget the rule variables!
+               unionVarSets (map floatedBindsFVs rhss_binds) `unionVarSet`
+               rule_fvs         -- Don't forget the rule variables!
 
     -- Push rhs_binds into the right hand side of the binding
-    fi_bind :: [FloatInBinds]	    -- one per "drop pt" conjured w/ fvs_of_rhss
-	    -> [(Id, CoreExprWithFVs)]
-	    -> [(Id, CoreExpr)]
+    fi_bind :: [FloatInBinds]       -- one per "drop pt" conjured w/ fvs_of_rhss
+            -> [(Id, CoreExprWithFVs)]
+            -> [(Id, CoreExpr)]
 
     fi_bind to_drops pairs
       = [ (binder, fiExpr dflags to_drop rhs) 
-	| ((binder, rhs), to_drop) <- zipEqual "fi_bind" pairs to_drops ]
+        | ((binder, rhs), to_drop) <- zipEqual "fi_bind" pairs to_drops ]
 \end{code}
 
 For @Case@, the possible ``drop points'' for the \tr{to_drop}
@@ -378,21 +372,21 @@ fiExpr dflags to_drop (_, AnnCase scrut case_bndr ty alts)
   = wrapFloats drop_here1 $
     wrapFloats drop_here2 $
     Case (fiExpr dflags scrut_drops scrut) case_bndr ty
-	 (zipWith fi_alt alts_drops_s alts)
+         (zipWith fi_alt alts_drops_s alts)
   where
-	-- Float into the scrut and alts-considered-together just like App
+        -- Float into the scrut and alts-considered-together just like App
     [drop_here1, scrut_drops, alts_drops] 
        = sepBindsByDropPoint dflags False [scrut_fvs, all_alts_fvs] to_drop
 
-	-- Float into the alts with the is_case flag set
+        -- Float into the alts with the is_case flag set
     (drop_here2 : alts_drops_s) = sepBindsByDropPoint dflags True alts_fvs alts_drops
 
     scrut_fvs    = freeVarsOf scrut
     alts_fvs     = map alt_fvs alts
     all_alts_fvs = unionVarSets alts_fvs
     alt_fvs (_con, args, rhs) = foldl delVarSet (freeVarsOf rhs) (case_bndr:args)
-				-- Delete case_bndr and args from free vars of rhs 
-				-- to get free vars of alt
+                                -- Delete case_bndr and args from free vars of rhs 
+                                -- to get free vars of alt
 
     fi_alt to_drop (con, args, rhs) = (con, args, fiExpr dflags to_drop rhs)
 
@@ -408,25 +402,25 @@ noFloatIntoRhs (AnnLam bndr e)
      -- NB: Must line up with fiExpr (AnnLam...); see Trac #7088
    where
      (bndrs, _) = collectAnnBndrs e
-	-- IMPORTANT: don't say 'True' for a RHS with a one-shot lambda at the top.
-	-- This makes a big difference for things like
-	--	f x# = let x = I# x#
-	--	       in let j = \() -> ...x...
-	--		  in if <condition> then normal-path else j ()
-	-- If x is used only in the error case join point, j, we must float the
-	-- boxing constructor into it, else we box it every time which is very bad
-	-- news indeed.
-
-noFloatIntoRhs rhs = exprIsExpandable (deAnnotate' rhs)	
+        -- IMPORTANT: don't say 'True' for a RHS with a one-shot lambda at the top.
+        -- This makes a big difference for things like
+        --      f x# = let x = I# x#
+        --             in let j = \() -> ...x...
+        --                in if <condition> then normal-path else j ()
+        -- If x is used only in the error case join point, j, we must float the
+        -- boxing constructor into it, else we box it every time which is very bad
+        -- news indeed.
+
+noFloatIntoRhs rhs = exprIsExpandable (deAnnotate' rhs) 
        -- We'd just float right back out again...
        -- Should match the test in SimplEnv.doFloatFromRhs
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{@sepBindsByDropPoint@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 This is the crucial function.  The idea is: We have a wad of bindings
@@ -448,11 +442,11 @@ We have to maintain the order on these drop-point-related lists.
 sepBindsByDropPoint
     :: DynFlags
     -> Bool             -- True <=> is case expression
-    -> [FreeVarSet]	    -- One set of FVs per drop point
-    -> FloatInBinds 	    -- Candidate floaters
+    -> [FreeVarSet]         -- One set of FVs per drop point
+    -> FloatInBinds         -- Candidate floaters
     -> [FloatInBinds]      -- FIRST one is bindings which must not be floated
-			    -- inside any drop point; the rest correspond
-			    -- one-to-one with the input list of FV sets
+                            -- inside any drop point; the rest correspond
+                            -- one-to-one with the input list of FV sets
 
 -- Every input floater is returned somewhere in the result;
 -- none are dropped, not even ones which don't seem to be
@@ -463,56 +457,56 @@ sepBindsByDropPoint
 type DropBox = (FreeVarSet, FloatInBinds)
 
 sepBindsByDropPoint _ _is_case drop_pts []
-  = [] : [[] | _ <- drop_pts]	-- cut to the chase scene; it happens
+  = [] : [[] | _ <- drop_pts]   -- cut to the chase scene; it happens
 
 sepBindsByDropPoint dflags is_case drop_pts floaters
   = go floaters (map (\fvs -> (fvs, [])) (emptyVarSet : drop_pts))
   where
     go :: FloatInBinds -> [DropBox] -> [FloatInBinds]
-	-- The *first* one in the argument list is the drop_here set
-	-- The FloatInBinds in the lists are in the reverse of
-	-- the normal FloatInBinds order; that is, they are the right way round!
+        -- The *first* one in the argument list is the drop_here set
+        -- The FloatInBinds in the lists are in the reverse of
+        -- the normal FloatInBinds order; that is, they are the right way round!
 
     go [] drop_boxes = map (reverse . snd) drop_boxes
 
     go (bind_w_fvs@(FB bndrs bind_fvs bind) : binds) drop_boxes@(here_box : fork_boxes)
-	= go binds new_boxes
-	where
-	  -- "here" means the group of bindings dropped at the top of the fork
+        = go binds new_boxes
+        where
+          -- "here" means the group of bindings dropped at the top of the fork
 
-	  (used_here : used_in_flags) = [ fvs `intersectsVarSet` bndrs
-					| (fvs, _) <- drop_boxes]
+          (used_here : used_in_flags) = [ fvs `intersectsVarSet` bndrs
+                                        | (fvs, _) <- drop_boxes]
 
-	  drop_here = used_here || not can_push
+          drop_here = used_here || not can_push
 
-		-- For case expressions we duplicate the binding if it is
-		-- reasonably small, and if it is not used in all the RHSs
-		-- This is good for situations like
-		--	let x = I# y in
-		--	case e of
-		--	  C -> error x
-		-- 	  D -> error x
-		--	  E -> ...not mentioning x...
+                -- For case expressions we duplicate the binding if it is
+                -- reasonably small, and if it is not used in all the RHSs
+                -- This is good for situations like
+                --      let x = I# y in
+                --      case e of
+                --        C -> error x
+                --        D -> error x
+                --        E -> ...not mentioning x...
 
-	  n_alts      = length used_in_flags
-	  n_used_alts = count id used_in_flags -- returns number of Trues in list.
+          n_alts      = length used_in_flags
+          n_used_alts = count id used_in_flags -- returns number of Trues in list.
 
-	  can_push = n_used_alts == 1		-- Used in just one branch
-		   || (is_case && 		-- We are looking at case alternatives
-		       n_used_alts > 1 && 	-- It's used in more than one
-		       n_used_alts < n_alts &&	-- ...but not all
-		       floatIsDupable dflags bind) -- and we can duplicate the binding
+          can_push = n_used_alts == 1           -- Used in just one branch
+                   || (is_case &&               -- We are looking at case alternatives
+                       n_used_alts > 1 &&       -- It's used in more than one
+                       n_used_alts < n_alts &&  -- ...but not all
+                       floatIsDupable dflags bind) -- and we can duplicate the binding
 
-	  new_boxes | drop_here = (insert here_box : fork_boxes)
-		    | otherwise = (here_box : new_fork_boxes)
+          new_boxes | drop_here = (insert here_box : fork_boxes)
+                    | otherwise = (here_box : new_fork_boxes)
 
-	  new_fork_boxes = zipWithEqual "FloatIn.sepBinds" insert_maybe fork_boxes used_in_flags
+          new_fork_boxes = zipWithEqual "FloatIn.sepBinds" insert_maybe fork_boxes used_in_flags
 
-	  insert :: DropBox -> DropBox
-	  insert (fvs,drops) = (fvs `unionVarSet` bind_fvs, bind_w_fvs:drops)
+          insert :: DropBox -> DropBox
+          insert (fvs,drops) = (fvs `unionVarSet` bind_fvs, bind_w_fvs:drops)
 
-	  insert_maybe box True  = insert box
-	  insert_maybe box False = box
+          insert_maybe box True  = insert box
+          insert_maybe box False = box
 
     go _ _ = panic "sepBindsByDropPoint/go"
 
diff --git a/compiler/simplCore/FloatOut.lhs b/compiler/simplCore/FloatOut.lhs
index e0c39bf..109fa53 100644
--- a/compiler/simplCore/FloatOut.lhs
+++ b/compiler/simplCore/FloatOut.lhs
@@ -7,25 +7,19 @@
 
 \begin{code}
 {-# OPTIONS_GHC -fno-warn-orphans #-}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module FloatOut ( floatOutwards ) where
 
 import CoreSyn
 import CoreUtils
 import MkCore
-import CoreArity	( etaExpand )
-import CoreMonad	( FloatOutSwitches(..) )
+import CoreArity        ( etaExpand )
+import CoreMonad        ( FloatOutSwitches(..) )
 
 import DynFlags
-import ErrUtils		( dumpIfSet_dyn )
-import Id		( Id, idArity, isBottomingId )
-import Var		( Var )
+import ErrUtils         ( dumpIfSet_dyn )
+import Id               ( Id, idArity, isBottomingId )
+import Var              ( Var )
 import SetLevels
 import UniqSupply       ( UniqSupply )
 import Bag
@@ -38,33 +32,33 @@ import qualified Data.IntMap as M
 #include "HsVersions.h"
 \end{code}
 
-	-----------------
-	Overall game plan
-	-----------------
+        -----------------
+        Overall game plan
+        -----------------
 
 The Big Main Idea is:
 
-  	To float out sub-expressions that can thereby get outside
-	a non-one-shot value lambda, and hence may be shared.
+        To float out sub-expressions that can thereby get outside
+        a non-one-shot value lambda, and hence may be shared.
 
 
 To achieve this we may need to do two thing:
 
    a) Let-bind the sub-expression:
 
-	f (g x)  ==>  let lvl = f (g x) in lvl
+        f (g x)  ==>  let lvl = f (g x) in lvl
 
       Now we can float the binding for 'lvl'.  
 
    b) More than that, we may need to abstract wrt a type variable
 
-	\x -> ... /\a -> let v = ...a... in ....
+        \x -> ... /\a -> let v = ...a... in ....
 
       Here the binding for v mentions 'a' but not 'x'.  So we
       abstract wrt 'a', to give this binding for 'v':
 
-	    vp = /\a -> ...a...
-	    v  = vp a
+            vp = /\a -> ...a...
+            v  = vp a
 
       Now the binding for vp can float out unimpeded.
       I can't remember why this case seemed important enough to
@@ -85,9 +79,9 @@ At the moment we never float a binding out to between two adjacent
 lambdas.  For example:
 
 @
-	\x y -> let t = x+x in ...
+        \x y -> let t = x+x in ...
 ===>
-	\x -> let t = x+x in \y -> ...
+        \x -> let t = x+x in \y -> ...
 @
 Reason: this is less efficient in the case where the original lambda
 is never partially applied.
@@ -97,49 +91,49 @@ But there's a case I've seen where this might not be true.  Consider:
 elEm2 x ys
   = elem' x ys
   where
-    elem' _ []	= False
-    elem' x (y:ys)	= x==y || elem' x ys
+    elem' _ []  = False
+    elem' x (y:ys)      = x==y || elem' x ys
 @
 It turns out that this generates a subexpression of the form
 @
-	\deq x ys -> let eq = eqFromEqDict deq in ...
+        \deq x ys -> let eq = eqFromEqDict deq in ...
 @
 vwhich might usefully be separated to
 @
-	\deq -> let eq = eqFromEqDict deq in \xy -> ...
+        \deq -> let eq = eqFromEqDict deq in \xy -> ...
 @
 Well, maybe.  We don't do this at the moment.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[floatOutwards]{@floatOutwards@: let-floating interface function}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 floatOutwards :: FloatOutSwitches
-	      -> DynFlags
-	      -> UniqSupply 
-	      -> CoreProgram -> IO CoreProgram
+              -> DynFlags
+              -> UniqSupply 
+              -> CoreProgram -> IO CoreProgram
 
 floatOutwards float_sws dflags us pgm
   = do {
-	let { annotated_w_levels = setLevels float_sws pgm us ;
-	      (fss, binds_s')    = unzip (map floatTopBind annotated_w_levels)
-	    } ;
+        let { annotated_w_levels = setLevels float_sws pgm us ;
+              (fss, binds_s')    = unzip (map floatTopBind annotated_w_levels)
+            } ;
 
-	dumpIfSet_dyn dflags Opt_D_verbose_core2core "Levels added:"
-	          (vcat (map ppr annotated_w_levels));
+        dumpIfSet_dyn dflags Opt_D_verbose_core2core "Levels added:"
+                  (vcat (map ppr annotated_w_levels));
 
-	let { (tlets, ntlets, lams) = get_stats (sum_stats fss) };
+        let { (tlets, ntlets, lams) = get_stats (sum_stats fss) };
 
-	dumpIfSet_dyn dflags Opt_D_dump_simpl_stats "FloatOut stats:"
-		(hcat [	int tlets,  ptext (sLit " Lets floated to top level; "),
-			int ntlets, ptext (sLit " Lets floated elsewhere; from "),
-			int lams,   ptext (sLit " Lambda groups")]);
+        dumpIfSet_dyn dflags Opt_D_dump_simpl_stats "FloatOut stats:"
+                (hcat [ int tlets,  ptext (sLit " Lets floated to top level; "),
+                        int ntlets, ptext (sLit " Lets floated elsewhere; from "),
+                        int lams,   ptext (sLit " Lambda groups")]);
 
-	return (bagToList (unionManyBags binds_s'))
+        return (bagToList (unionManyBags binds_s'))
     }
 
 floatTopBind :: LevelledBind -> (FloatStats, Bag CoreBind)
@@ -152,9 +146,9 @@ floatTopBind bind
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[FloatOut-Bind]{Floating in a binding (the business end)}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -162,10 +156,10 @@ floatBind :: LevelledBind -> (FloatStats, FloatBinds, CoreBind)
 floatBind (NonRec (TB var _) rhs)
   = case (floatExpr rhs) of { (fs, rhs_floats, rhs') ->
 
-	-- A tiresome hack: 
-	-- see Note [Bottoming floats: eta expansion] in SetLevels
+        -- A tiresome hack: 
+        -- see Note [Bottoming floats: eta expansion] in SetLevels
     let rhs'' | isBottomingId var = etaExpand (idArity var) rhs'
-	      | otherwise         = rhs'
+              | otherwise         = rhs'
 
     in (fs, rhs_floats, NonRec var rhs'') }
 
@@ -177,7 +171,7 @@ floatBind (Rec pairs)
       | isTopLvl dest_lvl  -- See Note [floatBind for top level]
       = case (floatExpr rhs) of { (fs, rhs_floats, rhs') ->
         (fs, emptyFloats, addTopFloatPairs (flattenTopFloats rhs_floats) [(name, rhs')])}
-      | otherwise	  -- Note [Floating out of Rec rhss]
+      | otherwise         -- Note [Floating out of Rec rhss]
       = case (floatExpr rhs) of { (fs, rhs_floats, rhs') ->
         case (partitionByLevel dest_lvl rhs_floats) of { (rhs_floats', heres) ->
         case (splitRecFloats heres) of { (pairs, case_heres) ->
@@ -207,9 +201,9 @@ installUnderLambdas floats e
 ---------------
 floatList :: (a -> (FloatStats, FloatBinds, b)) -> [a] -> (FloatStats, FloatBinds, [b])
 floatList _ [] = (zeroStats, emptyFloats, [])
-floatList f (a:as) = case f a		 of { (fs_a,  binds_a,  b)  ->
-		     case floatList f as of { (fs_as, binds_as, bs) ->
-		     (fs_a `add_stats` fs_as, binds_a `plusFloats`  binds_as, b:bs) }}
+floatList f (a:as) = case f a            of { (fs_a,  binds_a,  b)  ->
+                     case floatList f as of { (fs_as, binds_as, bs) ->
+                     (fs_a `add_stats` fs_as, binds_a `plusFloats`  binds_as, b:bs) }}
 \end{code}
 
 Note [Floating out of Rec rhss]
@@ -247,28 +241,28 @@ but this case works just as well.
 %************************************************************************
 
 \subsection[FloatOut-Expr]{Floating in expressions}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 floatBody :: Level
           -> LevelledExpr
-	  -> (FloatStats, FloatBinds, CoreExpr)
+          -> (FloatStats, FloatBinds, CoreExpr)
 
-floatBody lvl arg	-- Used rec rhss, and case-alternative rhss
+floatBody lvl arg       -- Used rec rhss, and case-alternative rhss
   = case (floatExpr arg) of { (fsa, floats, arg') ->
     case (partitionByLevel lvl floats) of { (floats', heres) ->
-	-- Dump bindings are bound here
+        -- Dump bindings are bound here
     (fsa, floats', install heres arg') }}
 
 -----------------
 floatExpr :: LevelledExpr
-	  -> (FloatStats, FloatBinds, CoreExpr)
+          -> (FloatStats, FloatBinds, CoreExpr)
 floatExpr (Var v)   = (zeroStats, emptyFloats, Var v)
 floatExpr (Type ty) = (zeroStats, emptyFloats, Type ty)
 floatExpr (Coercion co) = (zeroStats, emptyFloats, Coercion co)
 floatExpr (Lit lit) = (zeroStats, emptyFloats, Lit lit)
-	  
+          
 floatExpr (App e a)
   = case (floatExpr  e) of { (fse, floats_e, e') ->
     case (floatExpr  a) of { (fsa, floats_a, a') ->
@@ -276,10 +270,10 @@ floatExpr (App e a)
 
 floatExpr lam@(Lam (TB _ lam_spec) _)
   = let (bndrs_w_lvls, body) = collectBinders lam
-	bndrs		     = [b | TB b _ <- bndrs_w_lvls]
+        bndrs                = [b | TB b _ <- bndrs_w_lvls]
         bndr_lvl             = floatSpecLevel lam_spec
-	-- All the binders have the same level
-	-- See SetLevels.lvlLamBndrs
+        -- All the binders have the same level
+        -- See SetLevels.lvlLamBndrs
     in
     case (floatBody bndr_lvl body) of { (fs, floats, body') ->
     (add_to_stats fs floats, floats, mkLams bndrs body') }
@@ -288,8 +282,8 @@ floatExpr (Tick tickish expr)
   | tickishScoped tickish
   = case (floatExpr expr)    of { (fs, floating_defns, expr') ->
     let
-	-- Annotate bindings floated outwards past an scc expression
-	-- with the cc.  We mark that cc as "duplicated", though.
+        -- Annotate bindings floated outwards past an scc expression
+        -- with the cc.  We mark that cc as "duplicated", though.
         annotated_defns = wrapTick (mkNoTick tickish) floating_defns
     in
     (fs, annotated_defns, Tick tickish expr') }
@@ -306,22 +300,22 @@ floatExpr (Let bind body)
   = case bind_spec of
       FloatMe dest_lvl 
         -> case (floatBind bind) of { (fsb, bind_floats, bind') ->
-    	   case (floatExpr body) of { (fse, body_floats, body') ->
-    	   ( add_stats fsb fse 
-    	   , bind_floats `plusFloats` unitLetFloat dest_lvl bind' 
+           case (floatExpr body) of { (fse, body_floats, body') ->
+           ( add_stats fsb fse 
+           , bind_floats `plusFloats` unitLetFloat dest_lvl bind' 
                          `plusFloats` body_floats
-    	   , body') }}
+           , body') }}
 
       StayPut bind_lvl  -- See Note [Avoiding unnecessary floating]
         -> case (floatBind bind)          of { (fsb, bind_floats, bind') ->
-    	   case (floatBody bind_lvl body) of { (fse, body_floats, body') ->
-    	   ( add_stats fsb fse
-    	   , bind_floats `plusFloats` body_floats
-    	   , Let bind' body') }}
+           case (floatBody bind_lvl body) of { (fse, body_floats, body') ->
+           ( add_stats fsb fse
+           , bind_floats `plusFloats` body_floats
+           , Let bind' body') }}
   where
     bind_spec = case bind of 
-    	         NonRec (TB _ s) _     -> s
-		 Rec ((TB _ s, _) : _) -> s
+                 NonRec (TB _ s) _     -> s
+                 Rec ((TB _ s, _) : _) -> s
                  Rec []                -> panic "floatExpr:rec"
 
 floatExpr (Case scrut (TB case_bndr case_spec) ty alts)
@@ -329,24 +323,24 @@ floatExpr (Case scrut (TB case_bndr case_spec) ty alts)
       FloatMe dest_lvl  -- Case expression moves  
         | [(con@(DataAlt {}), bndrs, rhs)] <- alts
         -> case floatExpr scrut of { (fse, fde, scrut') ->
-    	   case floatExpr rhs   of { (fsb, fdb, rhs') ->
-    	   let 
-    	     float = unitCaseFloat dest_lvl scrut' 
+           case floatExpr rhs   of { (fsb, fdb, rhs') ->
+           let 
+             float = unitCaseFloat dest_lvl scrut' 
                           case_bndr con [b | TB b _ <- bndrs]
-    	   in
-    	   (add_stats fse fsb, fde `plusFloats` float `plusFloats` fdb, rhs') }}
+           in
+           (add_stats fse fsb, fde `plusFloats` float `plusFloats` fdb, rhs') }}
         | otherwise
         -> pprPanic "Floating multi-case" (ppr alts)
 
       StayPut bind_lvl  -- Case expression stays put
-    	-> case floatExpr scrut of { (fse, fde, scrut') ->
-    	   case floatList (float_alt bind_lvl) alts of { (fsa, fda, alts')  ->
-    	   (add_stats fse fsa, fda `plusFloats` fde, Case scrut' case_bndr ty alts')
-    	   }}
+        -> case floatExpr scrut of { (fse, fde, scrut') ->
+           case floatList (float_alt bind_lvl) alts of { (fsa, fda, alts')  ->
+           (add_stats fse fsa, fda `plusFloats` fde, Case scrut' case_bndr ty alts')
+           }}
   where
     float_alt bind_lvl (con, bs, rhs)
-	= case (floatBody bind_lvl rhs)	of { (fs, rhs_floats, rhs') ->
-	  (fs, rhs_floats, (con, [b | TB b _ <- bs], rhs')) }
+        = case (floatBody bind_lvl rhs) of { (fs, rhs_floats, rhs') ->
+          (fs, rhs_floats, (con, [b | TB b _ <- bs], rhs')) }
 \end{code}
 
 Note [Avoiding unnecessary floating]
@@ -373,25 +367,25 @@ We used instead to do the partitionByMajorLevel on the RHS of an '=',
 in floatRhs.  But that was quite tiresome.  We needed to test for
 values or trival rhss, because (in particular) we don't want to insert
 new bindings between the "=" and the "\".  E.g.
-	f = \x -> let <bind> in <body>
+        f = \x -> let <bind> in <body>
 We do not want
-	f = let <bind> in \x -> <body>
+        f = let <bind> in \x -> <body>
 (a) The simplifier will immediately float it further out, so we may
-	as well do so right now; in general, keeping rhss as manifest 
-	values is good
+        as well do so right now; in general, keeping rhss as manifest 
+        values is good
 (b) If a float-in pass follows immediately, it might add yet more
-	bindings just after the '='.  And some of them might (correctly)
-	be strict even though the 'let f' is lazy, because f, being a value,
-	gets its demand-info zapped by the simplifier.
+        bindings just after the '='.  And some of them might (correctly)
+        be strict even though the 'let f' is lazy, because f, being a value,
+        gets its demand-info zapped by the simplifier.
 And even all that turned out to be very fragile, and broke
 altogether when profiling got in the way.
 
 So now we do the partition right at the (Let..) itself.
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Utility bits for floating stats}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 I didn't implement this with unboxed numbers.  I don't want to be too
@@ -399,9 +393,9 @@ strict in this stuff, as it is rarely turned on.  (WDP 95/09)
 
 \begin{code}
 data FloatStats
-  = FlS	Int  -- Number of top-floats * lambda groups they've been past
-	Int  -- Number of non-top-floats * lambda groups they've been past
-	Int  -- Number of lambda (groups) seen
+  = FlS Int  -- Number of top-floats * lambda groups they've been past
+        Int  -- Number of non-top-floats * lambda groups they've been past
+        Int  -- Number of lambda (groups) seen
 
 get_stats :: FloatStats -> (Int, Int, Int)
 get_stats (FlS a b c) = (a, b, c)
@@ -423,9 +417,9 @@ add_to_stats (FlS a b c) (FB tops others)
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Utility bits for floating}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [Representation of FloatBinds]
@@ -449,12 +443,12 @@ partitionByMajorLevel.
 
 
 \begin{code}
-type FloatLet = CoreBind	-- INVARIANT: a FloatLet is always lifted
-type MajorEnv = M.IntMap MinorEnv	  -- Keyed by major level
+type FloatLet = CoreBind        -- INVARIANT: a FloatLet is always lifted
+type MajorEnv = M.IntMap MinorEnv         -- Keyed by major level
 type MinorEnv = M.IntMap (Bag FloatBind)  -- Keyed by minor level
 
-data FloatBinds  = FB !(Bag FloatLet)	   	-- Destined for top level
-     		      !MajorEnv 		-- Levels other than top
+data FloatBinds  = FB !(Bag FloatLet)           -- Destined for top level
+                      !MajorEnv                 -- Levels other than top
      -- See Note [Representation of FloatBinds]
 
 instance Outputable FloatBind where
@@ -515,19 +509,19 @@ install defn_groups expr
   = foldrBag wrapFloat expr defn_groups
 
 partitionByLevel
-	:: Level		-- Partitioning level
-	-> FloatBinds   	-- Defns to be divided into 2 piles...
-	-> (FloatBinds,		-- Defns  with level strictly < partition level,
-	    Bag FloatBind)	-- The rest
+        :: Level                -- Partitioning level
+        -> FloatBinds           -- Defns to be divided into 2 piles...
+        -> (FloatBinds,         -- Defns  with level strictly < partition level,
+            Bag FloatBind)      -- The rest
 
 {-
--- 	 ---- partitionByMajorLevel ----
+--       ---- partitionByMajorLevel ----
 -- Float it if we escape a value lambda, 
 --     *or* if we get to the top level
 --     *or* if it's a case-float and its minor level is < current
 -- 
 -- If we can get to the top level, say "yes" anyway. This means that 
---	x = f e
+--      x = f e
 -- transforms to 
 --    lvl = e
 --    x = f lvl
diff --git a/compiler/simplCore/LiberateCase.lhs b/compiler/simplCore/LiberateCase.lhs
index a89396b..f9aca77 100644
--- a/compiler/simplCore/LiberateCase.lhs
+++ b/compiler/simplCore/LiberateCase.lhs
@@ -4,12 +4,6 @@
 \section[LiberateCase]{Unroll recursion to allow evals to be lifted from a loop}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module LiberateCase ( liberateCase ) where
 
@@ -17,7 +11,7 @@ module LiberateCase ( liberateCase ) where
 
 import DynFlags
 import CoreSyn
-import CoreUnfold	( couldBeSmallEnoughToInline )
+import CoreUnfold       ( couldBeSmallEnoughToInline )
 import Id
 import VarEnv
 import Util             ( notNull )
@@ -27,29 +21,29 @@ The liberate-case transformation
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 This module walks over @Core@, and looks for @case@ on free variables.
 The criterion is:
-	if there is case on a free on the route to the recursive call,
-	then the recursive call is replaced with an unfolding.
+        if there is case on a free on the route to the recursive call,
+        then the recursive call is replaced with an unfolding.
 
 Example
 
    f = \ t -> case v of
-	         V a b -> a : f t
+                 V a b -> a : f t
 
 => the inner f is replaced.
 
    f = \ t -> case v of
-	         V a b -> a : (letrec
-				f =  \ t -> case v of
-					       V a b -> a : f t
-			       in f) t
+                 V a b -> a : (letrec
+                                f =  \ t -> case v of
+                                               V a b -> a : f t
+                               in f) t
 (note the NEED for shadowing)
 
 => Simplify
 
   f = \ t -> case v of
-	         V a b -> a : (letrec
-				f = \ t -> a : f t
-			       in f t)
+                 V a b -> a : (letrec
+                                f = \ t -> a : f t
+                               in f t)
 
 Better code, because 'a' is  free inside the inner letrec, rather
 than needing projection from v.
@@ -57,16 +51,16 @@ than needing projection from v.
 Note that this deals with *free variables*.  SpecConstr deals with
 *arguments* that are of known form.  E.g.
 
-	last []     = error 
-	last (x:[]) = x
-	last (x:xs) = last xs
+        last []     = error 
+        last (x:[]) = x
+        last (x:xs) = last xs
 
-	
+        
 Note [Scrutinee with cast]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider this:
     f = \ t -> case (v `cast` co) of
-	         V a b -> a : f t
+                 V a b -> a : f t
 
 Exactly the same optimisation (unrolling one call to f) will work here, 
 despite the cast.  See mk_alt_env in the Case branch of libCase.
@@ -108,19 +102,19 @@ recursive defns lexically enclose the binding
 A recursive defn "encloses" its RHS, not its
 scope.  For example:
 \begin{verbatim}
-	letrec f = let g = ... in ...
-	in
-	let h = ...
-	in ...
+        letrec f = let g = ... in ...
+        in
+        let h = ...
+        in ...
 \end{verbatim}
 Here, the level of @f@ is zero, the level of @g@ is one,
 and the level of @h@ is zero (NB not one).
 
 
 %************************************************************************
-%*									*
-	 Top-level code
-%*									*
+%*                                                                      *
+         Top-level code
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -129,15 +123,15 @@ liberateCase dflags binds = do_prog (initEnv dflags) binds
   where
     do_prog _   [] = []
     do_prog env (bind:binds) = bind' : do_prog env' binds
-			     where
-			       (env', bind') = libCaseBind env bind
+                             where
+                               (env', bind') = libCaseBind env bind
 \end{code}
 
 
 %************************************************************************
-%*									*
-	 Main payload
-%*									*
+%*                                                                      *
+         Main payload
+%*                                                                      *
 %************************************************************************
 
 Bindings
@@ -157,18 +151,18 @@ libCaseBind env (Rec pairs)
 
     pairs' = [(binder, libCase env_rhs rhs) | (binder,rhs) <- pairs]
 
-	-- We extend the rec-env by binding each Id to its rhs, first
-	-- processing the rhs with an *un-extended* environment, so
-	-- that the same process doesn't occur for ever!
+        -- We extend the rec-env by binding each Id to its rhs, first
+        -- processing the rhs with an *un-extended* environment, so
+        -- that the same process doesn't occur for ever!
     env_rhs = addRecBinds env [ (localiseId binder, libCase env_body rhs)
-			      | (binder, rhs) <- pairs
- 			      , rhs_small_enough binder rhs ]
-	-- localiseID : see Note [Need to localiseId in libCaseBind]
-		 
-
-    rhs_small_enough id rhs	-- Note [Small enough]
-	=  idArity id > 0	-- Note [Only functions!]
-	&& maybe True (\size -> couldBeSmallEnoughToInline (lc_dflags env) size rhs)
+                              | (binder, rhs) <- pairs
+                              , rhs_small_enough binder rhs ]
+        -- localiseID : see Note [Need to localiseId in libCaseBind]
+                 
+
+    rhs_small_enough id rhs     -- Note [Small enough]
+        =  idArity id > 0       -- Note [Only functions!]
+        && maybe True (\size -> couldBeSmallEnoughToInline (lc_dflags env) size rhs)
                       (bombOutSize env)
 \end{code}
 
@@ -176,21 +170,21 @@ Note [Need to localiseId in libCaseBind]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The call to localiseId is needed for two subtle reasons
 (a)  Reset the export flags on the binders so
-	that we don't get name clashes on exported things if the 
-	local binding floats out to top level.  This is most unlikely
-	to happen, since the whole point concerns free variables. 
-	But resetting the export flag is right regardless.
+        that we don't get name clashes on exported things if the 
+        local binding floats out to top level.  This is most unlikely
+        to happen, since the whole point concerns free variables. 
+        But resetting the export flag is right regardless.
 
 (b)  Make the name an Internal one.  External Names should never be
-	nested; if it were floated to the top level, we'd get a name
-	clash at code generation time.
+        nested; if it were floated to the top level, we'd get a name
+        clash at code generation time.
 
 Note [Small enough]
 ~~~~~~~~~~~~~~~~~~~
 Consider
   \fv. letrec
-     	 f = \x. BIG...(case fv of { (a,b) -> ...g.. })...
-     	 g = \y. SMALL...f...
+         f = \x. BIG...(case fv of { (a,b) -> ...g.. })...
+         g = \y. SMALL...f...
 Then we *can* do liberate-case on g (small RHS) but not for f (too big).
 But we can choose on a item-by-item basis, and that's what the
 rhs_small_enough call in the comprehension for env_rhs does.
@@ -200,8 +194,8 @@ Expressions
 
 \begin{code}
 libCase :: LibCaseEnv
-	-> CoreExpr
-	-> CoreExpr
+        -> CoreExpr
+        -> CoreExpr
 
 libCase env (Var v)             = libCaseId env v
 libCase _   (Lit lit)           = Lit lit
@@ -224,8 +218,8 @@ libCase env (Case scrut bndr ty alts)
   where
     env_alts = addBinders (mk_alt_env scrut) [bndr]
     mk_alt_env (Var scrut_var) = addScrutedVar env scrut_var
-    mk_alt_env (Cast scrut _)  = mk_alt_env scrut	-- Note [Scrutinee with cast]
-    mk_alt_env _    	       = env
+    mk_alt_env (Cast scrut _)  = mk_alt_env scrut       -- Note [Scrutinee with cast]
+    mk_alt_env _               = env
 
 libCaseAlt :: LibCaseEnv -> (AltCon, [CoreBndr], CoreExpr)
                          -> (AltCon, [CoreBndr], CoreExpr)
@@ -238,8 +232,8 @@ Ids
 \begin{code}
 libCaseId :: LibCaseEnv -> Id -> CoreExpr
 libCaseId env v
-  | Just the_bind <- lookupRecId env v	-- It's a use of a recursive thing
-  , notNull free_scruts 		-- with free vars scrutinised in RHS
+  | Just the_bind <- lookupRecId env v  -- It's a use of a recursive thing
+  , notNull free_scruts                 -- with free vars scrutinised in RHS
   = Let the_bind (Var v)
 
   | otherwise
@@ -250,29 +244,29 @@ libCaseId env v
     free_scruts  = freeScruts env rec_id_level
 
 freeScruts :: LibCaseEnv
-	   -> LibCaseLevel 	-- Level of the recursive Id
-	   -> [Id]		-- Ids that are scrutinised between the binding
-				-- of the recursive Id and here
+           -> LibCaseLevel      -- Level of the recursive Id
+           -> [Id]              -- Ids that are scrutinised between the binding
+                                -- of the recursive Id and here
 freeScruts env rec_bind_lvl
   = [v | (v, scrut_bind_lvl, scrut_at_lvl) <- lc_scruts env
        , scrut_bind_lvl <= rec_bind_lvl
        , scrut_at_lvl > rec_bind_lvl]
-	-- Note [When to specialise]
-	-- Note [Avoiding fruitless liberate-case]
+        -- Note [When to specialise]
+        -- Note [Avoiding fruitless liberate-case]
 \end{code}
 
 Note [When to specialise]
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
   f = \x. letrec g = \y. case x of
-			   True  -> ... (f a) ...
-			   False -> ... (g b) ...
+                           True  -> ... (f a) ...
+                           False -> ... (g b) ...
 
 We get the following levels
-	  f  0
-	  x  1
-	  g  1
-	  y  2  
+          f  0
+          x  1
+          g  1
+          y  2  
 
 Then 'x' is being scrutinised at a deeper level than its binding, so
 it's added to lc_sruts:  [(x,1)]  
@@ -301,9 +295,9 @@ an occurrence of 'g', we want to check that there's a scruted-var v st
 
 
 %************************************************************************
-%*									*
-	Utility functions
-%*									*
+%*                                                                      *
+        Utility functions
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -315,7 +309,7 @@ addBinders env@(LibCaseEnv { lc_lvl = lvl, lc_lvl_env = lvl_env }) binders
 
 addRecBinds :: LibCaseEnv -> [(Id,CoreExpr)] -> LibCaseEnv
 addRecBinds env@(LibCaseEnv {lc_lvl = lvl, lc_lvl_env = lvl_env, 
-			     lc_rec_env = rec_env}) pairs
+                             lc_rec_env = rec_env}) pairs
   = env { lc_lvl = lvl', lc_lvl_env = lvl_env', lc_rec_env = rec_env' }
   where
     lvl'     = lvl + 1
@@ -323,22 +317,22 @@ addRecBinds env@(LibCaseEnv {lc_lvl = lvl, lc_lvl_env = lvl_env,
     rec_env' = extendVarEnvList rec_env [(binder, Rec pairs) | (binder,_) <- pairs]
 
 addScrutedVar :: LibCaseEnv
-	      -> Id		-- This Id is being scrutinised by a case expression
-	      -> LibCaseEnv
+              -> Id             -- This Id is being scrutinised by a case expression
+              -> LibCaseEnv
 
 addScrutedVar env@(LibCaseEnv { lc_lvl = lvl, lc_lvl_env = lvl_env, 
-				lc_scruts = scruts }) scrut_var
+                                lc_scruts = scruts }) scrut_var
   | bind_lvl < lvl
   = env { lc_scruts = scruts' }
-	-- Add to scruts iff the scrut_var is being scrutinised at
-	-- a deeper level than its defn
+        -- Add to scruts iff the scrut_var is being scrutinised at
+        -- a deeper level than its defn
 
   | otherwise = env
   where
     scruts'  = (scrut_var, bind_lvl, lvl) : scruts
     bind_lvl = case lookupVarEnv lvl_env scrut_var of
-		 Just lvl -> lvl
-		 Nothing  -> topLevel
+                 Just lvl -> lvl
+                 Nothing  -> topLevel
 
 lookupRecId :: LibCaseEnv -> Id -> Maybe CoreBind
 lookupRecId env id = lookupVarEnv (lc_rec_env env) id
@@ -351,9 +345,9 @@ lookupLevel env id
 \end{code}
 
 %************************************************************************
-%*									*
-	 The environment
-%*									*
+%*                                                                      *
+         The environment
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -368,46 +362,46 @@ data LibCaseEnv
   = LibCaseEnv {
         lc_dflags :: DynFlags,
 
-	lc_lvl :: LibCaseLevel,	-- Current level
-		-- The level is incremented when (and only when) going
-		-- inside the RHS of a (sufficiently small) recursive
-		-- function.
-
-	lc_lvl_env :: IdEnv LibCaseLevel,  
-		-- Binds all non-top-level in-scope Ids (top-level and
-		-- imported things have a level of zero)
-
-	lc_rec_env :: IdEnv CoreBind, 
-		-- Binds *only* recursively defined ids, to their own
-		-- binding group, and *only* in their own RHSs
-
-	lc_scruts :: [(Id, LibCaseLevel, LibCaseLevel)]
-     		-- Each of these Ids was scrutinised by an enclosing
-		-- case expression, at a level deeper than its binding
-		-- level.
-		-- 
- 		-- The first LibCaseLevel is the *binding level* of
- 		--   the scrutinised Id, 
-		-- The second is the level *at which it was scrutinised*.
-		--   (see Note [Avoiding fruitless liberate-case])
-		-- The former is a bit redundant, since you could always
-		-- look it up in lc_lvl_env, but it's just cached here
-		-- 
-		-- The order is insignificant; it's a bag really
-		-- 
-		-- There's one element per scrutinisation;
-		--    in principle the same Id may appear multiple times,
-		--    although that'd be unusual:
-		--       case x of { (a,b) -> ....(case x of ...) .. }
-	}
+        lc_lvl :: LibCaseLevel, -- Current level
+                -- The level is incremented when (and only when) going
+                -- inside the RHS of a (sufficiently small) recursive
+                -- function.
+
+        lc_lvl_env :: IdEnv LibCaseLevel,  
+                -- Binds all non-top-level in-scope Ids (top-level and
+                -- imported things have a level of zero)
+
+        lc_rec_env :: IdEnv CoreBind, 
+                -- Binds *only* recursively defined ids, to their own
+                -- binding group, and *only* in their own RHSs
+
+        lc_scruts :: [(Id, LibCaseLevel, LibCaseLevel)]
+                -- Each of these Ids was scrutinised by an enclosing
+                -- case expression, at a level deeper than its binding
+                -- level.
+                -- 
+                -- The first LibCaseLevel is the *binding level* of
+                --   the scrutinised Id, 
+                -- The second is the level *at which it was scrutinised*.
+                --   (see Note [Avoiding fruitless liberate-case])
+                -- The former is a bit redundant, since you could always
+                -- look it up in lc_lvl_env, but it's just cached here
+                -- 
+                -- The order is insignificant; it's a bag really
+                -- 
+                -- There's one element per scrutinisation;
+                --    in principle the same Id may appear multiple times,
+                --    although that'd be unusual:
+                --       case x of { (a,b) -> ....(case x of ...) .. }
+        }
 
 initEnv :: DynFlags -> LibCaseEnv
 initEnv dflags 
   = LibCaseEnv { lc_dflags = dflags,
-		 lc_lvl = 0,
-		 lc_lvl_env = emptyVarEnv, 
-		 lc_rec_env = emptyVarEnv,
-		 lc_scruts = [] }
+                 lc_lvl = 0,
+                 lc_lvl_env = emptyVarEnv, 
+                 lc_rec_env = emptyVarEnv,
+                 lc_scruts = [] }
 
 -- Bomb-out size for deciding if
 -- potential liberatees are too big.
diff --git a/compiler/simplCore/SAT.lhs b/compiler/simplCore/SAT.lhs
index bc1ce42..96b6ff0 100644
--- a/compiler/simplCore/SAT.lhs
+++ b/compiler/simplCore/SAT.lhs
@@ -49,12 +49,6 @@ essential to make this work well!
 
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 
 module SAT ( doStaticArgs ) where
@@ -111,7 +105,7 @@ satBind (Rec [(binder, rhs)]) interesting_ids = do
                         else sat_info_rhs'
     
     bind' <- saTransformMaybe binder (lookupUFM sat_info_rhs' binder) 
-			      rhs_binders rhs_body'
+                              rhs_binders rhs_body'
     return (bind', sat_info_rhs'')
 satBind (Rec pairs) interesting_ids = do
     let (binders, rhss) = unzip pairs
@@ -297,13 +291,13 @@ to
     map :: forall a b. (a->b) -> [a] -> [b]
     map = /\ab. \(f:a->b) (as:[a]) ->
          letrec map' :: [a] -> [b]
-		    -- The "worker function
+                    -- The "worker function
                 map' = \(as:[a]) -> 
-			 let map :: forall a' b'. (a -> b) -> [a] -> [b]
-				-- The "shadow function
-			     map = /\a'b'. \(f':(a->b) (as:[a]).
-				   map' as
-	                 in body[map]
+                         let map :: forall a' b'. (a -> b) -> [a] -> [b]
+                                -- The "shadow function
+                             map = /\a'b'. \(f':(a->b) (as:[a]).
+                                   map' as
+                         in body[map]
          in map' as
 
 Note [Shadow binding]
@@ -378,13 +372,13 @@ saTransformMaybe binder maybe_arg_staticness rhs_binders rhs_body
   where 
     should_transform staticness = n_static_args > 1 -- THIS IS THE DECISION POINT
       where
-	n_static_args = length (filter isStaticValue staticness)
+        n_static_args = length (filter isStaticValue staticness)
 
 saTransform :: Id -> SATInfo -> [Id] -> CoreExpr -> SatM CoreBind
 saTransform binder arg_staticness rhs_binders rhs_body
-  = do	{ shadow_lam_bndrs <- mapM clone binders_w_staticness
-	; uniq	 	   <- newUnique
-	; return (NonRec binder (mk_new_rhs uniq shadow_lam_bndrs)) }
+  = do  { shadow_lam_bndrs <- mapM clone binders_w_staticness
+        ; uniq             <- newUnique
+        ; return (NonRec binder (mk_new_rhs uniq shadow_lam_bndrs)) }
   where
     -- Running example: foldr
     -- foldr \alpha \beta c n xs = e, for some e
@@ -393,43 +387,43 @@ saTransform binder arg_staticness rhs_binders rhs_body
     -- rhs_body = e
     
     binders_w_staticness = rhs_binders `zip` (arg_staticness ++ repeat NotStatic)
-					-- Any extra args are assumed NotStatic
+                                        -- Any extra args are assumed NotStatic
 
     non_static_args :: [Var]
-	    -- non_static_args = [xs]
-	    -- rhs_binders_without_type_capture = [\alpha', \beta', c, n, xs]
+            -- non_static_args = [xs]
+            -- rhs_binders_without_type_capture = [\alpha', \beta', c, n, xs]
     non_static_args = [v | (v, NotStatic) <- binders_w_staticness]
 
     clone (bndr, NotStatic) = return bndr
     clone (bndr, _        ) = do { uniq <- newUnique
-				 ; return (setVarUnique bndr uniq) }
+                                 ; return (setVarUnique bndr uniq) }
 
     -- new_rhs = \alpha beta c n xs -> 
     --           let sat_worker = \xs -> let sat_shadow = \alpha' beta' c n xs -> 
-    -- 					     sat_worker xs 
+    --                                       sat_worker xs 
     --                                   in e
     --           in sat_worker xs
     mk_new_rhs uniq shadow_lam_bndrs 
-	= mkLams rhs_binders $ 
-	  Let (Rec [(rec_body_bndr, rec_body)]) 
-	  local_body
-	where
-	  local_body = mkVarApps (Var rec_body_bndr) non_static_args
+        = mkLams rhs_binders $ 
+          Let (Rec [(rec_body_bndr, rec_body)]) 
+          local_body
+        where
+          local_body = mkVarApps (Var rec_body_bndr) non_static_args
 
-	  rec_body = mkLams non_static_args $
+          rec_body = mkLams non_static_args $
                      Let (NonRec shadow_bndr shadow_rhs) rhs_body
 
-	    -- See Note [Binder type capture]
-	  shadow_rhs = mkLams shadow_lam_bndrs local_body
-	    -- nonrec_rhs = \alpha' beta' c n xs -> sat_worker xs
+            -- See Note [Binder type capture]
+          shadow_rhs = mkLams shadow_lam_bndrs local_body
+            -- nonrec_rhs = \alpha' beta' c n xs -> sat_worker xs
 
-	  rec_body_bndr = mkSysLocal (fsLit "sat_worker") uniq (exprType rec_body)
-	    -- rec_body_bndr = sat_worker
+          rec_body_bndr = mkSysLocal (fsLit "sat_worker") uniq (exprType rec_body)
+            -- rec_body_bndr = sat_worker
     
-	    -- See Note [Shadow binding]; make a SysLocal
-	  shadow_bndr = mkSysLocal (occNameFS (getOccName binder)) 
-				   (idUnique binder)
-				   (exprType shadow_rhs)
+            -- See Note [Shadow binding]; make a SysLocal
+          shadow_bndr = mkSysLocal (occNameFS (getOccName binder)) 
+                                   (idUnique binder)
+                                   (exprType shadow_rhs)
 
 isStaticValue :: Staticness App -> Bool
 isStaticValue (Static (VarApp _)) = True
diff --git a/compiler/simplCore/SetLevels.lhs b/compiler/simplCore/SetLevels.lhs
index 2fca56c..eb5e0fe 100644
--- a/compiler/simplCore/SetLevels.lhs
+++ b/compiler/simplCore/SetLevels.lhs
@@ -3,9 +3,9 @@
 %
 \section{SetLevels}
 
-		***************************
-			Overview
-		***************************
+                ***************************
+                        Overview
+                ***************************
 
 1. We attach binding levels to Core bindings, in preparation for floating
    outwards (@FloatOut@).
@@ -19,20 +19,20 @@
    that may not be true.)
 
    NOTE: this can't be done using the uniqAway idea, because the variable
- 	 must be unique in the whole program, not just its current scope,
-	 because two variables in different scopes may float out to the
-	 same top level place
+         must be unique in the whole program, not just its current scope,
+         because two variables in different scopes may float out to the
+         same top level place
 
    NOTE: Very tiresomely, we must apply this substitution to
-	 the rules stored inside a variable too.
+         the rules stored inside a variable too.
 
    We do *not* clone top-level bindings, because some of them must not change,
    but we *do* clone bindings that are heading for the top level
 
 4. In the expression
-	case x of wild { p -> ...wild... }
+        case x of wild { p -> ...wild... }
    we substitute x for wild in the RHS of the case alternatives:
-	case x of wild { p -> ...x... }
+        case x of wild { p -> ...x... }
    This means that a sub-expression involving x is not "trapped" inside the RHS.
    And it's not inconvenient because we already have a substitution.
 
@@ -42,33 +42,27 @@
   the scrutinee of the case, and we can inline it.  
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module SetLevels (
-	setLevels, 
+        setLevels, 
 
-	Level(..), tOP_LEVEL,
-	LevelledBind, LevelledExpr, LevelledBndr,
-	FloatSpec(..), floatSpecLevel,
+        Level(..), tOP_LEVEL,
+        LevelledBind, LevelledExpr, LevelledBndr,
+        FloatSpec(..), floatSpecLevel,
 
-	incMinorLvl, ltMajLvl, ltLvl, isTopLvl
+        incMinorLvl, ltMajLvl, ltLvl, isTopLvl
     ) where
 
 #include "HsVersions.h"
 
 import CoreSyn
-import CoreMonad	( FloatOutSwitches(..) )
-import CoreUtils	( exprType, exprOkForSpeculation )
-import CoreArity	( exprBotStrictness_maybe )
-import CoreFVs		-- all of it
+import CoreMonad        ( FloatOutSwitches(..) )
+import CoreUtils        ( exprType, exprOkForSpeculation )
+import CoreArity        ( exprBotStrictness_maybe )
+import CoreFVs          -- all of it
 import Coercion         ( isCoVar )
-import CoreSubst	( Subst, emptySubst, extendInScope, substBndr, substRecBndrs,
-			  extendIdSubst, extendSubstWithVar, cloneBndr, 
+import CoreSubst        ( Subst, emptySubst, extendInScope, substBndr, substRecBndrs,
+                          extendIdSubst, extendSubstWithVar, cloneBndr, 
                           cloneRecIdBndrs, substTy, substCo )
 import MkCore           ( sortQuantVars ) 
 import Id
@@ -76,12 +70,12 @@ import IdInfo
 import Var
 import VarSet
 import VarEnv
-import Literal		( litIsTrivial )
+import Literal          ( litIsTrivial )
 import Demand           ( StrictSig, increaseStrictSigArity )
-import Name		( getOccName, mkSystemVarName )
-import OccName		( occNameString )
-import Type		( isUnLiftedType, Type, mkPiTypes )
-import BasicTypes	( Arity )
+import Name             ( getOccName, mkSystemVarName )
+import OccName          ( occNameString )
+import Type             ( isUnLiftedType, Type, mkPiTypes )
+import BasicTypes       ( Arity )
 import UniqSupply
 import Util
 import MonadUtils
@@ -90,9 +84,9 @@ import FastString
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Level numbers}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -100,16 +94,16 @@ type LevelledExpr = TaggedExpr FloatSpec
 type LevelledBind = TaggedBind FloatSpec
 type LevelledBndr = TaggedBndr FloatSpec
 
-data Level = Level Int	-- Major level: number of enclosing value lambdas
-	  	   Int	-- Minor level: number of big-lambda and/or case 
+data Level = Level Int  -- Major level: number of enclosing value lambdas
+                   Int  -- Minor level: number of big-lambda and/or case 
                         -- expressions between here and the nearest 
                         -- enclosing value lambda
 
 data FloatSpec 
-  = FloatMe Level	-- Float to just inside the binding 
-    	    		--    tagged with this level
-  | StayPut Level	-- Stay where it is; binding is
-    	    		--     tagged with tihs level
+  = FloatMe Level       -- Float to just inside the binding 
+                        --    tagged with this level
+  | StayPut Level       -- Stay where it is; binding is
+                        --     tagged with tihs level
 
 floatSpecLevel :: FloatSpec -> Level
 floatSpecLevel (FloatMe l) = l
@@ -129,7 +123,7 @@ definition but ``before'' a lambda; e.g., the \tr{x} in (levels shown
 as ``subscripts'')...
 \begin{verbatim}
 a_0 = let  b_? = ...  in
-	   x_1 = ... b ... in ...
+           x_1 = ... b ... in ...
 \end{verbatim}
 
 The main function @lvlExpr@ carries a ``context level'' (@ctxt_lvl@).
@@ -154,9 +148,9 @@ But, check this out:
 
 -- At one time I tried the effect of not float anything out of an InlineMe,
 -- but it sometimes works badly.  For example, consider PrelArr.done.  It
--- has the form 	__inline (\d. e)
+-- has the form         __inline (\d. e)
 -- where e doesn't mention d.  If we float this to 
---	__inline (let x = e in \d. x)
+--      __inline (let x = e in \d. x)
 -- things are bad.  The inliner doesn't even inline it because it doesn't look
 -- like a head-normal form.  So it seems a lesser evil to let things float.
 -- In SetLevels we do set the context to (Level 0 0) when we get to an InlineMe
@@ -187,7 +181,7 @@ incMinorLvl (Level major minor) = Level major (minor+1)
 maxLvl :: Level -> Level -> Level
 maxLvl l1@(Level maj1 min1) l2@(Level maj2 min2)
   | (maj1 > maj2) || (maj1 == maj2 && min1 > min2) = l1
-  | otherwise					   = l2
+  | otherwise                                      = l2
 
 ltLvl :: Level -> Level -> Bool
 ltLvl (Level maj1 min1) (Level maj2 min2)
@@ -210,16 +204,16 @@ instance Eq Level where
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Main level-setting code}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 setLevels :: FloatOutSwitches
-	  -> CoreProgram
-	  -> UniqSupply
-	  -> [LevelledBind]
+          -> CoreProgram
+          -> UniqSupply
+          -> [LevelledBind]
 
 setLevels float_lams binds us
   = initLvl us (do_them init_env binds)
@@ -249,24 +243,24 @@ lvlTopBind env (Rec pairs)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Setting expression levels}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-lvlExpr :: Level		-- ctxt_lvl: Level of enclosing expression
-	-> LevelEnv		-- Level of in-scope names/tyvars
-	-> CoreExprWithFVs	-- input expression
-	-> LvlM LevelledExpr	-- Result expression
+lvlExpr :: Level                -- ctxt_lvl: Level of enclosing expression
+        -> LevelEnv             -- Level of in-scope names/tyvars
+        -> CoreExprWithFVs      -- input expression
+        -> LvlM LevelledExpr    -- Result expression
 \end{code}
 
 The @ctxt_lvl@ is, roughly, the level of the innermost enclosing
 binder.  Here's an example
 
-	v = \x -> ...\y -> let r = case (..x..) of
-					..x..
-			   in ..
+        v = \x -> ...\y -> let r = case (..x..) of
+                                        ..x..
+                           in ..
 
 When looking at the rhs of @r@, @ctxt_lvl@ will be 1 because that's
 the level of @r@, even though it's inside a level-2 @\y@.  It's
@@ -328,9 +322,9 @@ lvlExpr ctxt_lvl env (_, AnnCast expr (_, co)) = do
     return (Cast expr' (substCo (le_subst env) co))
 
 -- We don't split adjacent lambdas.  That is, given
---	\x y -> (x+1,y)
+--      \x y -> (x+1,y)
 -- we don't float to give 
---	\x -> let v = x+y in \y -> (v,y)
+--      \x -> let v = x+y in \y -> (v,y)
 -- Why not?  Because partial applications are fairly rare, and splitting
 -- lambdas makes them more expensive.
 
@@ -338,15 +332,15 @@ lvlExpr ctxt_lvl env expr@(_, AnnLam {}) = do
     new_body <- lvlMFE True new_lvl new_env body
     return (mkLams new_bndrs new_body)
   where 
-    (bndrs, body)	 = collectAnnBndrs expr
+    (bndrs, body)        = collectAnnBndrs expr
     (new_lvl, new_bndrs) = lvlLamBndrs ctxt_lvl bndrs
-    new_env 		 = extendLvlEnv env new_bndrs
-	-- At one time we called a special verion of collectBinders,
-	-- which ignored coercions, because we don't want to split
-	-- a lambda like this (\x -> coerce t (\s -> ...))
-	-- This used to happen quite a bit in state-transformer programs,
-	-- but not nearly so much now non-recursive newtypes are transparent.
-	-- [See SetLevels rev 1.50 for a version with this approach.]
+    new_env              = extendLvlEnv env new_bndrs
+        -- At one time we called a special verion of collectBinders,
+        -- which ignored coercions, because we don't want to split
+        -- a lambda like this (\x -> coerce t (\s -> ...))
+        -- This used to happen quite a bit in state-transformer programs,
+        -- but not nearly so much now non-recursive newtypes are transparent.
+        -- [See SetLevels rev 1.50 for a version with this approach.]
 
 lvlExpr ctxt_lvl env (_, AnnLet bind body) = do
     (bind', new_lvl, new_env) <- lvlBind ctxt_lvl env bind
@@ -358,29 +352,29 @@ lvlExpr ctxt_lvl env (_, AnnCase scrut@(scrut_fvs,_) case_bndr ty alts)
        ; lvlCase ctxt_lvl env scrut_fvs scrut' case_bndr ty alts }
 
 -------------------------------------------
-lvlCase :: Level		-- ctxt_lvl: Level of enclosing expression
-	-> LevelEnv		-- Level of in-scope names/tyvars
-        -> VarSet		-- Free vars of input scrutinee
-        -> LevelledExpr		-- Processed scrutinee
-	-> Id -> Type		-- Case binder and result type
-	-> [AnnAlt Id VarSet]	-- Input alternatives
-	-> LvlM LevelledExpr	-- Result expression
+lvlCase :: Level                -- ctxt_lvl: Level of enclosing expression
+        -> LevelEnv             -- Level of in-scope names/tyvars
+        -> VarSet               -- Free vars of input scrutinee
+        -> LevelledExpr         -- Processed scrutinee
+        -> Id -> Type           -- Case binder and result type
+        -> [AnnAlt Id VarSet]   -- Input alternatives
+        -> LvlM LevelledExpr    -- Result expression
 lvlCase ctxt_lvl env scrut_fvs scrut' case_bndr ty alts
   | [(con@(DataAlt {}), bs, rhs)] <- alts
-  , exprOkForSpeculation scrut'	  -- See Note [Check the output scrutinee for okForSpec]
-  , not (isTopLvl dest_lvl)	  -- Can't have top-level cases
+  , exprOkForSpeculation scrut'   -- See Note [Check the output scrutinee for okForSpec]
+  , not (isTopLvl dest_lvl)       -- Can't have top-level cases
   =     -- See Note [Floating cases]
-    	-- Always float the case if possible
-  	-- Unlike lets we don't insist that it escapes a value lambda
+        -- Always float the case if possible
+        -- Unlike lets we don't insist that it escapes a value lambda
     do { (rhs_env, (case_bndr':bs')) <- cloneVars env (case_bndr:bs) dest_lvl
-       	 	   -- We don't need to use extendCaseBndrLvlEnv here
-		   -- because we are floating the case outwards so
-		   -- no need to do the binder-swap thing
+                   -- We don't need to use extendCaseBndrLvlEnv here
+                   -- because we are floating the case outwards so
+                   -- no need to do the binder-swap thing
        ; rhs' <- lvlMFE True ctxt_lvl rhs_env rhs
        ; let alt' = (con, [TB b (StayPut dest_lvl) | b <- bs'], rhs')
        ; return (Case scrut' (TB case_bndr' (FloatMe dest_lvl)) ty [alt']) }
 
-  | otherwise	  -- Stays put
+  | otherwise     -- Stays put
   = do { let case_bndr' = TB case_bndr bndr_spec
              alts_env   = extendCaseBndrLvlEnv env scrut' case_bndr'
        ; alts' <- mapM (lvl_alt alts_env) alts
@@ -389,7 +383,7 @@ lvlCase ctxt_lvl env scrut_fvs scrut' case_bndr ty alts
       incd_lvl  = incMinorLvl ctxt_lvl
       bndr_spec = StayPut incd_lvl
       dest_lvl = maxFvLevel (const True) env scrut_fvs
-   	      -- Don't abstact over type variables, hence const True
+              -- Don't abstact over type variables, hence const True
 
       lvl_alt alts_env (con, bs, rhs)
         = do { rhs' <- lvlMFE True incd_lvl new_env rhs
@@ -444,11 +438,11 @@ binding site.
 That's why we apply exprOkForSpeculation to scrut' and not to scrut.
 
 \begin{code}
-lvlMFE ::  Bool			-- True <=> strict context [body of case or let]
-	-> Level		-- Level of innermost enclosing lambda/tylam
-	-> LevelEnv		-- Level of in-scope names/tyvars
-	-> CoreExprWithFVs	-- input expression
-	-> LvlM LevelledExpr	-- Result expression
+lvlMFE ::  Bool                 -- True <=> strict context [body of case or let]
+        -> Level                -- Level of innermost enclosing lambda/tylam
+        -> LevelEnv             -- Level of in-scope names/tyvars
+        -> CoreExprWithFVs      -- input expression
+        -> LvlM LevelledExpr    -- Result expression
 -- lvlMFE is just like lvlExpr, except that it might let-bind
 -- the expression, so that it can itself be floated.
 
@@ -457,30 +451,30 @@ lvlMFE _ _ env (_, AnnType ty)
 
 -- No point in floating out an expression wrapped in a coercion or note
 -- If we do we'll transform  lvl = e |> co 
---			 to  lvl' = e; lvl = lvl' |> co
+--                       to  lvl' = e; lvl = lvl' |> co
 -- and then inline lvl.  Better just to float out the payload.
 lvlMFE strict_ctxt ctxt_lvl env (_, AnnTick t e)
   = do { e' <- lvlMFE strict_ctxt ctxt_lvl env e
        ; return (Tick t e') }
 
 lvlMFE strict_ctxt ctxt_lvl env (_, AnnCast e (_, co))
-  = do	{ e' <- lvlMFE strict_ctxt ctxt_lvl env e
-	; return (Cast e' (substCo (le_subst env) co)) }
+  = do  { e' <- lvlMFE strict_ctxt ctxt_lvl env e
+        ; return (Cast e' (substCo (le_subst env) co)) }
 
 -- Note [Case MFEs]
 lvlMFE True ctxt_lvl env e@(_, AnnCase {})
   = lvlExpr ctxt_lvl env e     -- Don't share cases
 
 lvlMFE strict_ctxt ctxt_lvl env ann_expr@(fvs, _)
-  |  isUnLiftedType ty		-- Can't let-bind it; see Note [Unlifted MFEs]
-     		    		-- This includes coercions, which we don't
-				-- want to float anyway
+  |  isUnLiftedType ty          -- Can't let-bind it; see Note [Unlifted MFEs]
+                                -- This includes coercions, which we don't
+                                -- want to float anyway
   || notWorthFloating ann_expr abs_vars
   || not float_me
-  = 	-- Don't float it out
+  =     -- Don't float it out
     lvlExpr ctxt_lvl env ann_expr
 
-  | otherwise	-- Float it out!
+  | otherwise   -- Float it out!
   = do expr' <- lvlFloatRhs abs_vars dest_lvl env ann_expr
        var <- newLvlVar abs_vars ty mb_bot
        return (Let (NonRec (TB var (FloatMe dest_lvl)) expr') 
@@ -492,53 +486,53 @@ lvlMFE strict_ctxt ctxt_lvl env ann_expr@(fvs, _)
     dest_lvl = destLevel env fvs (isFunction ann_expr) mb_bot
     abs_vars = abstractVars dest_lvl env fvs
 
-	-- A decision to float entails let-binding this thing, and we only do 
-	-- that if we'll escape a value lambda, or will go to the top level.
-    float_me = dest_lvl `ltMajLvl` ctxt_lvl		-- Escapes a value lambda
-    	     	-- OLD CODE: not (exprIsCheap expr) || isTopLvl dest_lvl
-		-- 	     see Note [Escaping a value lambda]
-
-            || (isTopLvl dest_lvl 	-- Only float if we are going to the top level
-         	&& floatConsts env	--   and the floatConsts flag is on
-              	&& not strict_ctxt)	-- Don't float from a strict context	
-	  -- We are keen to float something to the top level, even if it does not
-	  -- escape a lambda, because then it needs no allocation.  But it's controlled
-	  -- by a flag, because doing this too early loses opportunities for RULES
-	  -- which (needless to say) are important in some nofib programs
-	  -- (gcd is an example).
-	  --
-	  -- Beware:
-	  --	concat = /\ a -> foldr ..a.. (++) []
-	  -- was getting turned into
-	  --	lvl    = /\ a -> foldr ..a.. (++) []
-	  --	concat = /\ a -> lvl a
-	  -- which is pretty stupid.  Hence the strict_ctxt test
-	  -- 
-	  -- Also a strict contxt includes uboxed values, and they
-	  -- can't be bound at top level
+        -- A decision to float entails let-binding this thing, and we only do 
+        -- that if we'll escape a value lambda, or will go to the top level.
+    float_me = dest_lvl `ltMajLvl` ctxt_lvl             -- Escapes a value lambda
+                -- OLD CODE: not (exprIsCheap expr) || isTopLvl dest_lvl
+                --           see Note [Escaping a value lambda]
+
+            || (isTopLvl dest_lvl       -- Only float if we are going to the top level
+                && floatConsts env      --   and the floatConsts flag is on
+                && not strict_ctxt)     -- Don't float from a strict context    
+          -- We are keen to float something to the top level, even if it does not
+          -- escape a lambda, because then it needs no allocation.  But it's controlled
+          -- by a flag, because doing this too early loses opportunities for RULES
+          -- which (needless to say) are important in some nofib programs
+          -- (gcd is an example).
+          --
+          -- Beware:
+          --    concat = /\ a -> foldr ..a.. (++) []
+          -- was getting turned into
+          --    lvl    = /\ a -> foldr ..a.. (++) []
+          --    concat = /\ a -> lvl a
+          -- which is pretty stupid.  Hence the strict_ctxt test
+          -- 
+          -- Also a strict contxt includes uboxed values, and they
+          -- can't be bound at top level
 \end{code}
 
 Note [Unlifted MFEs]
 ~~~~~~~~~~~~~~~~~~~~
 We don't float unlifted MFEs, which potentially loses big opportunites.
 For example:
-	\x -> f (h y)
+        \x -> f (h y)
 where h :: Int -> Int# is expensive. We'd like to float the (h y) outside
 the \x, but we don't because it's unboxed.  Possible solution: box it.
 
 Note [Bottoming floats]
 ~~~~~~~~~~~~~~~~~~~~~~~
 If we see
-	f = \x. g (error "urk")
+        f = \x. g (error "urk")
 we'd like to float the call to error, to get
-	lvl = error "urk"
-	f = \x. g lvl
+        lvl = error "urk"
+        f = \x. g lvl
 Furthermore, we want to float a bottoming expression even if it has free
 variables:
-	f = \x. g (let v = h x in error ("urk" ++ v))
+        f = \x. g (let v = h x in error ("urk" ++ v))
 Then we'd like to abstact over 'x' can float the whole arg of g:
-	lvl = \x. let v = h x in error ("urk" ++ v)
-	f = \x. g (lvl x)
+        lvl = \x. let v = h x in error ("urk" ++ v)
+        f = \x. g (lvl x)
 See Maessen's paper 1999 "Bottom extraction: factoring error handling out
 of functional programs" (unpublished I think).
 
@@ -565,7 +559,7 @@ Doesn't change any other allocation at all.
 annotateBotStr :: Id -> Maybe (Arity, StrictSig) -> Id
 annotateBotStr id Nothing            = id
 annotateBotStr id (Just (arity, sig)) = id `setIdArity` arity
-     		                              `setIdStrictness` sig
+                                              `setIdStrictness` sig
 
 notWorthFloating :: CoreExprWithFVs -> [Var] -> Bool
 -- Returns True if the expression would be replaced by
@@ -573,7 +567,7 @@ notWorthFloating :: CoreExprWithFVs -> [Var] -> Bool
 --   abs_vars = tvars only:  return True if e is trivial, 
 --                           but False for anything bigger
 --   abs_vars = [x] (an Id): return True for trivial, or an application (f x)
---   	      	    	     but False for (f x x)
+--                           but False for (f x x)
 --
 -- One big goal is that floating should be idempotent.  Eg if
 -- we replace e with (lvl79 x y) and then run FloatOut again, don't want
@@ -584,19 +578,19 @@ notWorthFloating e abs_vars
   where
     go (_, AnnVar {}) n    = n >= 0
     go (_, AnnLit lit) n   = ASSERT( n==0 ) 
-                             litIsTrivial lit	-- Note [Floating literals]
+                             litIsTrivial lit   -- Note [Floating literals]
     go (_, AnnCast e _)  n = go e n
     go (_, AnnApp e arg) n 
        | (_, AnnType {}) <- arg = go e n
        | (_, AnnCoercion {}) <- arg = go e n
        | n==0                   = False
-       | is_triv arg       	= go e (n-1)
-       | otherwise         	= False
-    go _ _                 	= False
+       | is_triv arg            = go e (n-1)
+       | otherwise              = False
+    go _ _                      = False
 
-    is_triv (_, AnnLit {})   	       	  = True	-- Treat all literals as trivial
-    is_triv (_, AnnVar {})   	       	  = True	-- (ie not worth floating)
-    is_triv (_, AnnCast e _) 	       	  = is_triv e
+    is_triv (_, AnnLit {})                = True        -- Treat all literals as trivial
+    is_triv (_, AnnVar {})                = True        -- (ie not worth floating)
+    is_triv (_, AnnCast e _)              = is_triv e
     is_triv (_, AnnApp e (_, AnnType {})) = is_triv e
     is_triv (_, AnnApp e (_, AnnCoercion {})) = is_triv e
     is_triv _                             = False     
@@ -616,7 +610,7 @@ Note [Escaping a value lambda]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We want to float even cheap expressions out of value lambdas, 
 because that saves allocation.  Consider
-	f = \x.  .. (\y.e) ...
+        f = \x.  .. (\y.e) ...
 Then we'd like to avoid allocating the (\y.e) every time we call f,
 (assuming e does not mention x).   
 
@@ -624,10 +618,10 @@ An example where this really makes a difference is simplrun009.
 
 Another reason it's good is because it makes SpecContr fire on functions.
 Consider
-	f = \x. ....(f (\y.e))....
+        f = \x. ....(f (\y.e))....
 After floating we get
-	lvl = \y.e
-	f = \x. ....(f lvl)...
+        lvl = \y.e
+        f = \x. ....(f lvl)...
 and that is much easier for SpecConstr to generate a robust specialisation for.
 
 The OLD CODE (given where this Note is referred to) prevents floating
@@ -639,47 +633,47 @@ zeros everywhere, but a 4% win for 'puzzle'.  Very small 0.5% loss for
 yet (mentioned in Simon-nofib-notes).
 
 OLD comment was:
-	 Even if it escapes a value lambda, we only
-	 float if it's not cheap (unless it'll get all the
-	 way to the top).  I've seen cases where we
-	 float dozens of tiny free expressions, which cost
-	 more to allocate than to evaluate.
-	 NB: exprIsCheap is also true of bottom expressions, which
-	     is good; we don't want to share them
-
-	It's only Really Bad to float a cheap expression out of a
-	strict context, because that builds a thunk that otherwise
-	would never be built.  So another alternative would be to
-	add 
-		|| (strict_ctxt && not (exprIsBottom expr))
-	to the condition above. We should really try this out.
+         Even if it escapes a value lambda, we only
+         float if it's not cheap (unless it'll get all the
+         way to the top).  I've seen cases where we
+         float dozens of tiny free expressions, which cost
+         more to allocate than to evaluate.
+         NB: exprIsCheap is also true of bottom expressions, which
+             is good; we don't want to share them
+
+        It's only Really Bad to float a cheap expression out of a
+        strict context, because that builds a thunk that otherwise
+        would never be built.  So another alternative would be to
+        add 
+                || (strict_ctxt && not (exprIsBottom expr))
+        to the condition above. We should really try this out.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Bindings}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The binding stuff works for top level too.
 
 \begin{code}
-lvlBind :: Level		-- Context level; might be Top even for bindings 
-				-- nested in the RHS of a top level binding
-	-> LevelEnv
-	-> CoreBindWithFVs
-	-> LvlM (LevelledBind, Level, LevelEnv)
+lvlBind :: Level                -- Context level; might be Top even for bindings 
+                                -- nested in the RHS of a top level binding
+        -> LevelEnv
+        -> CoreBindWithFVs
+        -> LvlM (LevelledBind, Level, LevelEnv)
 
 lvlBind ctxt_lvl env (AnnNonRec bndr rhs@(rhs_fvs,_))
   | isTyVar bndr    -- Don't do anything for TyVar binders
-	            --   (simplifier gets rid of them pronto)
+                    --   (simplifier gets rid of them pronto)
   || isCoVar bndr   -- Difficult to fix up CoVar occurrences (see extendPolyLvlEnv)
                     -- so we will ignore this case for now
   || not (profitableFloat ctxt_lvl dest_lvl)
   || (isTopLvl dest_lvl && isUnLiftedType (idType bndr))
-	  -- We can't float an unlifted binding to top level, so we don't 
-	  -- float it at all.  It's a bit brutal, but unlifted bindings 
-	  -- aren't expensive either
+          -- We can't float an unlifted binding to top level, so we don't 
+          -- float it at all.  It's a bit brutal, but unlifted bindings 
+          -- aren't expensive either
   = -- No float
     do rhs' <- lvlExpr ctxt_lvl env rhs
        let  (env', bndr') = substLetBndrNonRec env bndr bind_lvl
@@ -725,16 +719,16 @@ lvlBind ctxt_lvl env (AnnRec pairs)
 -- ToDo: when enabling the floatLambda stuff,
 --       I think we want to stop doing this
   | isSingleton pairs && count isId abs_vars > 1
-  = do	-- Special case for self recursion where there are
-	-- several variables carried around: build a local loop:	
-	--	poly_f = \abs_vars. \lam_vars . letrec f = \lam_vars. rhs in f lam_vars
-	-- This just makes the closures a bit smaller.  If we don't do
-	-- this, allocation rises significantly on some programs
-	--
-	-- We could elaborate it for the case where there are several
-	-- mutually functions, but it's quite a bit more complicated
-	-- 
-	-- This all seems a bit ad hoc -- sigh
+  = do  -- Special case for self recursion where there are
+        -- several variables carried around: build a local loop:        
+        --      poly_f = \abs_vars. \lam_vars . letrec f = \lam_vars. rhs in f lam_vars
+        -- This just makes the closures a bit smaller.  If we don't do
+        -- this, allocation rises significantly on some programs
+        --
+        -- We could elaborate it for the case where there are several
+        -- mutually functions, but it's quite a bit more complicated
+        -- 
+        -- This all seems a bit ad hoc -- sigh
     let
         (bndr,rhs) = head pairs
         (rhs_lvl, abs_vars_w_lvls) = lvlLamBndrs dest_lvl abs_vars
@@ -747,11 +741,11 @@ lvlBind ctxt_lvl env (AnnRec pairs)
     new_rhs_body <- lvlExpr body_lvl body_env rhs_body
     (poly_env, [poly_bndr]) <- newPolyBndrs dest_lvl env abs_vars [bndr]
     return (Rec [(TB poly_bndr (FloatMe dest_lvl) 
-               	 , mkLams abs_vars_w_lvls $
-               	   mkLams new_lam_bndrs $
-               	   Let (Rec [( TB new_bndr (StayPut rhs_lvl)
-               	             , mkLams new_lam_bndrs new_rhs_body)]) 
-               	       (mkVarApps (Var new_bndr) lam_bndrs))]
+                 , mkLams abs_vars_w_lvls $
+                   mkLams new_lam_bndrs $
+                   Let (Rec [( TB new_bndr (StayPut rhs_lvl)
+                             , mkLams new_lam_bndrs new_rhs_body)]) 
+                       (mkVarApps (Var new_bndr) lam_bndrs))]
            , ctxt_lvl
            , poly_env)
 
@@ -764,19 +758,19 @@ lvlBind ctxt_lvl env (AnnRec pairs)
   where
     (bndrs,rhss) = unzip pairs
 
-	-- Finding the free vars of the binding group is annoying
+        -- Finding the free vars of the binding group is annoying
     bind_fvs = (unionVarSets [ idFreeVars bndr `unionVarSet` rhs_fvs
-	     		    | (bndr, (rhs_fvs,_)) <- pairs])
-	       `minusVarSet`
-	       mkVarSet bndrs
+                            | (bndr, (rhs_fvs,_)) <- pairs])
+               `minusVarSet`
+               mkVarSet bndrs
 
     dest_lvl = destLevel env bind_fvs (all isFunction rhss) Nothing
     abs_vars = abstractVars dest_lvl env bind_fvs
 
 profitableFloat :: Level -> Level -> Bool
 profitableFloat ctxt_lvl dest_lvl
-  =  (dest_lvl `ltMajLvl` ctxt_lvl)	-- Escapes a value lambda
-  || isTopLvl dest_lvl    		-- Going all the way to top level
+  =  (dest_lvl `ltMajLvl` ctxt_lvl)     -- Escapes a value lambda
+  || isTopLvl dest_lvl                  -- Going all the way to top level
 
 ----------------------------------------------------
 -- Three help functions for the type-abstraction case
@@ -793,9 +787,9 @@ lvlFloatRhs abs_vars dest_lvl env rhs = do
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Deciding floatability}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -824,29 +818,29 @@ lvlLamBndrs lvl bndrs
 destLevel :: LevelEnv -> VarSet -> Bool -> 
              Maybe (Arity, StrictSig) -> Level
 destLevel env fvs is_function mb_bot
-  | Just {} <- mb_bot = tOP_LEVEL	-- Send bottoming bindings to the top 
-					-- regardless; see Note [Bottoming floats]
+  | Just {} <- mb_bot = tOP_LEVEL       -- Send bottoming bindings to the top 
+                                        -- regardless; see Note [Bottoming floats]
   | Just n_args <- floatLams env
-  , n_args > 0	-- n=0 case handled uniformly by the 'otherwise' case
+  , n_args > 0  -- n=0 case handled uniformly by the 'otherwise' case
   , is_function
   , countFreeIds fvs <= n_args
-  = tOP_LEVEL	-- Send functions to top level; see
-		-- the comments with isFunction
+  = tOP_LEVEL   -- Send functions to top level; see
+                -- the comments with isFunction
 
   | otherwise = maxFvLevel isId env fvs  -- Max over Ids only; the tyvars
-    	      		   	    	 -- will be abstracted
+                                         -- will be abstracted
 
 isFunction :: CoreExprWithFVs -> Bool
 -- The idea here is that we want to float *functions* to
 -- the top level.  This saves no work, but 
---	(a) it can make the host function body a lot smaller, 
---		and hence inlinable.  
---	(b) it can also save allocation when the function is recursive:
---	    h = \x -> letrec f = \y -> ...f...y...x...
---		      in f x
+--      (a) it can make the host function body a lot smaller, 
+--              and hence inlinable.  
+--      (b) it can also save allocation when the function is recursive:
+--          h = \x -> letrec f = \y -> ...f...y...x...
+--                    in f x
 --     becomes
---	    f = \x y -> ...(f x)...y...x...
---	    h = \x -> f x x
+--          f = \x y -> ...(f x)...y...x...
+--          h = \x -> f x x
 --     No allocation for f now.
 -- We may only want to do this if there are sufficiently few free 
 -- variables.  We certainly only want to do it for values, and not for
@@ -866,42 +860,42 @@ countFreeIds = foldVarSet add 0
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Free-To-Level Monad}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 data LevelEnv 
   = LE { le_switches :: FloatOutSwitches
-       , le_lvl_env  :: VarEnv Level	-- Domain is *post-cloned* TyVars and Ids
-       , le_subst    :: Subst 		-- Domain is pre-cloned Ids; tracks the in-scope set
-					-- 	so that substitution is capture-avoiding
+       , le_lvl_env  :: VarEnv Level    -- Domain is *post-cloned* TyVars and Ids
+       , le_subst    :: Subst           -- Domain is pre-cloned Ids; tracks the in-scope set
+                                        --      so that substitution is capture-avoiding
                                         -- The Id -> CoreExpr in the Subst is ignored
                                         -- (since we want to substitute in LevelledExpr
                                         -- instead) but we do use the Co/TyVar substs
-       , le_env      :: IdEnv ([Var], LevelledExpr)	-- Domain is pre-cloned Ids
+       , le_env      :: IdEnv ([Var], LevelledExpr)     -- Domain is pre-cloned Ids
     }
-	-- We clone let-bound variables so that they are still
-	-- distinct when floated out; hence the le_subst/le_env.
+        -- We clone let-bound variables so that they are still
+        -- distinct when floated out; hence the le_subst/le_env.
         -- (see point 3 of the module overview comment).
-	-- We also use these envs when making a variable polymorphic
-	-- because we want to float it out past a big lambda.
-	--
-	-- The le_subst and le_env always implement the same mapping, but the
-	-- le_subst maps to CoreExpr and the le_env to LevelledExpr
-	-- Since the range is always a variable or type application,
-	-- there is never any difference between the two, but sadly
-	-- the types differ.  The le_subst is used when substituting in
-	-- a variable's IdInfo; the le_env when we find a Var.
-	--
-	-- In addition the le_env records a list of tyvars free in the
-	-- type application, just so we don't have to call freeVars on
-	-- the type application repeatedly.
-	--
-	-- The domain of the both envs is *pre-cloned* Ids, though
-	--
-	-- The domain of the le_lvl_env is the *post-cloned* Ids
+        -- We also use these envs when making a variable polymorphic
+        -- because we want to float it out past a big lambda.
+        --
+        -- The le_subst and le_env always implement the same mapping, but the
+        -- le_subst maps to CoreExpr and the le_env to LevelledExpr
+        -- Since the range is always a variable or type application,
+        -- there is never any difference between the two, but sadly
+        -- the types differ.  The le_subst is used when substituting in
+        -- a variable's IdInfo; the le_env when we find a Var.
+        --
+        -- In addition the le_env records a list of tyvars free in the
+        -- type application, just so we don't have to call freeVars on
+        -- the type application repeatedly.
+        --
+        -- The domain of the both envs is *pre-cloned* Ids, though
+        --
+        -- The domain of the le_lvl_env is the *post-cloned* Ids
 
 initialEnv :: FloatOutSwitches -> LevelEnv
 initialEnv float_lams 
@@ -985,58 +979,58 @@ maxFvLevel max_me (LE { le_lvl_env = lvl_env, le_env = id_env }) var_set
   where
     max_in in_var lvl 
        = foldr max_out lvl (case lookupVarEnv id_env in_var of
-				Just (abs_vars, _) -> abs_vars
-				Nothing		   -> [in_var])
+                                Just (abs_vars, _) -> abs_vars
+                                Nothing            -> [in_var])
 
     max_out out_var lvl 
-	| max_me out_var = case lookupVarEnv lvl_env out_var of
-				Just lvl' -> maxLvl lvl' lvl
-				Nothing   -> lvl 
-	| otherwise = lvl	-- Ignore some vars depending on max_me
+        | max_me out_var = case lookupVarEnv lvl_env out_var of
+                                Just lvl' -> maxLvl lvl' lvl
+                                Nothing   -> lvl 
+        | otherwise = lvl       -- Ignore some vars depending on max_me
 
 lookupVar :: LevelEnv -> Id -> LevelledExpr
 lookupVar le v = case lookupVarEnv (le_env le) v of
-		    Just (_, expr) -> expr
-		    _              -> Var v
+                    Just (_, expr) -> expr
+                    _              -> Var v
 
 abstractVars :: Level -> LevelEnv -> VarSet -> [Var]
-	-- Find the variables in fvs, free vars of the target expresion,
-	-- whose level is greater than the destination level
-	-- These are the ones we are going to abstract out
+        -- Find the variables in fvs, free vars of the target expresion,
+        -- whose level is greater than the destination level
+        -- These are the ones we are going to abstract out
 abstractVars dest_lvl (LE { le_lvl_env = lvl_env, le_env = id_env }) fvs
   = map zap $ uniq $ sortQuantVars
-	[var | fv <- varSetElems fvs
-	     , var <- varSetElems (absVarsOf id_env fv)
-	     , abstract_me var ]
-	-- NB: it's important to call abstract_me only on the OutIds the
-	-- come from absVarsOf (not on fv, which is an InId)
+        [var | fv <- varSetElems fvs
+             , var <- varSetElems (absVarsOf id_env fv)
+             , abstract_me var ]
+        -- NB: it's important to call abstract_me only on the OutIds the
+        -- come from absVarsOf (not on fv, which is an InId)
   where
     uniq :: [Var] -> [Var]
-	-- Remove adjacent duplicates; the sort will have brought them together
+        -- Remove adjacent duplicates; the sort will have brought them together
     uniq (v1:v2:vs) | v1 == v2  = uniq (v2:vs)
-		    | otherwise = v1 : uniq (v2:vs)
+                    | otherwise = v1 : uniq (v2:vs)
     uniq vs = vs
 
     abstract_me v = case lookupVarEnv lvl_env v of
-			Just lvl -> dest_lvl `ltLvl` lvl
-			Nothing  -> False
+                        Just lvl -> dest_lvl `ltLvl` lvl
+                        Nothing  -> False
 
-	-- We are going to lambda-abstract, so nuke any IdInfo,
-	-- and add the tyvars of the Id (if necessary)
+        -- We are going to lambda-abstract, so nuke any IdInfo,
+        -- and add the tyvars of the Id (if necessary)
     zap v | isId v = WARN( isStableUnfolding (idUnfolding v) ||
-		           not (isEmptySpecInfo (idSpecialisation v)),
-		           text "absVarsOf: discarding info on" <+> ppr v )
-		     setIdInfo v vanillaIdInfo
-	  | otherwise = v
+                           not (isEmptySpecInfo (idSpecialisation v)),
+                           text "absVarsOf: discarding info on" <+> ppr v )
+                     setIdInfo v vanillaIdInfo
+          | otherwise = v
 
 absVarsOf :: IdEnv ([Var], LevelledExpr) -> Var -> VarSet
-	-- If f is free in the expression, and f maps to poly_f a b c in the
-	-- current substitution, then we must report a b c as candidate type
-	-- variables
-	--
-	-- Also, if x::a is an abstracted variable, then so is a; that is,
-	-- we must look in x's type. What's more, if a mentions kind variables,
-	-- we must also return those.
+        -- If f is free in the expression, and f maps to poly_f a b c in the
+        -- current substitution, then we must report a b c as candidate type
+        -- variables
+        --
+        -- Also, if x::a is an abstracted variable, then so is a; that is,
+        -- we must look in x's type. What's more, if a mentions kind variables,
+        -- we must also return those.
 absVarsOf id_env v 
   | isId v, Just (abs_vars, _) <- lookupVarEnv id_env v
   = foldr (unionVarSet . close) emptyVarSet abs_vars
@@ -1064,15 +1058,15 @@ newPolyBndrs dest_lvl env abs_vars bndrs = do
     let new_bndrs = zipWith mk_poly_bndr bndrs uniqs
     return (extendPolyLvlEnv dest_lvl env abs_vars (bndrs `zip` new_bndrs), new_bndrs)
   where
-    mk_poly_bndr bndr uniq = transferPolyIdInfo bndr abs_vars $ 	-- Note [transferPolyIdInfo] in Id.lhs
-			     mkSysLocal (mkFastString str) uniq poly_ty
-			   where
-			     str     = "poly_" ++ occNameString (getOccName bndr)
-			     poly_ty = mkPiTypes abs_vars (idType bndr)
-
-newLvlVar :: [CoreBndr] -> Type 	-- Abstract wrt these bndrs
-	  -> Maybe (Arity, StrictSig)   -- Note [Bottoming floats]
-	  -> LvlM Id
+    mk_poly_bndr bndr uniq = transferPolyIdInfo bndr abs_vars $         -- Note [transferPolyIdInfo] in Id.lhs
+                             mkSysLocal (mkFastString str) uniq poly_ty
+                           where
+                             str     = "poly_" ++ occNameString (getOccName bndr)
+                             poly_ty = mkPiTypes abs_vars (idType bndr)
+
+newLvlVar :: [CoreBndr] -> Type         -- Abstract wrt these bndrs
+          -> Maybe (Arity, StrictSig)   -- Note [Bottoming floats]
+          -> LvlM Id
 newLvlVar vars body_ty mb_bot
   = do { uniq <- getUniqueM
        ; return (mkLocalIdWithInfo (mk_name uniq) (mkPiTypes vars body_ty) info) }
@@ -1080,11 +1074,11 @@ newLvlVar vars body_ty mb_bot
     mk_name uniq = mkSystemVarName uniq (mkFastString "lvl")
     arity = count isId vars
     info = case mb_bot of
-		Nothing               -> vanillaIdInfo
-		Just (bot_arity, sig) -> 
+                Nothing               -> vanillaIdInfo
+                Just (bot_arity, sig) -> 
                      vanillaIdInfo 
-		    `setArityInfo`      (arity + bot_arity)
-		    `setStrictnessInfo` (increaseStrictSigArity arity sig)
+                    `setArityInfo`      (arity + bot_arity)
+                    `setStrictnessInfo` (increaseStrictSigArity arity sig)
     
 -- The deeply tiresome thing is that we have to apply the substitution
 -- to the rules inside each Id.  Grr.  But it matters.
@@ -1097,7 +1091,7 @@ substLetBndrNonRec
     (env', bndr' )
   where
     (subst', bndr') = substBndr subst bndr
-    env'	    = le { le_lvl_env = extendVarEnv lvl_env bndr bind_lvl
+    env'            = le { le_lvl_env = extendVarEnv lvl_env bndr bind_lvl
                          , le_subst = subst'
                          , le_env = delVarEnv id_env bndr }
 
@@ -1109,7 +1103,7 @@ substLetBndrsRec
     (env', bndrs')
   where
     (subst', bndrs') = substRecBndrs subst bndrs
-    env'	     = le { le_lvl_env = extendVarEnvList lvl_env [(b,bind_lvl) | b <- bndrs]
+    env'             = le { le_lvl_env = extendVarEnvList lvl_env [(b,bind_lvl) | b <- bndrs]
                           , le_subst = subst'
                           , le_env = delVarEnvList id_env bndrs }
 
@@ -1117,10 +1111,10 @@ cloneVar :: LevelEnv -> Var -> Level -> LvlM (LevelEnv, Var)
 cloneVar env v dest_lvl -- Works for Ids, TyVars and CoVars
   = do { u <- getUniqueM
        ; let (subst', v1) = cloneBndr (le_subst env) u v
-      	     v2     	  = if isId v1 
+             v2           = if isId v1 
                             then zapDemandIdInfo v1  
                             else v1
-      	     env'	  = extendCloneLvlEnv dest_lvl env subst' [(v,v2)]
+             env'         = extendCloneLvlEnv dest_lvl env subst' [(v,v2)]
        ; return (env', v2) }
 
 cloneVars :: LevelEnv -> [Var] -> Level -> LvlM (LevelEnv, [Var])
@@ -1133,8 +1127,8 @@ cloneRecVars env vs dest_lvl -- Works for CoVars too (since cloneRecIdBndrs does
     let
       (subst', vs1) = cloneRecIdBndrs (le_subst env) us vs
       -- Note [Zapping the demand info]
-      vs2	    = map zapDemandIdInfo vs1  
-      env'	    = extendCloneLvlEnv dest_lvl env subst' (vs `zip` vs2)
+      vs2           = map zapDemandIdInfo vs1  
+      env'          = extendCloneLvlEnv dest_lvl env subst' (vs `zip` vs2)
     return (env', vs2)
 \end{code}
 
@@ -1147,4 +1141,4 @@ binding site.  Eg
    f x = let v = 3*4 in v+x
 Here v is strict; but if we float v to top level, it isn't any more.
 
-	
+        
diff --git a/compiler/stranal/WorkWrap.lhs b/compiler/stranal/WorkWrap.lhs
index 6a448ca..9701a47 100644
--- a/compiler/stranal/WorkWrap.lhs
+++ b/compiler/stranal/WorkWrap.lhs
@@ -4,26 +4,20 @@
 \section[WorkWrap]{Worker/wrapper-generating back-end of strictness analyser}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module WorkWrap ( wwTopBinds ) where
 
 import CoreSyn
-import CoreUnfold	( certainlyWillInline, mkInlineUnfolding, mkWwInlineRule )
-import CoreUtils	( exprType, exprIsHNF )
-import CoreArity	( exprArity )
+import CoreUnfold       ( certainlyWillInline, mkInlineUnfolding, mkWwInlineRule )
+import CoreUtils        ( exprType, exprIsHNF )
+import CoreArity        ( exprArity )
 import Var
 import Id
 import IdInfo
 import UniqSupply
 import BasicTypes
 import DynFlags
-import VarEnv		( isEmptyVarEnv )
+import VarEnv           ( isEmptyVarEnv )
 import Demand
 import WwLib
 import Util
@@ -69,9 +63,9 @@ wwTopBinds dflags us top_binds
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[wwBind-wwExpr]{@wwBind@ and @wwExpr@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @wwBind@ works on a binding, trying each \tr{(binder, expr)} pair in
@@ -80,9 +74,9 @@ turn.  Non-recursive case first, then recursive...
 \begin{code}
 wwBind  :: DynFlags
         -> CoreBind
-	-> UniqSM [CoreBind]	-- returns a WwBinding intermediate form;
-				-- the caller will convert to Expr/Binding,
-				-- as appropriate.
+        -> UniqSM [CoreBind]    -- returns a WwBinding intermediate form;
+                                -- the caller will convert to Expr/Binding,
+                                -- as appropriate.
 
 wwBind dflags (NonRec binder rhs) = do
     new_rhs <- wwExpr dflags rhs
@@ -138,9 +132,9 @@ wwExpr dflags (Case expr binder ty alts) = do
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[tryWW]{@tryWW@: attempt a worker/wrapper pair}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @tryWW@ just accumulates arguments, converts strictness info from the
@@ -216,11 +210,11 @@ late in the pipeline, and we want to prioritise specialisations over
 strictness.  Eg if we have 
   module Foo where
     f :: Num a => a -> Int -> a
-    f n 0 = n  	       	   -- Strict in the Int, hence wrapper
+    f n 0 = n              -- Strict in the Int, hence wrapper
     f n x = f (n+n) (x-1)
 
     g :: Int -> Int
-    g x = f x x		   -- Provokes a specialisation for f
+    g x = f x x            -- Provokes a specialisation for f
 
   module Bsr where
     import Foo
@@ -239,26 +233,26 @@ it appears in the first place in the defining module.
 \begin{code}
 tryWW   :: DynFlags
         -> RecFlag
-	-> Id				-- The fn binder
-	-> CoreExpr			-- The bound rhs; its innards
-					--   are already ww'd
-	-> UniqSM [(Id, CoreExpr)]	-- either *one* or *two* pairs;
-					-- if one, then no worker (only
-					-- the orig "wrapper" lives on);
-					-- if two, then a worker and a
-					-- wrapper.
+        -> Id                           -- The fn binder
+        -> CoreExpr                     -- The bound rhs; its innards
+                                        --   are already ww'd
+        -> UniqSM [(Id, CoreExpr)]      -- either *one* or *two* pairs;
+                                        -- if one, then no worker (only
+                                        -- the orig "wrapper" lives on);
+                                        -- if two, then a worker and a
+                                        -- wrapper.
 tryWW dflags is_rec fn_id rhs
   | isNeverActive inline_act
-	-- No point in worker/wrappering if the thing is never inlined!
-	-- Because the no-inline prag will prevent the wrapper ever
-	-- being inlined at a call site. 
-	-- 
-	-- Furthermore, don't even expose strictness info
+        -- No point in worker/wrappering if the thing is never inlined!
+        -- Because the no-inline prag will prevent the wrapper ever
+        -- being inlined at a call site. 
+        -- 
+        -- Furthermore, don't even expose strictness info
   = return [ (fn_id, rhs) ]
 
   | is_thunk && worthSplittingThunk fn_dmd res_info
-  	-- See Note [Thunk splitting]
-  = ASSERT2( isNonRec is_rec, ppr new_fn_id )	-- The thunk must be non-recursive
+        -- See Note [Thunk splitting]
+  = ASSERT2( isNonRec is_rec, ppr new_fn_id )   -- The thunk must be non-recursive
     checkSize dflags new_fn_id rhs $ 
     splitThunk dflags new_fn_id rhs
 
@@ -270,30 +264,30 @@ tryWW dflags is_rec fn_id rhs
   = return [ (new_fn_id, rhs) ]
 
   where
-    fn_info   	 = idInfo fn_id
+    fn_info      = idInfo fn_id
     fn_dmd       = demandInfo fn_info
     inline_act   = inlinePragmaActivation (inlinePragInfo fn_info)
 
-	-- In practice it always will have a strictness 
-	-- signature, even if it's a uninformative one
+        -- In practice it always will have a strictness 
+        -- signature, even if it's a uninformative one
     strict_sig  = strictnessInfo fn_info
     StrictSig (DmdType env wrap_dmds res_info) = strict_sig
 
-	-- new_fn_id has the DmdEnv zapped.  
-	--	(a) it is never used again
-	--	(b) it wastes space
-	--	(c) it becomes incorrect as things are cloned, because
-	--	    we don't push the substitution into it
+        -- new_fn_id has the DmdEnv zapped.  
+        --      (a) it is never used again
+        --      (b) it wastes space
+        --      (c) it becomes incorrect as things are cloned, because
+        --          we don't push the substitution into it
     new_fn_id | isEmptyVarEnv env = fn_id
-	      | otherwise	  = fn_id `setIdStrictness` 
-				     StrictSig (mkTopDmdType wrap_dmds res_info)
+              | otherwise         = fn_id `setIdStrictness` 
+                                     StrictSig (mkTopDmdType wrap_dmds res_info)
 
     is_fun    = notNull wrap_dmds
     is_thunk  = not is_fun && not (exprIsHNF rhs)
 
 ---------------------
 checkSize :: DynFlags -> Id -> CoreExpr
-	  -> UniqSM [(Id,CoreExpr)] -> UniqSM [(Id,CoreExpr)]
+          -> UniqSM [(Id,CoreExpr)] -> UniqSM [(Id,CoreExpr)]
 checkSize dflags fn_id rhs thing_inside
   | isStableUnfolding (realIdUnfolding fn_id)
   = return [ (fn_id, rhs) ]
@@ -304,9 +298,9 @@ checkSize dflags fn_id rhs thing_inside
 
   | certainlyWillInline dflags (idUnfolding fn_id)
   = return [ (fn_id `setIdUnfolding` inline_rule, rhs) ]
-	-- Note [Don't w/w inline small non-loop-breaker things]
-	-- NB: use idUnfolding because we don't want to apply
-	--     this criterion to a loop breaker!
+        -- Note [Don't w/w inline small non-loop-breaker things]
+        -- NB: use idUnfolding because we don't want to apply
+        --     this criterion to a loop breaker!
 
   | otherwise = thing_inside
   where
@@ -318,64 +312,64 @@ splitFun :: DynFlags -> Id -> IdInfo -> [Demand] -> DmdResult -> Expr Var
 splitFun dflags fn_id fn_info wrap_dmds res_info rhs
   = WARN( not (wrap_dmds `lengthIs` arity), ppr fn_id <+> (ppr arity $$ ppr wrap_dmds $$ ppr res_info) ) 
     (do {
-	-- The arity should match the signature
+        -- The arity should match the signature
       (work_demands, wrap_fn, work_fn) <- mkWwBodies dflags fun_ty wrap_dmds res_info one_shots
     ; work_uniq <- getUniqueM
     ; let
-	work_rhs = work_fn rhs
-	work_id  = mkWorkerId work_uniq fn_id (exprType work_rhs) 
-		        `setIdOccInfo` occInfo fn_info
-				-- Copy over occurrence info from parent
-				-- Notably whether it's a loop breaker
-				-- Doesn't matter much, since we will simplify next, but
-				-- seems right-er to do so
-
-			`setInlineActivation` (inlinePragmaActivation inl_prag)
-				-- Any inline activation (which sets when inlining is active) 
-				-- on the original function is duplicated on the worker
-				-- It *matters* that the pragma stays on the wrapper
-				-- It seems sensible to have it on the worker too, although we
-				-- can't think of a compelling reason. (In ptic, INLINE things are 
-				-- not w/wd). However, the RuleMatchInfo is not transferred since
+        work_rhs = work_fn rhs
+        work_id  = mkWorkerId work_uniq fn_id (exprType work_rhs) 
+                        `setIdOccInfo` occInfo fn_info
+                                -- Copy over occurrence info from parent
+                                -- Notably whether it's a loop breaker
+                                -- Doesn't matter much, since we will simplify next, but
+                                -- seems right-er to do so
+
+                        `setInlineActivation` (inlinePragmaActivation inl_prag)
+                                -- Any inline activation (which sets when inlining is active) 
+                                -- on the original function is duplicated on the worker
+                                -- It *matters* that the pragma stays on the wrapper
+                                -- It seems sensible to have it on the worker too, although we
+                                -- can't think of a compelling reason. (In ptic, INLINE things are 
+                                -- not w/wd). However, the RuleMatchInfo is not transferred since
                                 -- it does not make sense for workers to be constructorlike.
 
-			`setIdStrictness` StrictSig (mkTopDmdType work_demands work_res_info)
-				-- Even though we may not be at top level, 
-				-- it's ok to give it an empty DmdEnv
+                        `setIdStrictness` StrictSig (mkTopDmdType work_demands work_res_info)
+                                -- Even though we may not be at top level, 
+                                -- it's ok to give it an empty DmdEnv
 
                         `setIdArity` (exprArity work_rhs)
                                 -- Set the arity so that the Core Lint check that the 
                                 -- arity is consistent with the demand type goes through
 
-	wrap_rhs  = wrap_fn work_id
-	wrap_prag = InlinePragma { inl_inline = Inline
+        wrap_rhs  = wrap_fn work_id
+        wrap_prag = InlinePragma { inl_inline = Inline
                                  , inl_sat    = Nothing
                                  , inl_act    = ActiveAfter 0
                                  , inl_rule   = rule_match_info }
-		-- See Note [Wrapper activation]
-		-- The RuleMatchInfo is (and must be) unaffected
-		-- The inl_inline is bound to be False, else we would not be
-		--    making a wrapper
+                -- See Note [Wrapper activation]
+                -- The RuleMatchInfo is (and must be) unaffected
+                -- The inl_inline is bound to be False, else we would not be
+                --    making a wrapper
 
-	wrap_id   = fn_id `setIdUnfolding` mkWwInlineRule wrap_rhs arity
-			  `setInlinePragma` wrap_prag
-		          `setIdOccInfo` NoOccInfo
-			        -- Zap any loop-breaker-ness, to avoid bleating from Lint
-				-- about a loop breaker with an INLINE rule
+        wrap_id   = fn_id `setIdUnfolding` mkWwInlineRule wrap_rhs arity
+                          `setInlinePragma` wrap_prag
+                          `setIdOccInfo` NoOccInfo
+                                -- Zap any loop-breaker-ness, to avoid bleating from Lint
+                                -- about a loop breaker with an INLINE rule
 
     ; return ([(work_id, work_rhs), (wrap_id, wrap_rhs)]) })
-	-- Worker first, because wrapper mentions it
-	-- mkWwBodies has already built a wrap_rhs with an INLINE pragma wrapped around it
+        -- Worker first, because wrapper mentions it
+        -- mkWwBodies has already built a wrap_rhs with an INLINE pragma wrapped around it
   where
     fun_ty          = idType fn_id
     inl_prag        = inlinePragInfo fn_info
     rule_match_info = inlinePragmaRuleMatchInfo inl_prag
-    arity           = arityInfo fn_info	
-    		    -- The arity is set by the simplifier using exprEtaExpandArity
-		    -- So it may be more than the number of top-level-visible lambdas
+    arity           = arityInfo fn_info 
+                    -- The arity is set by the simplifier using exprEtaExpandArity
+                    -- So it may be more than the number of top-level-visible lambdas
 
-    work_res_info | isBotRes res_info = botRes	-- Cpr stuff done by wrapper
-		  | otherwise	      = topRes
+    work_res_info | isBotRes res_info = botRes  -- Cpr stuff done by wrapper
+                  | otherwise         = topRes
 
     one_shots = get_one_shots rhs
 
@@ -388,7 +382,7 @@ get_one_shots (Lam b e)
   | isId b    = isOneShotLambda b : get_one_shots e
   | otherwise = get_one_shots e
 get_one_shots (Tick _ e) = get_one_shots e
-get_one_shots _    	 = noOneShotInfo
+get_one_shots _          = noOneShotInfo
 
 noOneShotInfo :: [Bool]
 noOneShotInfo = repeat False
@@ -400,24 +394,24 @@ Suppose x is used strictly (never mind whether it has the CPR
 property).  
 
       let
-	x* = x-rhs
+        x* = x-rhs
       in body
 
 splitThunk transforms like this:
 
       let
-	x* = case x-rhs of { I# a -> I# a }
+        x* = case x-rhs of { I# a -> I# a }
       in body
 
 Now simplifier will transform to
 
       case x-rhs of 
-	I# a ->	let x* = I# a 
-	        in body
+        I# a -> let x* = I# a 
+                in body
 
 which is what we want. Now suppose x-rhs is itself a case:
 
-	x-rhs = case e of { T -> I# a; F -> I# b }
+        x-rhs = case e of { T -> I# a; F -> I# b }
 
 The join point will abstract over a, rather than over (which is
 what would have happened before) which is fine.
@@ -431,11 +425,11 @@ then the splitting will go deeper too.
 \begin{code}
 -- See Note [Thunk splitting]
 -- splitThunk converts the *non-recursive* binding
---	x = e
+--      x = e
 -- into
---	x = let x = e
---	    in case x of 
---		 I# y -> let x = I# y in x }
+--      x = let x = e
+--          in case x of 
+--               I# y -> let x = I# y in x }
 -- See comments above. Is it not beautifully short?
 -- Moreover, it works just as well when there are
 -- several binders, and if the binders are lifted
diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
index c0c3f6c..454befc 100644
--- a/compiler/stranal/WwLib.lhs
+++ b/compiler/stranal/WwLib.lhs
@@ -4,34 +4,28 @@
 \section[WwLib]{A library for the ``worker\/wrapper'' back-end to the strictness analyser}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module WwLib ( mkWwBodies, mkWWstr, mkWorkerArgs, deepSplitProductType_maybe ) where
 
 #include "HsVersions.h"
 
 import CoreSyn
-import CoreUtils	( exprType, mkCast )
-import Id		( Id, idType, mkSysLocal, idDemandInfo, setIdDemandInfo,
-			  isOneShotLambda, setOneShotLambda, setIdUnfolding,
+import CoreUtils        ( exprType, mkCast )
+import Id               ( Id, idType, mkSysLocal, idDemandInfo, setIdDemandInfo,
+                          isOneShotLambda, setOneShotLambda, setIdUnfolding,
                           setIdInfo
-			)
-import IdInfo		( vanillaIdInfo )
+                        )
+import IdInfo           ( vanillaIdInfo )
 import DataCon
 import Demand        
-import MkCore		( mkRuntimeErrorApp, aBSENT_ERROR_ID )
-import MkId		( realWorldPrimId, voidArgId )
-import TysPrim		( realWorldStatePrimTy )
-import TysWiredIn	( tupleCon )
+import MkCore           ( mkRuntimeErrorApp, aBSENT_ERROR_ID )
+import MkId             ( realWorldPrimId, voidArgId )
+import TysPrim          ( realWorldStatePrimTy )
+import TysWiredIn       ( tupleCon )
 import Type
 import Coercion hiding  ( substTy, substTyVarBndr )
-import BasicTypes	( TupleSort(..) )
-import Literal		( absentLiteralOf )
+import BasicTypes       ( TupleSort(..) )
+import Literal          ( absentLiteralOf )
 import TyCon
 import UniqSupply
 import Unique
@@ -44,9 +38,9 @@ import FastString
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[mkWrapperAndWorker]{@mkWrapperAndWorker@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Here's an example.  The original function is:
@@ -55,9 +49,9 @@ Here's an example.  The original function is:
 g :: forall a . Int -> [a] -> a
 
 g = \/\ a -> \ x ys ->
-	case x of
-	  0 -> head ys
-	  _ -> head (tail ys)
+        case x of
+          0 -> head ys
+          _ -> head (tail ys)
 \end{verbatim}
 
 From this, we want to produce:
@@ -66,20 +60,20 @@ From this, we want to produce:
 g :: forall a . Int -> [a] -> a
 
 g = \/\ a -> \ x ys ->
-	case x of
-	  I# x# -> $wg a x# ys
-	    -- call the worker; don't forget the type args!
+        case x of
+          I# x# -> $wg a x# ys
+            -- call the worker; don't forget the type args!
 
 -- worker
 $wg :: forall a . Int# -> [a] -> a
 
 $wg = \/\ a -> \ x# ys ->
-	let
-	    x = I# x#
-	in
-	    case x of		    -- note: body of g moved intact
-	      0 -> head ys
-	      _ -> head (tail ys)
+        let
+            x = I# x#
+        in
+            case x of               -- note: body of g moved intact
+              0 -> head ys
+              _ -> head (tail ys)
 \end{verbatim}
 
 Something we have to be careful about:  Here's an example:
@@ -88,7 +82,7 @@ Something we have to be careful about:  Here's an example:
 -- "f" strictness: U(P)U(P)
 f (I# a) (I# b) = a +# b
 
-g = f	-- "g" strictness same as "f"
+g = f   -- "g" strictness same as "f"
 \end{verbatim}
 
 \tr{f} will get a worker all nice and friendly-like; that's good.
@@ -103,45 +97,45 @@ the unusable strictness-info into the interfaces.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{The worker wrapper core}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @mkWwBodies@ is called when doing the worker\/wrapper split inside a module.
 
 \begin{code}
 mkWwBodies :: DynFlags
-       -> Type				-- Type of original function
-	   -> [Demand]				-- Strictness of original function
-	   -> DmdResult				-- Info about function result
-	   -> [Bool]				-- One-shot-ness of the function
-	   -> UniqSM ([Demand],			-- Demands for worker (value) args
-		      Id -> CoreExpr,		-- Wrapper body, lacking only the worker Id
-		      CoreExpr -> CoreExpr)	-- Worker body, lacking the original function rhs
-
--- wrap_fn_args E	= \x y -> E
--- work_fn_args E	= E x y
-
--- wrap_fn_str E 	= case x of { (a,b) -> 
---			  case a of { (a1,a2) ->
---			  E a1 a2 b y }}
--- work_fn_str E	= \a2 a2 b y ->
---			  let a = (a1,a2) in
---			  let x = (a,b) in
---			  E
+       -> Type                          -- Type of original function
+           -> [Demand]                          -- Strictness of original function
+           -> DmdResult                         -- Info about function result
+           -> [Bool]                            -- One-shot-ness of the function
+           -> UniqSM ([Demand],                 -- Demands for worker (value) args
+                      Id -> CoreExpr,           -- Wrapper body, lacking only the worker Id
+                      CoreExpr -> CoreExpr)     -- Worker body, lacking the original function rhs
+
+-- wrap_fn_args E       = \x y -> E
+-- work_fn_args E       = E x y
+
+-- wrap_fn_str E        = case x of { (a,b) -> 
+--                        case a of { (a1,a2) ->
+--                        E a1 a2 b y }}
+-- work_fn_str E        = \a2 a2 b y ->
+--                        let a = (a1,a2) in
+--                        let x = (a,b) in
+--                        E
 
 mkWwBodies dflags fun_ty demands res_info one_shots
-  = do	{ let arg_info = demands `zip` (one_shots ++ repeat False)
+  = do  { let arg_info = demands `zip` (one_shots ++ repeat False)
               all_one_shots = all snd arg_info
-	; (wrap_args, wrap_fn_args, work_fn_args, res_ty) <- mkWWargs emptyTvSubst fun_ty arg_info
-	; (work_args, wrap_fn_str,  work_fn_str) <- mkWWstr dflags wrap_args
+        ; (wrap_args, wrap_fn_args, work_fn_args, res_ty) <- mkWWargs emptyTvSubst fun_ty arg_info
+        ; (work_args, wrap_fn_str,  work_fn_str) <- mkWWstr dflags wrap_args
 
         -- Do CPR w/w.  See Note [Always do CPR w/w]
-	; (wrap_fn_cpr, work_fn_cpr,  cpr_res_ty) <- mkWWcpr res_ty res_info
+        ; (wrap_fn_cpr, work_fn_cpr,  cpr_res_ty) <- mkWWcpr res_ty res_info
 
-	; let (work_lam_args, work_call_args) = mkWorkerArgs dflags work_args all_one_shots cpr_res_ty
-	; return ([idDemandInfo v | v <- work_call_args, isId v],
+        ; let (work_lam_args, work_call_args) = mkWorkerArgs dflags work_args all_one_shots cpr_res_ty
+        ; return ([idDemandInfo v | v <- work_call_args, isId v],
                   wrap_fn_args . wrap_fn_cpr . wrap_fn_str . applyToVars work_call_args . Var,
                   mkLams work_lam_args. work_fn_str . work_fn_cpr . work_fn_args) }
         -- We use an INLINE unconditionally, even if the wrapper turns out to be
@@ -167,32 +161,32 @@ is Trac #5920.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Making wrapper args}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 During worker-wrapper stuff we may end up with an unlifted thing
 which we want to let-bind without losing laziness.  So we
 add a void argument.  E.g.
 
-	f = /\a -> \x y z -> E::Int#	-- E does not mention x,y,z
+        f = /\a -> \x y z -> E::Int#    -- E does not mention x,y,z
 ==>
-	fw = /\ a -> \void -> E
-	f  = /\ a -> \x y z -> fw realworld
+        fw = /\ a -> \void -> E
+        f  = /\ a -> \x y z -> fw realworld
 
 We use the state-token type which generates no code.
 
 \begin{code}
 mkWorkerArgs :: DynFlags -> [Var]
              -> Bool    -- Whether all arguments are one-shot
-	     -> Type	-- Type of body
-	     -> ([Var],	-- Lambda bound args
-		 [Var])	-- Args at call site
+             -> Type    -- Type of body
+             -> ([Var], -- Lambda bound args
+                 [Var]) -- Args at call site
 mkWorkerArgs dflags args all_one_shot res_ty
     | any isId args || not needsAValueLambda
     = (args, args)
-    | otherwise	
+    | otherwise 
     = (args ++ [newArg], args ++ [realWorldPrimId])
     where
       needsAValueLambda =
@@ -239,32 +233,32 @@ $j_s1l1 =
         GHC.Types.True ->  ... }
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Coercion stuff}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 We really want to "look through" coerces.
 Reason: I've seen this situation:
 
-	let f = coerce T (\s -> E)
-	in \x -> case x of
-	   	    p -> coerce T' f
-		    q -> \s -> E2
-	   	    r -> coerce T' f
+        let f = coerce T (\s -> E)
+        in \x -> case x of
+                    p -> coerce T' f
+                    q -> \s -> E2
+                    r -> coerce T' f
 
 If only we w/w'd f, we'd get
-	let f = coerce T (\s -> fw s)
-	    fw = \s -> E
-	in ...
+        let f = coerce T (\s -> fw s)
+            fw = \s -> E
+        in ...
 
 Now we'll inline f to get
 
-	let fw = \s -> E
-	in \x -> case x of
-	   	    p -> fw
-		    q -> \s -> E2
-	   	    r -> fw
+        let fw = \s -> E
+        in \x -> case x of
+                    p -> fw
+                    q -> \s -> E2
+                    r -> fw
 
 Now we'll see that fw has arity 1, and will arity expand
 the \x to get what we want.
@@ -275,67 +269,67 @@ the \x to get what we want.
 -- It chomps bites off foralls, arrows, newtypes
 -- and keeps repeating that until it's satisfied the supplied arity
 
-mkWWargs :: TvSubst		-- Freshening substitution to apply to the type
-				--   See Note [Freshen type variables]
-	 -> Type		-- The type of the function
-	 -> [(Demand,Bool)]	-- Demands and one-shot info for value arguments
-	 -> UniqSM  ([Var],		-- Wrapper args
-		     CoreExpr -> CoreExpr,	-- Wrapper fn
-		     CoreExpr -> CoreExpr,	-- Worker fn
-		     Type)			-- Type of wrapper body
+mkWWargs :: TvSubst             -- Freshening substitution to apply to the type
+                                --   See Note [Freshen type variables]
+         -> Type                -- The type of the function
+         -> [(Demand,Bool)]     -- Demands and one-shot info for value arguments
+         -> UniqSM  ([Var],             -- Wrapper args
+                     CoreExpr -> CoreExpr,      -- Wrapper fn
+                     CoreExpr -> CoreExpr,      -- Worker fn
+                     Type)                      -- Type of wrapper body
 
 mkWWargs subst fun_ty arg_info
   | Just (rep_ty, co) <- splitNewTypeRepCo_maybe fun_ty
-   	-- The newtype case is for when the function has
-	-- a recursive newtype after the arrow (rare)
-	-- We check for arity >= 0 to avoid looping in the case
-	-- of a function whose type is, in effect, infinite
-	-- [Arity is driven by looking at the term, not just the type.]
-	--
-	-- It's also important when we have a function returning (say) a pair
-	-- wrapped in a recursive newtype, at least if CPR analysis can look 
-	-- through such newtypes, which it probably can since they are 
-	-- simply coerces.
-	--
-	-- Note (Sept 08): This case applies even if demands is empty.
-	--		   I'm not quite sure why; perhaps it makes it
-	--		   easier for CPR
+        -- The newtype case is for when the function has
+        -- a recursive newtype after the arrow (rare)
+        -- We check for arity >= 0 to avoid looping in the case
+        -- of a function whose type is, in effect, infinite
+        -- [Arity is driven by looking at the term, not just the type.]
+        --
+        -- It's also important when we have a function returning (say) a pair
+        -- wrapped in a recursive newtype, at least if CPR analysis can look 
+        -- through such newtypes, which it probably can since they are 
+        -- simply coerces.
+        --
+        -- Note (Sept 08): This case applies even if demands is empty.
+        --                 I'm not quite sure why; perhaps it makes it
+        --                 easier for CPR
   = do { (wrap_args, wrap_fn_args, work_fn_args, res_ty)
-	    <-  mkWWargs subst rep_ty arg_info
- 	; return (wrap_args,
-	     	  \e -> Cast (wrap_fn_args e) (mkSymCo co),
-     		  \e -> work_fn_args (Cast e co),
-     		  res_ty) } 
+            <-  mkWWargs subst rep_ty arg_info
+        ; return (wrap_args,
+                  \e -> Cast (wrap_fn_args e) (mkSymCo co),
+                  \e -> work_fn_args (Cast e co),
+                  res_ty) } 
 
   | null arg_info
   = return ([], id, id, substTy subst fun_ty)
 
   | Just (tv, fun_ty') <- splitForAllTy_maybe fun_ty
-  = do 	{ let (subst', tv') = substTyVarBndr subst tv
-		-- This substTyVarBndr clones the type variable when necy
-		-- See Note [Freshen type variables]
-  	; (wrap_args, wrap_fn_args, work_fn_args, res_ty)
-	     <- mkWWargs subst' fun_ty' arg_info
-	; return (tv' : wrap_args,
-        	  Lam tv' . wrap_fn_args,
-        	  work_fn_args . (`App` Type (mkTyVarTy tv')),
-        	  res_ty) }
+  = do  { let (subst', tv') = substTyVarBndr subst tv
+                -- This substTyVarBndr clones the type variable when necy
+                -- See Note [Freshen type variables]
+        ; (wrap_args, wrap_fn_args, work_fn_args, res_ty)
+             <- mkWWargs subst' fun_ty' arg_info
+        ; return (tv' : wrap_args,
+                  Lam tv' . wrap_fn_args,
+                  work_fn_args . (`App` Type (mkTyVarTy tv')),
+                  res_ty) }
 
   | ((dmd,one_shot):arg_info') <- arg_info
   , Just (arg_ty, fun_ty') <- splitFunTy_maybe fun_ty
-  = do	{ uniq <- getUniqueM
-	; let arg_ty' = substTy subst arg_ty
-	      id = mk_wrap_arg uniq arg_ty' dmd one_shot
-	; (wrap_args, wrap_fn_args, work_fn_args, res_ty)
-	      <- mkWWargs subst fun_ty' arg_info'
-	; return (id : wrap_args,
-	          Lam id . wrap_fn_args,
-        	  work_fn_args . (`App` varToCoreExpr id),
-        	  res_ty) }
+  = do  { uniq <- getUniqueM
+        ; let arg_ty' = substTy subst arg_ty
+              id = mk_wrap_arg uniq arg_ty' dmd one_shot
+        ; (wrap_args, wrap_fn_args, work_fn_args, res_ty)
+              <- mkWWargs subst fun_ty' arg_info'
+        ; return (id : wrap_args,
+                  Lam id . wrap_fn_args,
+                  work_fn_args . (`App` varToCoreExpr id),
+                  res_ty) }
 
   | otherwise
-  = WARN( True, ppr fun_ty )			-- Should not happen: if there is a demand
-    return ([], id, id, substTy subst fun_ty) 	-- then there should be a function arrow
+  = WARN( True, ppr fun_ty )                    -- Should not happen: if there is a demand
+    return ([], id, id, substTy subst fun_ty)   -- then there should be a function arrow
 
 applyToVars :: [Var] -> CoreExpr -> CoreExpr
 applyToVars vars fn = mkVarApps fn vars
@@ -358,25 +352,25 @@ within a type (e.g. forall a. a -> forall a. a->a).  But type
 variables *are* mentioned in <blah>, so we must substitute.
 
 That's why we carry the TvSubst through mkWWargs
-	
+        
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Strictness stuff}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 mkWWstr :: DynFlags
-        -> [Var]				-- Wrapper args; have their demand info on them
-						--  *Includes type variables*
-        -> UniqSM ([Var],			-- Worker args
-		   CoreExpr -> CoreExpr,	-- Wrapper body, lacking the worker call
-						-- and without its lambdas 
-						-- This fn adds the unboxing
-				
-		   CoreExpr -> CoreExpr)	-- Worker body, lacking the original body of the function,
-						-- and lacking its lambdas.
-						-- This fn does the reboxing
+        -> [Var]                                -- Wrapper args; have their demand info on them
+                                                --  *Includes type variables*
+        -> UniqSM ([Var],                       -- Worker args
+                   CoreExpr -> CoreExpr,        -- Wrapper body, lacking the worker call
+                                                -- and without its lambdas 
+                                                -- This fn adds the unboxing
+                                
+                   CoreExpr -> CoreExpr)        -- Worker body, lacking the original body of the function,
+                                                -- and lacking its lambdas.
+                                                -- This fn does the reboxing
 mkWWstr _ []
   = return ([], nop_fn, nop_fn)
 
@@ -403,10 +397,10 @@ will be unpacked, but
 will not, because the pieces aren't used. This is quite important otherwise
 we end up unpacking massive tuples passed to the bottoming function. Example:
 
- 	f :: ((Int,Int) -> String) -> (Int,Int) -> a
- 	f g pr = error (g pr)
+        f :: ((Int,Int) -> String) -> (Int,Int) -> a
+        f g pr = error (g pr)
 
- 	main = print (f fst (1, error "no"))
+        main = print (f fst (1, error "no"))
 
 Does 'main' print "error 1" or "error no"?  We don't really want 'f'
 to unbox its second argument.  This actually happened in GHC's onwn
@@ -418,9 +412,9 @@ as-yet-un-filled-in pkgState files.
 ----------------------
 -- mkWWstr_one wrap_arg = (work_args, wrap_fn, work_fn)
 --   *  wrap_fn assumes wrap_arg is in scope,
---	  brings into scope work_args (via cases)
+--        brings into scope work_args (via cases)
 --   * work_fn assumes work_args are in scope, a
---	  brings into scope wrap_arg (via lets)
+--        brings into scope wrap_arg (via lets)
 mkWWstr_one :: DynFlags -> Var -> UniqSM ([Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
 mkWWstr_one dflags arg
   | isTyVar arg
@@ -436,21 +430,21 @@ mkWWstr_one dflags arg
   | isSeqDmd dmd  -- `seq` demand; evaluate in wrapper in the hope
                   -- of dropping seqs in the worker
   = let arg_w_unf = arg `setIdUnfolding` evaldUnfolding
-	  -- Tell the worker arg that it's sure to be evaluated
+          -- Tell the worker arg that it's sure to be evaluated
           -- so that internal seqs can be dropped
     in return ([arg_w_unf], mk_seq_case arg, nop_fn)
-	  	-- Pass the arg, anyway, even if it is in theory discarded
-		-- Consider
-		--	f x y = x `seq` y
-		-- x gets a (Eval (Poly Abs)) demand, but if we fail to pass it to the worker
-		-- we ABSOLUTELY MUST record that x is evaluated in the wrapper.
-		-- Something like:
-		--	f x y = x `seq` fw y
-		--	fw y = let x{Evald} = error "oops" in (x `seq` y)
-		-- If we don't pin on the "Evald" flag, the seq doesn't disappear, and
-		-- we end up evaluating the absent thunk.
-		-- But the Evald flag is pretty weird, and I worry that it might disappear
-		-- during simplification, so for now I've just nuked this whole case
+                -- Pass the arg, anyway, even if it is in theory discarded
+                -- Consider
+                --      f x y = x `seq` y
+                -- x gets a (Eval (Poly Abs)) demand, but if we fail to pass it to the worker
+                -- we ABSOLUTELY MUST record that x is evaluated in the wrapper.
+                -- Something like:
+                --      f x y = x `seq` fw y
+                --      fw y = let x{Evald} = error "oops" in (x `seq` y)
+                -- If we don't pin on the "Evald" flag, the seq doesn't disappear, and
+                -- we end up evaluating the absent thunk.
+                -- But the Evald flag is pretty weird, and I worry that it might disappear
+                -- during simplification, so for now I've just nuked this whole case
 
   | isStrictDmd dmd
   , Just cs <- splitProdDmd_maybe dmd
@@ -458,28 +452,28 @@ mkWWstr_one dflags arg
   , Just (data_con, inst_tys, inst_con_arg_tys, co) 
              <- deepSplitProductType_maybe (idType arg)
   =  do { (uniq1:uniqs) <- getUniquesM
-	; let   unpk_args      = zipWith mk_ww_local uniqs inst_con_arg_tys
-	        unpk_args_w_ds = zipWithEqual "mkWWstr" set_worker_arg_info unpk_args cs
-	        unbox_fn       = mkUnpackCase (Var arg `mkCast` co) uniq1
+        ; let   unpk_args      = zipWith mk_ww_local uniqs inst_con_arg_tys
+                unpk_args_w_ds = zipWithEqual "mkWWstr" set_worker_arg_info unpk_args cs
+                unbox_fn       = mkUnpackCase (Var arg `mkCast` co) uniq1
                                               data_con unpk_args
-	        rebox_fn       = Let (NonRec arg con_app) 
-	        con_app        = mkConApp2 data_con inst_tys unpk_args `mkCast` mkSymCo co
-	 ; (worker_args, wrap_fn, work_fn) <- mkWWstr dflags unpk_args_w_ds
-	 ; return (worker_args, unbox_fn . wrap_fn, work_fn . rebox_fn) }
-	  		   -- Don't pass the arg, rebox instead
-			
-  | otherwise	-- Other cases
+                rebox_fn       = Let (NonRec arg con_app) 
+                con_app        = mkConApp2 data_con inst_tys unpk_args `mkCast` mkSymCo co
+         ; (worker_args, wrap_fn, work_fn) <- mkWWstr dflags unpk_args_w_ds
+         ; return (worker_args, unbox_fn . wrap_fn, work_fn . rebox_fn) }
+                           -- Don't pass the arg, rebox instead
+                        
+  | otherwise   -- Other cases
   = return ([arg], nop_fn, nop_fn)
 
   where
     dmd = idDemandInfo arg
-	-- If the wrapper argument is a one-shot lambda, then
-	-- so should (all) the corresponding worker arguments be
-	-- This bites when we do w/w on a case join point
+        -- If the wrapper argument is a one-shot lambda, then
+        -- so should (all) the corresponding worker arguments be
+        -- This bites when we do w/w on a case join point
     set_worker_arg_info worker_arg demand = set_one_shot (setIdDemandInfo worker_arg demand)
 
     set_one_shot | isOneShotLambda arg = setOneShotLambda
-		 | otherwise	       = \x -> x
+                 | otherwise           = \x -> x
 
 ----------------------
 nop_fn :: CoreExpr -> CoreExpr
@@ -510,9 +504,9 @@ deepSplitCprType_maybe _ _ = Nothing
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{CPR stuff}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 
@@ -529,8 +523,8 @@ left-to-right traversal of the result structure.
 mkWWcpr :: Type                              -- function body type
         -> DmdResult                         -- CPR analysis results
         -> UniqSM (CoreExpr -> CoreExpr,             -- New wrapper 
-                   CoreExpr -> CoreExpr,	     -- New worker
-		   Type)			-- Type of worker's body 
+                   CoreExpr -> CoreExpr,             -- New worker
+                   Type)                        -- Type of worker's body 
 
 mkWWcpr body_ty res
   = case returnsCPR_maybe res of
@@ -547,31 +541,31 @@ mkWWcpr_help :: (DataCon, [Type], [Type], Coercion)
 mkWWcpr_help (data_con, inst_tys, arg_tys, co)
   | [arg_ty1] <- arg_tys
   , isUnLiftedType arg_ty1
-	-- Special case when there is a single result of unlifted type
-	--
-	-- Wrapper:	case (..call worker..) of x -> C x
-	-- Worker:	case (   ..body..    ) of C x -> x
+        -- Special case when there is a single result of unlifted type
+        --
+        -- Wrapper:     case (..call worker..) of x -> C x
+        -- Worker:      case (   ..body..    ) of C x -> x
   = do { (work_uniq : arg_uniq : _) <- getUniquesM
        ; let arg       = mk_ww_local arg_uniq  arg_ty1
-	     con_app   = mkConApp2 data_con inst_tys [arg] `mkCast` co
+             con_app   = mkConApp2 data_con inst_tys [arg] `mkCast` co
 
        ; return ( \ wkr_call -> Case wkr_call arg (exprType con_app) [(DEFAULT, [], con_app)]
                 , \ body     -> mkUnpackCase body work_uniq data_con [arg] (Var arg)
                 , arg_ty1 ) }
 
-  | otherwise 	-- The general case
-	-- Wrapper: case (..call worker..) of (# a, b #) -> C a b
-	-- Worker:  case (   ...body...  ) of C a b -> (# a, b #)     
+  | otherwise   -- The general case
+        -- Wrapper: case (..call worker..) of (# a, b #) -> C a b
+        -- Worker:  case (   ...body...  ) of C a b -> (# a, b #)     
   = do { (work_uniq : uniqs) <- getUniquesM
        ; let (wrap_wild : args) = zipWith mk_ww_local uniqs (ubx_tup_ty : arg_tys)
-	     ubx_tup_con  = tupleCon UnboxedTuple (length arg_tys)
-	     ubx_tup_ty	  = exprType ubx_tup_app
-	     ubx_tup_app  = mkConApp2 ubx_tup_con arg_tys args
-             con_app	  = mkConApp2 data_con inst_tys args `mkCast` co
+             ubx_tup_con  = tupleCon UnboxedTuple (length arg_tys)
+             ubx_tup_ty   = exprType ubx_tup_app
+             ubx_tup_app  = mkConApp2 ubx_tup_con arg_tys args
+             con_app      = mkConApp2 data_con inst_tys args `mkCast` co
 
        ; return ( \ wkr_call -> Case wkr_call wrap_wild (exprType con_app)  [(DataAlt ubx_tup_con, args, con_app)]
-		, \ body     -> mkUnpackCase body work_uniq data_con args ubx_tup_app
-		, ubx_tup_ty ) }
+                , \ body     -> mkUnpackCase body work_uniq data_con args ubx_tup_app
+                , ubx_tup_ty ) }
 
 mkUnpackCase ::  CoreExpr -> Unique -> DataCon -> [Id] -> CoreExpr -> CoreExpr
 -- (mkUnpackCase e bndr Con args body)
@@ -591,12 +585,12 @@ mkUnpackCase scrut uniq boxing_con unpk_args body
 Note [Profiling and unpacking]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 If the original function looked like
-	f = \ x -> _scc_ "foo" E
+        f = \ x -> _scc_ "foo" E
 
 then we want the CPR'd worker to look like
-	\ x -> _scc_ "foo" (case E of I# x -> x)
+        \ x -> _scc_ "foo" (case E of I# x -> x)
 and definitely not
-	\ x -> case (_scc_ "foo" E) of I# x -> x)
+        \ x -> case (_scc_ "foo" E) of I# x -> x)
 
 This transform doesn't move work or allocation
 from one cost centre to another.
@@ -608,9 +602,9 @@ part of the function (post transformation) anyway.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Utilities}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [Absent errors]
@@ -661,10 +655,10 @@ sanitiseCaseBndr :: Id -> Id
 -- a case binder, so it's convenient to re-use it for that purpose.
 -- But we *must* throw away all its IdInfo.  In particular, the argument
 -- will have demand info on it, and that demand info may be incorrect for
--- the case binder.  e.g.  	case ww_arg of ww_arg { I# x -> ... }
+-- the case binder.  e.g.       case ww_arg of ww_arg { I# x -> ... }
 -- Quite likely ww_arg isn't used in '...'.  The case may get discarded
 -- if the case binder says "I'm demanded".  This happened in a situation 
--- like		(x+y) `seq` ....
+-- like         (x+y) `seq` ....
 sanitiseCaseBndr id = id `setIdInfo` vanillaIdInfo
 
 mk_ww_local :: Unique -> Type -> Id
diff --git a/compiler/typecheck/FamInst.lhs b/compiler/typecheck/FamInst.lhs
index 47cdfa9..a7e8ab5 100644
--- a/compiler/typecheck/FamInst.lhs
+++ b/compiler/typecheck/FamInst.lhs
@@ -2,16 +2,10 @@ The @FamInst@ type: family instance heads
 
 \begin{code}
 {-# LANGUAGE GADTs #-}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module FamInst ( 
         checkFamInstConsistency, tcExtendLocalFamInstEnv,
-	tcLookupFamInst, 
+        tcLookupFamInst, 
         tcGetFamInstEnvs,
         newFamInst,
         TcBuiltInSynFamily(..), trivialBuiltInFamily
@@ -47,9 +41,9 @@ import TcEvidence(TcCoercion)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                  Making a FamInst
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -82,9 +76,9 @@ newFamInst flavor axiom@(CoAxiom { co_ax_branches = FirstBranch branch
 
 
 %************************************************************************
-%*									*
-	Optimised overlap checking for family instances
-%*									*
+%*                                                                      *
+        Optimised overlap checking for family instances
+%*                                                                      *
 %************************************************************************
 
 For any two family instance modules that we import directly or indirectly, we
@@ -93,11 +87,11 @@ be certain that the instances of the two modules have already been checked for
 consistency during the compilation of modules that we import.
 
 Why do we need to check?  Consider 
-   module X1 where	  	  module X2 where
-    data T1			    data T2
-    type instance F T1 b = Int	    type instance F a T2 = Char
-    f1 :: F T1 a -> Int		    f2 :: Char -> F a T2
-    f1 x = x			    f2 x = x
+   module X1 where                module X2 where
+    data T1                         data T2
+    type instance F T1 b = Int      type instance F a T2 = Char
+    f1 :: F T1 a -> Int             f2 :: Char -> F a T2
+    f1 x = x                        f2 x = x
 
 Now if we import both X1 and X2 we could make (f2 . f1) :: Int -> Char.
 Notice that neither instance is an orphan.
@@ -118,7 +112,7 @@ data ModulePair = ModulePair Module Module
 --
 canon :: ModulePair -> (Module, Module)
 canon (ModulePair m1 m2) | m1 < m2   = (m1, m2)
-			 | otherwise = (m2, m1)
+                         | otherwise = (m2, m1)
 
 instance Eq ModulePair where
   mp1 == mp2 = canon mp1 == canon mp2
@@ -142,26 +136,26 @@ checkFamInstConsistency famInstMods directlyImpMods
        ; (eps, hpt) <- getEpsAndHpt
 
        ; let { -- Fetch the iface of a given module.  Must succeed as
- 	       -- all directly imported modules must already have been loaded.
-	       modIface mod = 
-	         case lookupIfaceByModule dflags hpt (eps_PIT eps) mod of
+               -- all directly imported modules must already have been loaded.
+               modIface mod = 
+                 case lookupIfaceByModule dflags hpt (eps_PIT eps) mod of
                    Nothing    -> panic "FamInst.checkFamInstConsistency"
                    Just iface -> iface
 
              ; hmiModule     = mi_module . hm_iface
-	     ; hmiFamInstEnv = extendFamInstEnvList emptyFamInstEnv 
+             ; hmiFamInstEnv = extendFamInstEnvList emptyFamInstEnv 
                                . md_fam_insts . hm_details
              ; hpt_fam_insts = mkModuleEnv [ (hmiModule hmi, hmiFamInstEnv hmi) 
-			                   | hmi <- eltsUFM hpt]
-	     ; groups        = map (dep_finsts . mi_deps . modIface) 
-				   directlyImpMods
-	     ; okPairs       = listToSet $ concatMap allPairs groups
-	         -- instances of okPairs are consistent
-	     ; criticalPairs = listToSet $ allPairs famInstMods
-	         -- all pairs that we need to consider
+                                           | hmi <- eltsUFM hpt]
+             ; groups        = map (dep_finsts . mi_deps . modIface) 
+                                   directlyImpMods
+             ; okPairs       = listToSet $ concatMap allPairs groups
+                 -- instances of okPairs are consistent
+             ; criticalPairs = listToSet $ allPairs famInstMods
+                 -- all pairs that we need to consider
              ; toCheckPairs  = Map.keys $ criticalPairs `Map.difference` okPairs
-	         -- the difference gives us the pairs we need to check now
-	     }
+                 -- the difference gives us the pairs we need to check now
+             }
 
        ; mapM_ (check hpt_fam_insts) toCheckPairs
        }
@@ -187,9 +181,9 @@ getFamInsts hpt_fam_insts mod
 \end{code}
 
 %************************************************************************
-%*									*
-	Lookup
-%*									*
+%*                                                                      *
+        Lookup
+%*                                                                      *
 %************************************************************************
 
 Look up the instance tycon of a family instance.
@@ -224,17 +218,17 @@ tcLookupFamInst tycon tys
                                   pprTvBndrs (varSetElems (tyVarsOfTypes tys)) $$ 
                                   ppr mb_match $$ ppr instEnv)
        ; case mb_match of
-	   [] -> return Nothing
-	   (match:_) 
+           [] -> return Nothing
+           (match:_) 
               -> return $ Just match
        }
 \end{code}
 
 
 %************************************************************************
-%*									*
-	Extending the family instance environment
-%*									*
+%*                                                                      *
+        Extending the family instance environment
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -246,7 +240,7 @@ tcExtendLocalFamInstEnv fam_insts thing_inside
                                           (tcg_fam_inst_env env, tcg_fam_insts env)
                                           fam_insts
       ; let env' = env { tcg_fam_insts    = fam_insts'
-		       , tcg_fam_inst_env = inst_env' }
+                       , tcg_fam_inst_env = inst_env' }
       ; setGblEnv env' thing_inside 
       }
 
@@ -285,9 +279,9 @@ addLocalFamInst (home_fie, my_fis) fam_inst
 \end{code}
 
 %************************************************************************
-%*									*
-	Checking an instance against conflicts with an instance env
-%*									*
+%*                                                                      *
+        Checking an instance against conflicts with an instance env
+%*                                                                      *
 %************************************************************************
 
 Check whether a single family instance conflicts with those in two instance
diff --git a/compiler/typecheck/Inst.lhs b/compiler/typecheck/Inst.lhs
index db49902..fb20539 100644
--- a/compiler/typecheck/Inst.lhs
+++ b/compiler/typecheck/Inst.lhs
@@ -6,12 +6,6 @@
 The @Inst@ type: dictionaries or method instances
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module Inst ( 
        deeplySkolemise, 
@@ -35,8 +29,8 @@ module Inst (
 
 #include "HsVersions.h"
 
-import {-# SOURCE #-}	TcExpr( tcPolyExpr, tcSyntaxOp )
-import {-# SOURCE #-}	TcUnify( unifyType )
+import {-# SOURCE #-}   TcExpr( tcPolyExpr, tcSyntaxOp )
+import {-# SOURCE #-}   TcUnify( unifyType )
 
 import FastString
 import HsSyn
@@ -70,9 +64,9 @@ import Data.List( mapAccumL )
 
 
 %************************************************************************
-%*									*
-		Emitting constraints
-%*									*
+%*                                                                      *
+                Emitting constraints
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -95,10 +89,10 @@ newMethodFromName :: CtOrigin -> Name -> TcRhoType -> TcM (HsExpr TcId)
 
 newMethodFromName origin name inst_ty
   = do { id <- tcLookupId name
- 	      -- Use tcLookupId not tcLookupGlobalId; the method is almost
-	      -- always a class op, but with -XRebindableSyntax GHC is
-	      -- meant to find whatever thing is in scope, and that may
-	      -- be an ordinary function. 
+              -- Use tcLookupId not tcLookupGlobalId; the method is almost
+              -- always a class op, but with -XRebindableSyntax GHC is
+              -- meant to find whatever thing is in scope, and that may
+              -- be an ordinary function. 
 
        ; let (tvs, theta, _caller_knows_this) = tcSplitSigmaTy (idType id)
              (the_tv:rest) = tvs
@@ -111,9 +105,9 @@ newMethodFromName origin name inst_ty
 
 
 %************************************************************************
-%*									*
-	Deep instantiation and skolemisation
-%*									*
+%*                                                                      *
+        Deep instantiation and skolemisation
+%*                                                                      *
 %************************************************************************
 
 Note [Deep skolemisation]
@@ -189,23 +183,23 @@ deeplyInstantiate orig ty
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
             Instantiating a call
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 ----------------
 instCall :: CtOrigin -> [TcType] -> TcThetaType -> TcM HsWrapper
 -- Instantiate the constraints of a call
---	(instCall o tys theta)
+--      (instCall o tys theta)
 -- (a) Makes fresh dictionaries as necessary for the constraints (theta)
 -- (b) Throws these dictionaries into the LIE
 -- (c) Returns an HsWrapper ([.] tys dicts)
 
 instCall orig tys theta 
-  = do	{ dict_app <- instCallConstraints orig theta
-	; return (dict_app <.> mkWpTyApps tys) }
+  = do  { dict_app <- instCallConstraints orig theta
+        ; return (dict_app <.> mkWpTyApps tys) }
 
 ----------------
 instCallConstraints :: CtOrigin -> TcThetaType -> TcM HsWrapper
@@ -226,21 +220,21 @@ instCallConstraints orig preds
            ; return (EvCoercion co) }
      | otherwise
      = do { ev_var <- emitWanted orig pred
-     	  ; return (EvId ev_var) }
+          ; return (EvId ev_var) }
 
 ----------------
 instStupidTheta :: CtOrigin -> TcThetaType -> TcM ()
 -- Similar to instCall, but only emit the constraints in the LIE
 -- Used exclusively for the 'stupid theta' of a data constructor
 instStupidTheta orig theta
-  = do	{ _co <- instCallConstraints orig theta -- Discard the coercion
-	; return () }
+  = do  { _co <- instCallConstraints orig theta -- Discard the coercion
+        ; return () }
 \end{code}
 
 %************************************************************************
-%*									*
-		Literals
-%*									*
+%*                                                                      *
+                Literals
+%*                                                                      *
 %************************************************************************
 
 In newOverloadedLit we convert directly to an Int or Integer if we
@@ -264,36 +258,36 @@ newOverloadedLit' :: DynFlags
                   -> TcM (HsOverLit TcId)
 newOverloadedLit' dflags orig
   lit@(OverLit { ol_val = val, ol_rebindable = rebindable
-	       , ol_witness = meth_name }) res_ty
+               , ol_witness = meth_name }) res_ty
 
   | not rebindable
   , Just expr <- shortCutLit dflags val res_ty 
-	-- Do not generate a LitInst for rebindable syntax.  
-	-- Reason: If we do, tcSimplify will call lookupInst, which
-	--	   will call tcSyntaxName, which does unification, 
-	--	   which tcSimplify doesn't like
+        -- Do not generate a LitInst for rebindable syntax.  
+        -- Reason: If we do, tcSimplify will call lookupInst, which
+        --         will call tcSyntaxName, which does unification, 
+        --         which tcSimplify doesn't like
   = return (lit { ol_witness = expr, ol_type = res_ty })
 
   | otherwise
-  = do	{ hs_lit <- mkOverLit val
-	; let lit_ty = hsLitType hs_lit
-	; fi' <- tcSyntaxOp orig meth_name (mkFunTy lit_ty res_ty)
-	 	-- Overloaded literals must have liftedTypeKind, because
-	 	-- we're instantiating an overloaded function here,
-	 	-- whereas res_ty might be openTypeKind. This was a bug in 6.2.2
-		-- However this'll be picked up by tcSyntaxOp if necessary
-	; let witness = HsApp (noLoc fi') (noLoc (HsLit hs_lit))
-	; return (lit { ol_witness = witness, ol_type = res_ty }) }
+  = do  { hs_lit <- mkOverLit val
+        ; let lit_ty = hsLitType hs_lit
+        ; fi' <- tcSyntaxOp orig meth_name (mkFunTy lit_ty res_ty)
+                -- Overloaded literals must have liftedTypeKind, because
+                -- we're instantiating an overloaded function here,
+                -- whereas res_ty might be openTypeKind. This was a bug in 6.2.2
+                -- However this'll be picked up by tcSyntaxOp if necessary
+        ; let witness = HsApp (noLoc fi') (noLoc (HsLit hs_lit))
+        ; return (lit { ol_witness = witness, ol_type = res_ty }) }
 
 ------------
 mkOverLit :: OverLitVal -> TcM HsLit
 mkOverLit (HsIntegral i) 
-  = do	{ integer_ty <- tcMetaTy integerTyConName
-	; return (HsInteger i integer_ty) }
+  = do  { integer_ty <- tcMetaTy integerTyConName
+        ; return (HsInteger i integer_ty) }
 
 mkOverLit (HsFractional r)
-  = do	{ rat_ty <- tcMetaTy rationalTyConName
-	; return (HsRat r rat_ty) }
+  = do  { rat_ty <- tcMetaTy rationalTyConName
+        ; return (HsRat r rat_ty) }
 
 mkOverLit (HsIsString s) = return (HsString s)
 \end{code}
@@ -302,11 +296,11 @@ mkOverLit (HsIsString s) = return (HsString s)
 
 
 %************************************************************************
-%*									*
-		Re-mappable syntax
+%*                                                                      *
+                Re-mappable syntax
     
      Used only for arrow syntax -- find a way to nuke this
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Suppose we are doing the -XRebindableSyntax thing, and we encounter
@@ -319,10 +313,10 @@ this:
 
 So the idea is to generate a local binding for (>>), thus:
 
-	let then72 :: forall a b. m a -> m b -> m b
-	    then72 = ...something involving the user's (>>)...
-	in
-	...the do-expression...
+        let then72 :: forall a b. m a -> m b -> m b
+            then72 = ...something involving the user's (>>)...
+        in
+        ...the do-expression...
 
 Now the do-expression can proceed using then72, which has exactly
 the expected type.
@@ -333,9 +327,9 @@ just use the expression inline.
 
 \begin{code}
 tcSyntaxName :: CtOrigin
-	     -> TcType			-- Type to instantiate it at
-	     -> (Name, HsExpr Name)	-- (Standard name, user name)
-	     -> TcM (Name, HsExpr TcId)	-- (Standard name, suitable expression)
+             -> TcType                  -- Type to instantiate it at
+             -> (Name, HsExpr Name)     -- (Standard name, user name)
+             -> TcM (Name, HsExpr TcId) -- (Standard name, suitable expression)
 -- USED ONLY FOR CmdTop (sigh) ***
 -- See Note [CmdSyntaxTable] in HsExpr
 
@@ -346,18 +340,18 @@ tcSyntaxName orig ty (std_nm, HsVar user_nm)
 
 tcSyntaxName orig ty (std_nm, user_nm_expr) = do
     std_id <- tcLookupId std_nm
-    let	
-	-- C.f. newMethodAtLoc
-	([tv], _, tau)  = tcSplitSigmaTy (idType std_id)
- 	sigma1		= substTyWith [tv] [ty] tau
-	-- Actually, the "tau-type" might be a sigma-type in the
-	-- case of locally-polymorphic methods.
+    let 
+        -- C.f. newMethodAtLoc
+        ([tv], _, tau)  = tcSplitSigmaTy (idType std_id)
+        sigma1          = substTyWith [tv] [ty] tau
+        -- Actually, the "tau-type" might be a sigma-type in the
+        -- case of locally-polymorphic methods.
 
     addErrCtxtM (syntaxNameCtxt user_nm_expr orig sigma1) $ do
 
-	-- Check that the user-supplied thing has the
-	-- same type as the standard one.  
-	-- Tiresome jiggling because tcCheckSigma takes a located expression
+        -- Check that the user-supplied thing has the
+        -- same type as the standard one.  
+        -- Tiresome jiggling because tcCheckSigma takes a located expression
      span <- getSrcSpanM
      expr <- tcPolyExpr (L span user_nm_expr) sigma1
      return (std_nm, unLoc expr)
@@ -367,18 +361,18 @@ syntaxNameCtxt :: HsExpr Name -> CtOrigin -> Type -> TidyEnv
 syntaxNameCtxt name orig ty tidy_env
   = do { inst_loc <- getCtLoc orig
        ; let msg = vcat [ ptext (sLit "When checking that") <+> quotes (ppr name)
-			  <+> ptext (sLit "(needed by a syntactic construct)")
-		        , nest 2 (ptext (sLit "has the required type:")
+                          <+> ptext (sLit "(needed by a syntactic construct)")
+                        , nest 2 (ptext (sLit "has the required type:")
                                   <+> ppr (tidyType tidy_env ty))
-		        , nest 2 (pprArisingAt inst_loc) ]
+                        , nest 2 (pprArisingAt inst_loc) ]
        ; return (tidy_env, msg) }
 \end{code}
 
 
 %************************************************************************
-%*									*
-		Instances
-%*									*
+%*                                                                      *
+                Instances
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -398,7 +392,7 @@ tcGetInstEnvs :: TcM (InstEnv, InstEnv)
 -- Gets both the external-package inst-env
 -- and the home-pkg inst env (includes module being compiled)
 tcGetInstEnvs = do { eps <- getEps; env <- getGblEnv;
-		     return (eps_inst_env eps, tcg_inst_env env) }
+                     return (eps_inst_env eps, tcg_inst_env env) }
 
 tcGetInsts :: TcM [ClsInst]
 -- Gets the local class instances.
@@ -411,7 +405,7 @@ tcExtendLocalInstEnv dfuns thing_inside
       ; env <- getGblEnv
       ; inst_env' <- foldlM addLocalInst (tcg_inst_env env) dfuns
       ; let env' = env { tcg_insts = dfuns ++ tcg_insts env,
-			 tcg_inst_env = inst_env' }
+                         tcg_inst_env = inst_env' }
       ; setGblEnv env' thing_inside }
 
 addLocalInst :: InstEnv -> ClsInst -> TcM InstEnv
@@ -478,7 +472,7 @@ traceDFuns ispecs
   = traceTc "Adding instances:" (vcat (map pp ispecs))
   where
     pp ispec = ppr (instanceDFunId ispec) <+> colon <+> ppr ispec
-	-- Print the dfun name itself too
+        -- Print the dfun name itself too
 
 funDepErr :: ClsInst -> [ClsInst] -> TcRn ()
 funDepErr ispec ispecs
@@ -488,7 +482,7 @@ funDepErr ispec ispecs
 dupInstErr :: ClsInst -> ClsInst -> TcRn ()
 dupInstErr ispec dup_ispec
   = addClsInstsErr (ptext (sLit "Duplicate instance declarations:"))
-	            [ispec, dup_ispec]
+                    [ispec, dup_ispec]
 
 overlappingInstErr :: ClsInst -> ClsInst -> TcRn ()
 overlappingInstErr ispec dup_ispec
@@ -507,9 +501,9 @@ addClsInstsErr herald ispecs
 \end{code}
 
 %************************************************************************
-%*									*
-	Simple functions over evidence variables
-%*									*
+%*                                                                      *
+        Simple functions over evidence variables
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -534,7 +528,7 @@ tyVarsOfCt :: Ct -> TcTyVarSet
 -- NB: the 
 tyVarsOfCt (CTyEqCan { cc_tyvar = tv, cc_rhs = xi })    = extendVarSet (tyVarsOfType xi) tv
 tyVarsOfCt (CFunEqCan { cc_tyargs = tys, cc_rhs = xi }) = tyVarsOfTypes (xi:tys)
-tyVarsOfCt (CDictCan { cc_tyargs = tys }) 	        = tyVarsOfTypes tys
+tyVarsOfCt (CDictCan { cc_tyargs = tys })               = tyVarsOfTypes tys
 tyVarsOfCt (CIrredEvCan { cc_ev = ev })                 = tyVarsOfType (ctEvPred ev)
 tyVarsOfCt (CHoleCan { cc_ev = ev })                    = tyVarsOfType (ctEvPred ev)
 tyVarsOfCt (CNonCanonical { cc_ev = ev })               = tyVarsOfType (ctEvPred ev)
diff --git a/compiler/typecheck/TcArrows.lhs b/compiler/typecheck/TcArrows.lhs
index f530900..bddaf7e 100644
--- a/compiler/typecheck/TcArrows.lhs
+++ b/compiler/typecheck/TcArrows.lhs
@@ -5,16 +5,10 @@
 Typecheck arrow notation
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcArrows ( tcProc ) where
 
-import {-# SOURCE #-}	TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp, tcCheckId, tcPolyExpr )
+import {-# SOURCE #-}   TcExpr( tcMonoExpr, tcInferRho, tcSyntaxOp, tcCheckId, tcPolyExpr )
 
 import HsSyn
 import TcMatches
@@ -76,32 +70,32 @@ Note that
 
 
 %************************************************************************
-%*									*
-		Proc	
-%*									*
+%*                                                                      *
+                Proc    
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-tcProc :: InPat Name -> LHsCmdTop Name		-- proc pat -> expr
-       -> TcRhoType				-- Expected type of whole proc expression
+tcProc :: InPat Name -> LHsCmdTop Name          -- proc pat -> expr
+       -> TcRhoType                             -- Expected type of whole proc expression
        -> TcM (OutPat TcId, LHsCmdTop TcId, TcCoercion)
 
 tcProc pat cmd exp_ty
   = newArrowScope $
-    do	{ (co, (exp_ty1, res_ty)) <- matchExpectedAppTy exp_ty 
-	; (co1, (arr_ty, arg_ty)) <- matchExpectedAppTy exp_ty1
-	; let cmd_env = CmdEnv { cmd_arr = arr_ty }
+    do  { (co, (exp_ty1, res_ty)) <- matchExpectedAppTy exp_ty 
+        ; (co1, (arr_ty, arg_ty)) <- matchExpectedAppTy exp_ty1
+        ; let cmd_env = CmdEnv { cmd_arr = arr_ty }
         ; (pat', cmd') <- tcPat ProcExpr pat arg_ty $
-			  tcCmdTop cmd_env cmd (unitTy, res_ty)
+                          tcCmdTop cmd_env cmd (unitTy, res_ty)
         ; let res_co = mkTcTransCo co (mkTcAppCo co1 (mkTcReflCo res_ty))
         ; return (pat', cmd', res_co) }
 \end{code}
 
 
 %************************************************************************
-%*									*
-		Commands
-%*									*
+%*                                                                      *
+                Commands
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -111,7 +105,7 @@ type CmdArgType = TcTauType                  -- carg_type, a nested tuple
 
 data CmdEnv
   = CmdEnv {
-	cmd_arr	:: TcType -- arrow type constructor, of kind *->*->*
+        cmd_arr :: TcType -- arrow type constructor, of kind *->*->*
     }
 
 mkCmdArrTy :: CmdEnv -> TcTauType -> TcTauType -> TcTauType
@@ -125,27 +119,27 @@ tcCmdTop :: CmdEnv
 
 tcCmdTop env (L loc (HsCmdTop cmd _ _ names)) cmd_ty@(cmd_stk, res_ty)
   = setSrcSpan loc $
-    do	{ cmd'   <- tcCmd env cmd cmd_ty
-	; names' <- mapM (tcSyntaxName ProcOrigin (cmd_arr env)) names
-	; return (L loc $ HsCmdTop cmd' cmd_stk res_ty names') }
+    do  { cmd'   <- tcCmd env cmd cmd_ty
+        ; names' <- mapM (tcSyntaxName ProcOrigin (cmd_arr env)) names
+        ; return (L loc $ HsCmdTop cmd' cmd_stk res_ty names') }
 ----------------------------------------
 tcCmd  :: CmdEnv -> LHsCmd Name -> CmdType -> TcM (LHsCmd TcId)
-	-- The main recursive function
+        -- The main recursive function
 tcCmd env (L loc cmd) res_ty
   = setSrcSpan loc $ do
-	{ cmd' <- tc_cmd env cmd res_ty
-	; return (L loc cmd') }
+        { cmd' <- tc_cmd env cmd res_ty
+        ; return (L loc cmd') }
 
 tc_cmd :: CmdEnv -> HsCmd Name  -> CmdType -> TcM (HsCmd TcId)
 tc_cmd env (HsCmdPar cmd) res_ty
-  = do	{ cmd' <- tcCmd env cmd res_ty
-	; return (HsCmdPar cmd') }
+  = do  { cmd' <- tcCmd env cmd res_ty
+        ; return (HsCmdPar cmd') }
 
 tc_cmd env (HsCmdLet binds (L body_loc body)) res_ty
-  = do	{ (binds', body') <- tcLocalBinds binds		$
-			     setSrcSpan body_loc 	$
-			     tc_cmd env body res_ty
-	; return (HsCmdLet binds' (L body_loc body')) }
+  = do  { (binds', body') <- tcLocalBinds binds         $
+                             setSrcSpan body_loc        $
+                             tc_cmd env body res_ty
+        ; return (HsCmdLet binds' (L body_loc body')) }
 
 tc_cmd env in_cmd@(HsCmdCase scrut matches) (stk, res_ty)
   = addErrCtxt (cmdCtxt in_cmd) $ do
@@ -165,25 +159,25 @@ tc_cmd env (HsCmdIf Nothing pred b1 b2) res_ty    -- Ordinary 'if'
     }
 
 tc_cmd env (HsCmdIf (Just fun) pred b1 b2) res_ty -- Rebindable syntax for if
-  = do 	{ pred_ty <- newFlexiTyVarTy openTypeKind
+  = do  { pred_ty <- newFlexiTyVarTy openTypeKind
         -- For arrows, need ifThenElse :: forall r. T -> r -> r -> r
         -- because we're going to apply it to the environment, not
         -- the return value.
         ; (_, [r_tv]) <- tcInstSkolTyVars [alphaTyVar]
-	; let r_ty = mkTyVarTy r_tv
+        ; let r_ty = mkTyVarTy r_tv
         ; let if_ty = mkFunTys [pred_ty, r_ty, r_ty] r_ty
         ; checkTc (not (r_tv `elemVarSet` tyVarsOfType pred_ty))
                   (ptext (sLit "Predicate type of `ifThenElse' depends on result type"))
-	; fun'  <- tcSyntaxOp IfOrigin fun if_ty
-  	; pred' <- tcMonoExpr pred pred_ty
-	; b1'   <- tcCmd env b1 res_ty
-	; b2'   <- tcCmd env b2 res_ty
+        ; fun'  <- tcSyntaxOp IfOrigin fun if_ty
+        ; pred' <- tcMonoExpr pred pred_ty
+        ; b1'   <- tcCmd env b1 res_ty
+        ; b2'   <- tcCmd env b2 res_ty
         ; return (HsCmdIf (Just fun') pred' b1' b2')
     }
 
 -------------------------------------------
--- 		Arrow application
---     	    (f -< a)   or   (f -<< a)
+--              Arrow application
+--          (f -< a)   or   (f -<< a)
 --
 --   D   |- fun :: a t1 t2
 --   D,G |- arg :: t1
@@ -198,16 +192,16 @@ tc_cmd env (HsCmdIf (Just fun) pred b1 b2) res_ty -- Rebindable syntax for if
 -- (plus -<< requires ArrowApply)
 
 tc_cmd env cmd@(HsCmdArrApp fun arg _ ho_app lr) (_, res_ty)
-  = addErrCtxt (cmdCtxt cmd)	$
+  = addErrCtxt (cmdCtxt cmd)    $
     do  { arg_ty <- newFlexiTyVarTy openTypeKind
-	; let fun_ty = mkCmdArrTy env arg_ty res_ty
-	; fun' <- select_arrow_scope (tcMonoExpr fun fun_ty)
+        ; let fun_ty = mkCmdArrTy env arg_ty res_ty
+        ; fun' <- select_arrow_scope (tcMonoExpr fun fun_ty)
              -- ToDo: There should be no need for the escapeArrowScope stuff
              -- See Note [Escaping the arrow scope] in TcRnTypes
 
-	; arg' <- tcMonoExpr arg arg_ty
+        ; arg' <- tcMonoExpr arg arg_ty
 
-	; return (HsCmdArrApp fun' arg' fun_ty ho_app lr) }
+        ; return (HsCmdArrApp fun' arg' fun_ty ho_app lr) }
   where
        -- Before type-checking f, use the environment of the enclosing
        -- proc for the (-<) case.  
@@ -218,7 +212,7 @@ tc_cmd env cmd@(HsCmdArrApp fun arg _ ho_app lr) (_, res_ty)
         HsFirstOrderApp  -> escapeArrowScope tc
 
 -------------------------------------------
--- 		Command application
+--              Command application
 --
 -- D,G |-  exp : t
 -- D;G |-a cmd : (t,stk) --> res
@@ -226,14 +220,14 @@ tc_cmd env cmd@(HsCmdArrApp fun arg _ ho_app lr) (_, res_ty)
 -- D;G |-a cmd exp : stk --> res
 
 tc_cmd env cmd@(HsCmdApp fun arg) (cmd_stk, res_ty)
-  = addErrCtxt (cmdCtxt cmd)	$
+  = addErrCtxt (cmdCtxt cmd)    $
     do  { arg_ty <- newFlexiTyVarTy openTypeKind
-	; fun'   <- tcCmd env fun (mkPairTy arg_ty cmd_stk, res_ty)
-	; arg'   <- tcMonoExpr arg arg_ty
-	; return (HsCmdApp fun' arg') }
+        ; fun'   <- tcCmd env fun (mkPairTy arg_ty cmd_stk, res_ty)
+        ; arg'   <- tcMonoExpr arg arg_ty
+        ; return (HsCmdApp fun' arg') }
 
 -------------------------------------------
--- 		Lambda
+--              Lambda
 --
 -- D;G,x:t |-a cmd : stk --> res
 -- ------------------------------
@@ -242,60 +236,60 @@ tc_cmd env cmd@(HsCmdApp fun arg) (cmd_stk, res_ty)
 tc_cmd env 
        (HsCmdLam (MG { mg_alts = [L mtch_loc (match@(Match pats _maybe_rhs_sig grhss))] }))
        (cmd_stk, res_ty)
-  = addErrCtxt (pprMatchInCtxt match_ctxt match)	$
-    do	{ (co, arg_tys, cmd_stk') <- matchExpectedCmdArgs n_pats cmd_stk
+  = addErrCtxt (pprMatchInCtxt match_ctxt match)        $
+    do  { (co, arg_tys, cmd_stk') <- matchExpectedCmdArgs n_pats cmd_stk
 
-		-- Check the patterns, and the GRHSs inside
-	; (pats', grhss') <- setSrcSpan mtch_loc		$
+                -- Check the patterns, and the GRHSs inside
+        ; (pats', grhss') <- setSrcSpan mtch_loc                $
                              tcPats LambdaExpr pats arg_tys     $
                              tc_grhss grhss cmd_stk' res_ty
 
-	; let match' = L mtch_loc (Match pats' Nothing grhss')
+        ; let match' = L mtch_loc (Match pats' Nothing grhss')
               arg_tys = map hsLPatType pats'
               cmd' = HsCmdLam (MG { mg_alts = [match'], mg_arg_tys = arg_tys
                                   , mg_res_ty = res_ty })
-	; return (mkHsCmdCast co cmd') }
+        ; return (mkHsCmdCast co cmd') }
   where
     n_pats     = length pats
-    match_ctxt = (LambdaExpr :: HsMatchContext Name)	-- Maybe KappaExpr?
+    match_ctxt = (LambdaExpr :: HsMatchContext Name)    -- Maybe KappaExpr?
     pg_ctxt    = PatGuard match_ctxt
 
     tc_grhss (GRHSs grhss binds) stk_ty res_ty
-	= do { (binds', grhss') <- tcLocalBinds binds $
-				   mapM (wrapLocM (tc_grhs stk_ty res_ty)) grhss
-	     ; return (GRHSs grhss' binds') }
+        = do { (binds', grhss') <- tcLocalBinds binds $
+                                   mapM (wrapLocM (tc_grhs stk_ty res_ty)) grhss
+             ; return (GRHSs grhss' binds') }
 
     tc_grhs stk_ty res_ty (GRHS guards body)
-	= do { (guards', rhs') <- tcStmtsAndThen pg_ctxt tcGuardStmt guards res_ty $
-				  \ res_ty -> tcCmd env body (stk_ty, res_ty)
-	     ; return (GRHS guards' rhs') }
+        = do { (guards', rhs') <- tcStmtsAndThen pg_ctxt tcGuardStmt guards res_ty $
+                                  \ res_ty -> tcCmd env body (stk_ty, res_ty)
+             ; return (GRHS guards' rhs') }
 
 -------------------------------------------
--- 		Do notation
+--              Do notation
 
 tc_cmd env (HsCmdDo stmts _) (cmd_stk, res_ty)
-  = do 	{ co <- unifyType unitTy cmd_stk  -- Expecting empty argument stack
-	; stmts' <- tcStmts ArrowExpr (tcArrDoStmt env) stmts res_ty 
-	; return (mkHsCmdCast co (HsCmdDo stmts' res_ty)) }
+  = do  { co <- unifyType unitTy cmd_stk  -- Expecting empty argument stack
+        ; stmts' <- tcStmts ArrowExpr (tcArrDoStmt env) stmts res_ty 
+        ; return (mkHsCmdCast co (HsCmdDo stmts' res_ty)) }
 
 
 -----------------------------------------------------------------
---	Arrow ``forms''	      (| e c1 .. cn |)
+--      Arrow ``forms''       (| e c1 .. cn |)
 --
---	D; G |-a1 c1 : stk1 --> r1
---	...
---	D; G |-an cn : stkn --> rn
---	D |-  e :: forall e. a1 (e, stk1) t1
+--      D; G |-a1 c1 : stk1 --> r1
+--      ...
+--      D; G |-an cn : stkn --> rn
+--      D |-  e :: forall e. a1 (e, stk1) t1
 --                                ...
 --                        -> an (e, stkn) tn
 --                        -> a  (e, stk) t
---	e \not\in (stk, stk1, ..., stkm, t, t1, ..., tn)
---	----------------------------------------------
---	D; G |-a  (| e c1 ... cn |)  :  stk --> t
+--      e \not\in (stk, stk1, ..., stkm, t, t1, ..., tn)
+--      ----------------------------------------------
+--      D; G |-a  (| e c1 ... cn |)  :  stk --> t
 
-tc_cmd env cmd@(HsCmdArrForm expr fixity cmd_args) (cmd_stk, res_ty)	
-  = addErrCtxt (cmdCtxt cmd)	$
-    do	{ (cmd_args', cmd_tys) <- mapAndUnzipM tc_cmd_arg cmd_args
+tc_cmd env cmd@(HsCmdArrForm expr fixity cmd_args) (cmd_stk, res_ty)    
+  = addErrCtxt (cmdCtxt cmd)    $
+    do  { (cmd_args', cmd_tys) <- mapAndUnzipM tc_cmd_arg cmd_args
         ; let e_ty = mkForAllTy alphaTyVar $   -- We use alphaTyVar for 'w'
                      mkFunTys cmd_tys $
                      mkCmdArrTy env (mkPairTy alphaTy cmd_stk) res_ty
@@ -306,19 +300,19 @@ tc_cmd env cmd@(HsCmdArrForm expr fixity cmd_args) (cmd_stk, res_ty)
     tc_cmd_arg :: LHsCmdTop Name -> TcM (LHsCmdTop TcId, TcType)
     tc_cmd_arg cmd
        = do { arr_ty <- newFlexiTyVarTy arrowTyConKind
-	    ; stk_ty <- newFlexiTyVarTy liftedTypeKind
-	    ; res_ty <- newFlexiTyVarTy liftedTypeKind
-	    ; let env' = env { cmd_arr = arr_ty }
-	    ; cmd' <- tcCmdTop env' cmd (stk_ty, res_ty)
-	    ; return (cmd',  mkCmdArrTy env' (mkPairTy alphaTy stk_ty) res_ty) }
+            ; stk_ty <- newFlexiTyVarTy liftedTypeKind
+            ; res_ty <- newFlexiTyVarTy liftedTypeKind
+            ; let env' = env { cmd_arr = arr_ty }
+            ; cmd' <- tcCmdTop env' cmd (stk_ty, res_ty)
+            ; return (cmd',  mkCmdArrTy env' (mkPairTy alphaTy stk_ty) res_ty) }
 
 -----------------------------------------------------------------
---		Base case for illegal commands
+--              Base case for illegal commands
 -- This is where expressions that aren't commands get rejected
 
 tc_cmd _ cmd _
   = failWithTc (vcat [ptext (sLit "The expression"), nest 2 (ppr cmd), 
-		      ptext (sLit "was found where an arrow command was expected")])
+                      ptext (sLit "was found where an arrow command was expected")])
 
 
 matchExpectedCmdArgs :: Arity -> TcType -> TcM (TcCoercion, [TcType], TcType)
@@ -332,34 +326,34 @@ matchExpectedCmdArgs n ty
 
 
 %************************************************************************
-%*									*
-		Stmts
-%*									*
+%*                                                                      *
+                Stmts
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 --------------------------------
---	Mdo-notation
+--      Mdo-notation
 -- The distinctive features here are
---	(a) RecStmts, and
---	(b) no rebindable syntax
+--      (a) RecStmts, and
+--      (b) no rebindable syntax
 
 tcArrDoStmt :: CmdEnv -> TcCmdStmtChecker
 tcArrDoStmt env _ (LastStmt rhs _) res_ty thing_inside
-  = do	{ rhs' <- tcCmd env rhs (unitTy, res_ty)
-	; thing <- thing_inside (panic "tcArrDoStmt")
-	; return (LastStmt rhs' noSyntaxExpr, thing) }
+  = do  { rhs' <- tcCmd env rhs (unitTy, res_ty)
+        ; thing <- thing_inside (panic "tcArrDoStmt")
+        ; return (LastStmt rhs' noSyntaxExpr, thing) }
 
 tcArrDoStmt env _ (BodyStmt rhs _ _ _) res_ty thing_inside
-  = do	{ (rhs', elt_ty) <- tc_arr_rhs env rhs
-	; thing 	 <- thing_inside res_ty
-	; return (BodyStmt rhs' noSyntaxExpr noSyntaxExpr elt_ty, thing) }
+  = do  { (rhs', elt_ty) <- tc_arr_rhs env rhs
+        ; thing          <- thing_inside res_ty
+        ; return (BodyStmt rhs' noSyntaxExpr noSyntaxExpr elt_ty, thing) }
 
 tcArrDoStmt env ctxt (BindStmt pat rhs _ _) res_ty thing_inside
-  = do	{ (rhs', pat_ty) <- tc_arr_rhs env rhs
-	; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat pat_ty $
+  = do  { (rhs', pat_ty) <- tc_arr_rhs env rhs
+        ; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat pat_ty $
                             thing_inside res_ty
-	; return (BindStmt pat' rhs' noSyntaxExpr noSyntaxExpr, thing) }
+        ; return (BindStmt pat' rhs' noSyntaxExpr noSyntaxExpr, thing) }
 
 tcArrDoStmt env ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names
                             , recS_rec_ids = rec_names }) res_ty thing_inside
@@ -368,15 +362,15 @@ tcArrDoStmt env ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names
         ; let tup_ids = zipWith mkLocalId tup_names tup_elt_tys
         ; tcExtendIdEnv tup_ids $ do
         { (stmts', tup_rets)
-		<- tcStmtsAndThen ctxt (tcArrDoStmt env) stmts res_ty	$ \ _res_ty' ->
-			-- ToDo: res_ty not really right
+                <- tcStmtsAndThen ctxt (tcArrDoStmt env) stmts res_ty   $ \ _res_ty' ->
+                        -- ToDo: res_ty not really right
                    zipWithM tcCheckId tup_names tup_elt_tys
 
         ; thing <- thing_inside res_ty
-		-- NB:	The rec_ids for the recursive things 
-		-- 	already scope over this part. This binding may shadow
-		--	some of them with polymorphic things with the same Name
-		--	(see note [RecStmt] in HsExpr)
+                -- NB:  The rec_ids for the recursive things 
+                --      already scope over this part. This binding may shadow
+                --      some of them with polymorphic things with the same Name
+                --      (see note [RecStmt] in HsExpr)
 
         ; let rec_ids = takeList rec_names tup_ids
         ; later_ids <- tcLookupLocalIds later_names
@@ -389,22 +383,22 @@ tcArrDoStmt env ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names
                                , recS_later_rets = later_rets
                                , recS_rec_ids = rec_ids, recS_rec_rets = rec_rets
                                , recS_ret_ty = res_ty }, thing)
-	}}
+        }}
 
 tcArrDoStmt _ _ stmt _ _
   = pprPanic "tcArrDoStmt: unexpected Stmt" (ppr stmt)
 
 tc_arr_rhs :: CmdEnv -> LHsCmd Name -> TcM (LHsCmd TcId, TcType)
 tc_arr_rhs env rhs = do { ty <- newFlexiTyVarTy liftedTypeKind
-		        ; rhs' <- tcCmd env rhs (unitTy, ty)
-		        ; return (rhs', ty) }
+                        ; rhs' <- tcCmd env rhs (unitTy, ty)
+                        ; return (rhs', ty) }
 \end{code}
 
 
 %************************************************************************
-%*									*
-		Helpers
-%*									*
+%*                                                                      *
+                Helpers
+%*                                                                      *
 %************************************************************************
 
 
@@ -412,15 +406,15 @@ tc_arr_rhs env rhs = do { ty <- newFlexiTyVarTy liftedTypeKind
 mkPairTy :: Type -> Type -> Type
 mkPairTy t1 t2 = mkTyConApp pairTyCon [t1,t2]
 
-arrowTyConKind :: Kind		--  *->*->*
+arrowTyConKind :: Kind          --  *->*->*
 arrowTyConKind = mkArrowKinds [liftedTypeKind, liftedTypeKind] liftedTypeKind
 \end{code}
 
 
 %************************************************************************
-%*									*
-		Errors
-%*									*
+%*                                                                      *
+                Errors
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/typecheck/TcCanonical.lhs b/compiler/typecheck/TcCanonical.lhs
index 2aae1d1..8166ad0 100644
--- a/compiler/typecheck/TcCanonical.lhs
+++ b/compiler/typecheck/TcCanonical.lhs
@@ -1,10 +1,4 @@
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcCanonical(
     canonicalize, emitWorkNC,
@@ -517,13 +511,13 @@ flatten loc f ctxt (TyConApp tc tys)
   -- flatten it away as well, and generate a new given equality constraint
   -- between the application and a newly generated flattening skolem variable.
   | otherwise
-  = ASSERT( tyConArity tc <= length tys )	-- Type functions are saturated
+  = ASSERT( tyConArity tc <= length tys )       -- Type functions are saturated
       do { (xis, cos) <- flattenMany loc f ctxt tys
          ; let (xi_args,  xi_rest)  = splitAt (tyConArity tc) xis
                (cos_args, cos_rest) = splitAt (tyConArity tc) cos
-	       	 -- The type function might be *over* saturated
-		 -- in which case the remaining arguments should
-		 -- be dealt with by AppTys
+                 -- The type function might be *over* saturated
+                 -- in which case the remaining arguments should
+                 -- be dealt with by AppTys
                fam_ty = mkTyConApp tc xi_args
                
          ; (ret_co, rhs_xi) <-
@@ -604,7 +598,7 @@ flattenTyVar, flattenFinalTyVar
 -- for the unification variables that have been unified already with the inert
 -- equalities, see Note [Spontaneously solved in TyBinds] in TcInteract.
 flattenTyVar loc f ctxt tv
-  | not (isTcTyVar tv)	              -- Happens when flatten under a (forall a. ty)
+  | not (isTcTyVar tv)                -- Happens when flatten under a (forall a. ty)
   = flattenFinalTyVar loc f ctxt tv   -- So ty contains referneces to the non-TcTyVar a
   | otherwise
   = do { mb_ty <- isFilledMetaTyVar_maybe tv
@@ -712,8 +706,8 @@ emitWorkNC loc evs
 canEqNC :: CtLoc -> CtEvidence -> Type -> Type -> TcS StopOrContinue
 
 canEqNC _loc ev ty1 ty2
-  | eqType ty1 ty2	-- Dealing with equality here avoids
-    	     	 	-- later spurious occurs checks for a~a
+  | eqType ty1 ty2      -- Dealing with equality here avoids
+                        -- later spurious occurs checks for a~a
   = if isWanted ev then
       setEvBind (ctev_evar ev) (EvCoercion (mkTcReflCo ty1)) >> return Stop
     else
@@ -783,11 +777,11 @@ canEqNC loc ev ty1 ty2
       | Just (s1,t1) <- tcSplitAppTy_maybe ty1
       , Just (s2,t2) <- tcSplitAppTy_maybe ty2
       = do { let xevcomp [x,y] = EvCoercion (mkTcAppCo (evTermCoercion x) (evTermCoercion y))
-             	 xevcomp _ = error "canEqAppTy: can't happen" -- Can't happen
-             	 xevdecomp x = let xco = evTermCoercion x 
-       	                       in [EvCoercion (mkTcLRCo CLeft xco), EvCoercion (mkTcLRCo CRight xco)]
-       	   ; ctevs <- xCtFlavor ev [mkTcEqPred s1 s2, mkTcEqPred t1 t2] (XEvTerm xevcomp xevdecomp)
-       	   ; canEvVarsCreated loc ctevs }
+                 xevcomp _ = error "canEqAppTy: can't happen" -- Can't happen
+                 xevdecomp x = let xco = evTermCoercion x 
+                               in [EvCoercion (mkTcLRCo CLeft xco), EvCoercion (mkTcLRCo CRight xco)]
+           ; ctevs <- xCtFlavor ev [mkTcEqPred s1 s2, mkTcEqPred t1 t2] (XEvTerm xevcomp xevdecomp)
+           ; canEvVarsCreated loc ctevs }
 
       | otherwise
       = do { emitInsoluble (CNonCanonical { cc_ev = ev, cc_loc = loc })
@@ -995,14 +989,14 @@ classify (TyConApp tc tys) | isSynFamilyTyCon tc
                            , tyConArity tc == length tys
                            = FunCls tc tys
 classify ty                | Just ty' <- tcView ty
-	                   = case classify ty' of
+                           = case classify ty' of
                                OtherCls {} -> OtherCls ty
                                var_or_fn   -> var_or_fn
                            | otherwise 
                            = OtherCls ty
 
 -- See note [Canonical ordering for equality constraints].
-reOrient :: TypeClassifier -> TypeClassifier -> Bool	
+reOrient :: TypeClassifier -> TypeClassifier -> Bool    
 -- (t1 `reOrient` t2) responds True 
 --   iff we should flip to (t2~t1)
 -- We try to say False if possible, to minimise evidence generation
diff --git a/compiler/typecheck/TcClassDcl.lhs b/compiler/typecheck/TcClassDcl.lhs
index 835043a..7dd051b 100644
--- a/compiler/typecheck/TcClassDcl.lhs
+++ b/compiler/typecheck/TcClassDcl.lhs
@@ -6,19 +6,13 @@
 Typechecking class declarations
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcClassDcl ( tcClassSigs, tcClassDecl2, 
-		    findMethodBind, instantiateMethod, tcInstanceMethodBody,
-		    tcClassMinimalDef,
+                    findMethodBind, instantiateMethod, tcInstanceMethodBody,
+                    tcClassMinimalDef,
                     HsSigFun, mkHsSigFun, lookupHsSig, emptyHsSigs,
-		    tcMkDeclCtxt, tcAddDeclCtxt, badMethodErr
-		  ) where
+                    tcMkDeclCtxt, tcAddDeclCtxt, badMethodErr
+                  ) where
 
 #include "HsVersions.h"
 
@@ -58,45 +52,45 @@ Dictionary handling
 Every class implicitly declares a new data type, corresponding to dictionaries
 of that class. So, for example:
 
-	class (D a) => C a where
-	  op1 :: a -> a
-	  op2 :: forall b. Ord b => a -> b -> b
+        class (D a) => C a where
+          op1 :: a -> a
+          op2 :: forall b. Ord b => a -> b -> b
 
 would implicitly declare
 
-	data CDict a = CDict (D a)	
-			     (a -> a)
-			     (forall b. Ord b => a -> b -> b)
+        data CDict a = CDict (D a)      
+                             (a -> a)
+                             (forall b. Ord b => a -> b -> b)
 
 (We could use a record decl, but that means changing more of the existing apparatus.
 One step at at time!)
 
 For classes with just one superclass+method, we use a newtype decl instead:
 
-	class C a where
-	  op :: forallb. a -> b -> b
+        class C a where
+          op :: forallb. a -> b -> b
 
 generates
 
-	newtype CDict a = CDict (forall b. a -> b -> b)
+        newtype CDict a = CDict (forall b. a -> b -> b)
 
 Now DictTy in Type is just a form of type synomym: 
-	DictTy c t = TyConTy CDict `AppTy` t
+        DictTy c t = TyConTy CDict `AppTy` t
 
 Death to "ExpandingDicts".
 
 
 %************************************************************************
-%*									*
-		Type-checking the class op signatures
-%*									*
+%*                                                                      *
+                Type-checking the class op signatures
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-tcClassSigs :: Name	             -- Name of the class
-	    -> [LSig Name]
-	    -> LHsBinds Name
-	    -> TcM ([TcMethInfo],    -- Exactly one for each method
+tcClassSigs :: Name                  -- Name of the class
+            -> [LSig Name]
+            -> LHsBinds Name
+            -> TcM ([TcMethInfo],    -- Exactly one for each method
                     NameEnv Type)    -- Types of the generic-default methods
 tcClassSigs clas sigs def_methods
   = do { traceTc "tcClassSigs 1" (ppr clas)
@@ -109,23 +103,23 @@ tcClassSigs clas sigs def_methods
        ; let op_names = mkNameSet [ n | (n,_,_) <- op_info ]
        ; sequence_ [ failWithTc (badMethodErr clas n)
                    | n <- dm_bind_names, not (n `elemNameSet` op_names) ]
-		   -- Value binding for non class-method (ie no TypeSig)
+                   -- Value binding for non class-method (ie no TypeSig)
 
        ; sequence_ [ failWithTc (badGenericMethod clas n)
                    | (n,_) <- gen_dm_prs, not (n `elem` dm_bind_names) ]
-		   -- Generic signature without value binding
+                   -- Generic signature without value binding
 
        ; traceTc "tcClassSigs 2" (ppr clas)
        ; return (op_info, gen_dm_env) }
   where
     vanilla_sigs = [L loc (nm,ty) | L loc (TypeSig    nm ty) <- sigs]
     gen_sigs     = [L loc (nm,ty) | L loc (GenericSig nm ty) <- sigs]
-    dm_bind_names :: [Name]	-- These ones have a value binding in the class decl
+    dm_bind_names :: [Name]     -- These ones have a value binding in the class decl
     dm_bind_names = [op | L _ (FunBind {fun_id = L _ op}) <- bagToList def_methods]
 
     tc_sig genop_env (op_names, op_hs_ty)
       = do { traceTc "ClsSig 1" (ppr op_names)
-           ; op_ty <- tcClassSigType op_hs_ty	-- Class tyvars already in scope
+           ; op_ty <- tcClassSigType op_hs_ty   -- Class tyvars already in scope
            ; traceTc "ClsSig 2" (ppr op_names)
            ; return [ (op_name, f op_name, op_ty) | L _ op_name <- op_names ] }
            where
@@ -140,46 +134,46 @@ tcClassSigs clas sigs def_methods
 
 
 %************************************************************************
-%*									*
-		Class Declarations
-%*									*
+%*                                                                      *
+                Class Declarations
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-tcClassDecl2 :: LTyClDecl Name		-- The class declaration
-	     -> TcM (LHsBinds Id)
+tcClassDecl2 :: LTyClDecl Name          -- The class declaration
+             -> TcM (LHsBinds Id)
 
 tcClassDecl2 (L loc (ClassDecl {tcdLName = class_name, tcdSigs = sigs, 
-				tcdMeths = default_binds}))
-  = recoverM (return emptyLHsBinds)	$
-    setSrcSpan loc		   	$
+                                tcdMeths = default_binds}))
+  = recoverM (return emptyLHsBinds)     $
+    setSrcSpan loc                      $
     do  { clas <- tcLookupLocatedClass class_name
 
-	-- We make a separate binding for each default method.
-	-- At one time I used a single AbsBinds for all of them, thus
-	-- AbsBind [d] [dm1, dm2, dm3] { dm1 = ...; dm2 = ...; dm3 = ... }
-	-- But that desugars into
-	--	ds = \d -> (..., ..., ...)
-	--	dm1 = \d -> case ds d of (a,b,c) -> a
-	-- And since ds is big, it doesn't get inlined, so we don't get good
-	-- default methods.  Better to make separate AbsBinds for each
-	; let
-	      (tyvars, _, _, op_items) = classBigSig clas
+        -- We make a separate binding for each default method.
+        -- At one time I used a single AbsBinds for all of them, thus
+        -- AbsBind [d] [dm1, dm2, dm3] { dm1 = ...; dm2 = ...; dm3 = ... }
+        -- But that desugars into
+        --      ds = \d -> (..., ..., ...)
+        --      dm1 = \d -> case ds d of (a,b,c) -> a
+        -- And since ds is big, it doesn't get inlined, so we don't get good
+        -- default methods.  Better to make separate AbsBinds for each
+        ; let
+              (tyvars, _, _, op_items) = classBigSig clas
               prag_fn     = mkPragFun sigs default_binds
-	      sig_fn	  = mkHsSigFun sigs
+              sig_fn      = mkHsSigFun sigs
               clas_tyvars = snd (tcSuperSkolTyVars tyvars)
-	      pred  	  = mkClassPred clas (mkTyVarTys clas_tyvars)
-	; this_dict <- newEvVar pred
+              pred        = mkClassPred clas (mkTyVarTys clas_tyvars)
+        ; this_dict <- newEvVar pred
 
-	; traceTc "TIM2" (ppr sigs)
-	; let tc_dm = tcDefMeth clas clas_tyvars
-				this_dict default_binds 
-	      			sig_fn prag_fn
+        ; traceTc "TIM2" (ppr sigs)
+        ; let tc_dm = tcDefMeth clas clas_tyvars
+                                this_dict default_binds 
+                                sig_fn prag_fn
 
-	; dm_binds <- tcExtendTyVarEnv clas_tyvars $
+        ; dm_binds <- tcExtendTyVarEnv clas_tyvars $
                       mapM tc_dm op_items
 
-	; return (unionManyBags dm_binds) }
+        ; return (unionManyBags dm_binds) }
 
 tcClassDecl2 d = pprPanic "tcClassDecl2" (ppr d)
     
@@ -202,20 +196,20 @@ tcDefMeth clas tyvars this_dict binds_in hs_sig_fn prag_fn (sel_id, dm_info)
     sel_name           = idName sel_id
     prags              = prag_fn sel_name
     (dm_bind,bndr_loc) = findMethodBind sel_name binds_in
-	                 `orElse` pprPanic "tcDefMeth" (ppr sel_id)
+                         `orElse` pprPanic "tcDefMeth" (ppr sel_id)
 
     -- Eg.   class C a where
     --          op :: forall b. Eq b => a -> [b] -> a
-    --		gen_op :: a -> a
-    -- 		generic gen_op :: D a => a -> a
+    --          gen_op :: a -> a
+    --          generic gen_op :: D a => a -> a
     -- The "local_dm_ty" is precisely the type in the above
     -- type signatures, ie with no "forall a. C a =>" prefix
 
     tc_dm dm_name 
       = do { dm_id <- tcLookupId dm_name
-	   ; local_dm_name <- setSrcSpan bndr_loc (newLocalName sel_name)
- 	     -- Base the local_dm_name on the selector name, because
- 	     -- type errors from tcInstanceMethodBody come from here
+           ; local_dm_name <- setSrcSpan bndr_loc (newLocalName sel_name)
+             -- Base the local_dm_name on the selector name, because
+             -- type errors from tcInstanceMethodBody come from here
 
            ; dm_id_w_inline <- addInlinePrags dm_id prags
            ; spec_prags     <- tcSpecPrags dm_id prags
@@ -238,18 +232,18 @@ tcDefMeth clas tyvars this_dict binds_in hs_sig_fn prag_fn (sel_id, dm_info)
 ---------------
 tcInstanceMethodBody :: SkolemInfo -> [TcTyVar] -> [EvVar]
                      -> Id -> TcSigInfo
-          	     -> TcSpecPrags -> LHsBind Name 
-          	     -> TcM (LHsBind Id)
+                     -> TcSpecPrags -> LHsBind Name 
+                     -> TcM (LHsBind Id)
 tcInstanceMethodBody skol_info tyvars dfun_ev_vars
                      meth_id local_meth_sig
-		     specs (L loc bind)
-  = do	{ let local_meth_id = sig_id local_meth_sig
+                     specs (L loc bind)
+  = do  { let local_meth_id = sig_id local_meth_sig
               lm_bind = L loc (bind { fun_id = L loc (idName local_meth_id) })
                              -- Substitute the local_meth_name for the binder
-			     -- NB: the binding is always a FunBind
-	; (ev_binds, (tc_bind, _, _)) 
+                             -- NB: the binding is always a FunBind
+        ; (ev_binds, (tc_bind, _, _)) 
                <- checkConstraints skol_info tyvars dfun_ev_vars $
-	          tcPolyCheck NonRecursive no_prag_fn local_meth_sig [lm_bind]
+                  tcPolyCheck NonRecursive no_prag_fn local_meth_sig [lm_bind]
 
         ; let export = ABE { abe_wrap = idHsWrapper, abe_poly = meth_id
                            , abe_mono = local_meth_id, abe_prags = specs }
@@ -260,8 +254,8 @@ tcInstanceMethodBody skol_info tyvars dfun_ev_vars
 
         ; return (L loc full_bind) } 
   where
-    no_prag_fn  _ = []		-- No pragmas for local_meth_id; 
-    		    		-- they are all for meth_id
+    no_prag_fn  _ = []          -- No pragmas for local_meth_id; 
+                                -- they are all for meth_id
 
 ---------------
 tcClassMinimalDef :: Name -> [LSig Name] -> [TcMethInfo] -> TcM ClassMinimalDef
@@ -288,25 +282,25 @@ tcClassMinimalDef _clas sigs op_info
 \begin{code}
 instantiateMethod :: Class -> Id -> [TcType] -> TcType
 -- Take a class operation, say  
---	op :: forall ab. C a => forall c. Ix c => (b,c) -> a
+--      op :: forall ab. C a => forall c. Ix c => (b,c) -> a
 -- Instantiate it at [ty1,ty2]
 -- Return the "local method type": 
---	forall c. Ix x => (ty2,c) -> ty1
+--      forall c. Ix x => (ty2,c) -> ty1
 instantiateMethod clas sel_id inst_tys
   = ASSERT( ok_first_pred ) local_meth_ty
   where
     (sel_tyvars,sel_rho) = tcSplitForAllTys (idType sel_id)
     rho_ty = ASSERT( length sel_tyvars == length inst_tys )
-    	     substTyWith sel_tyvars inst_tys sel_rho
+             substTyWith sel_tyvars inst_tys sel_rho
 
     (first_pred, local_meth_ty) = tcSplitPredFunTy_maybe rho_ty
-    		`orElse` pprPanic "tcInstanceMethod" (ppr sel_id)
+                `orElse` pprPanic "tcInstanceMethod" (ppr sel_id)
 
     ok_first_pred = case getClassPredTys_maybe first_pred of
-		      Just (clas1, _tys) -> clas == clas1
+                      Just (clas1, _tys) -> clas == clas1
                       Nothing -> False
-	      -- The first predicate should be of form (C a b)
-	      -- where C is the class in question
+              -- The first predicate should be of form (C a b)
+              -- where C is the class in question
 
 
 ---------------------------
@@ -324,17 +318,17 @@ lookupHsSig :: HsSigFun -> Name -> Maybe (LHsType Name)
 lookupHsSig = lookupNameEnv
 
 ---------------------------
-findMethodBind	:: Name  	        -- Selector name
-          	-> LHsBinds Name 	-- A group of bindings
-		-> Maybe (LHsBind Name, SrcSpan)
-          	-- Returns the binding, and the binding 
+findMethodBind  :: Name                 -- Selector name
+                -> LHsBinds Name        -- A group of bindings
+                -> Maybe (LHsBind Name, SrcSpan)
+                -- Returns the binding, and the binding 
                 -- site of the method binder
 findMethodBind sel_name binds
   = foldlBag mplus Nothing (mapBag f binds)
   where 
     f bind@(L _ (FunBind { fun_id = L bndr_loc op_name }))
              | op_name == sel_name
-    	     = Just (bind, bndr_loc)
+             = Just (bind, bndr_loc)
     f _other = Nothing
 
 ---------------------------
@@ -349,7 +343,7 @@ Note [Polymorphic methods]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider
     class Foo a where
-	op :: forall b. Ord b => a -> b -> b -> b
+        op :: forall b. Ord b => a -> b -> b -> b
     instance Foo c => Foo [c] where
         op = e
 
@@ -364,18 +358,18 @@ Note [Silly default-method bind]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 When we pass the default method binding to the type checker, it must
 look like    op2 = e
-not  	     $dmop2 = e
+not          $dmop2 = e
 otherwise the "$dm" stuff comes out error messages.  But we want the
 "$dm" to come out in the interface file.  So we typecheck the former,
 and wrap it in a let, thus
-	  $dmop2 = let op2 = e in op2
+          $dmop2 = let op2 = e in op2
 This makes the error messages right.
 
 
 %************************************************************************
-%*									*
-		Error messages
-%*									*
+%*                                                                      *
+                Error messages
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -390,28 +384,28 @@ tcAddDeclCtxt decl thing_inside
 badMethodErr :: Outputable a => a -> Name -> SDoc
 badMethodErr clas op
   = hsep [ptext (sLit "Class"), quotes (ppr clas), 
-	  ptext (sLit "does not have a method"), quotes (ppr op)]
+          ptext (sLit "does not have a method"), quotes (ppr op)]
 
 badGenericMethod :: Outputable a => a -> Name -> SDoc
 badGenericMethod clas op
   = hsep [ptext (sLit "Class"), quotes (ppr clas), 
-	  ptext (sLit "has a generic-default signature without a binding"), quotes (ppr op)]
+          ptext (sLit "has a generic-default signature without a binding"), quotes (ppr op)]
 
 {-
 badGenericInstanceType :: LHsBinds Name -> SDoc
 badGenericInstanceType binds
   = vcat [ptext (sLit "Illegal type pattern in the generic bindings"),
-	  nest 2 (ppr binds)]
+          nest 2 (ppr binds)]
 
 missingGenericInstances :: [Name] -> SDoc
 missingGenericInstances missing
   = ptext (sLit "Missing type patterns for") <+> pprQuotedList missing
-	  
+          
 dupGenericInsts :: [(TyCon, InstInfo a)] -> SDoc
 dupGenericInsts tc_inst_infos
   = vcat [ptext (sLit "More than one type pattern for a single generic type constructor:"),
-	  nest 2 (vcat (map ppr_inst_ty tc_inst_infos)),
-	  ptext (sLit "All the type patterns for a generic type constructor must be identical")
+          nest 2 (vcat (map ppr_inst_ty tc_inst_infos)),
+          ptext (sLit "All the type patterns for a generic type constructor must be identical")
     ]
   where 
     ppr_inst_ty (_,inst) = ppr (simpleInstInfoTy inst)
diff --git a/compiler/typecheck/TcDefaults.lhs b/compiler/typecheck/TcDefaults.lhs
index d05a948..853701c 100644
--- a/compiler/typecheck/TcDefaults.lhs
+++ b/compiler/typecheck/TcDefaults.lhs
@@ -5,12 +5,6 @@
 \section[TcDefaults]{Typechecking \tr{default} declarations}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcDefaults ( tcDefaults ) where
 
@@ -32,37 +26,37 @@ import FastString
 
 \begin{code}
 tcDefaults :: [LDefaultDecl Name]
-	   -> TcM (Maybe [Type])    -- Defaulting types to heave
-				    -- into Tc monad for later use
-				    -- in Disambig.
+           -> TcM (Maybe [Type])    -- Defaulting types to heave
+                                    -- into Tc monad for later use
+                                    -- in Disambig.
 
 tcDefaults [] 
-  = getDeclaredDefaultTys	-- No default declaration, so get the
-				-- default types from the envt; 
-				-- i.e. use the curent ones
-				-- (the caller will put them back there)
-	-- It's important not to return defaultDefaultTys here (which
-	-- we used to do) because in a TH program, tcDefaults [] is called
-	-- repeatedly, once for each group of declarations between top-level
-	-- splices.  We don't want to carefully set the default types in
-	-- one group, only for the next group to ignore them and install
-	-- defaultDefaultTys
+  = getDeclaredDefaultTys       -- No default declaration, so get the
+                                -- default types from the envt; 
+                                -- i.e. use the curent ones
+                                -- (the caller will put them back there)
+        -- It's important not to return defaultDefaultTys here (which
+        -- we used to do) because in a TH program, tcDefaults [] is called
+        -- repeatedly, once for each group of declarations between top-level
+        -- splices.  We don't want to carefully set the default types in
+        -- one group, only for the next group to ignore them and install
+        -- defaultDefaultTys
 
 tcDefaults [L _ (DefaultDecl [])]
-  = return (Just [])		-- Default declaration specifying no types
+  = return (Just [])            -- Default declaration specifying no types
 
 tcDefaults [L locn (DefaultDecl mono_tys)]
-  = setSrcSpan locn 			$
-    addErrCtxt defaultDeclCtxt		$
-    do	{ ovl_str <- xoptM Opt_OverloadedStrings
-	; num_class    <- tcLookupClass numClassName
-	; is_str_class <- tcLookupClass isStringClassName
-	; let deflt_clss | ovl_str   = [num_class, is_str_class]
-			 | otherwise = [num_class]
-
-	; tau_tys <- mapM (tc_default_ty deflt_clss) mono_tys
+  = setSrcSpan locn                     $
+    addErrCtxt defaultDeclCtxt          $
+    do  { ovl_str <- xoptM Opt_OverloadedStrings
+        ; num_class    <- tcLookupClass numClassName
+        ; is_str_class <- tcLookupClass isStringClassName
+        ; let deflt_clss | ovl_str   = [num_class, is_str_class]
+                         | otherwise = [num_class]
+
+        ; tau_tys <- mapM (tc_default_ty deflt_clss) mono_tys
     
-	; return (Just tau_tys) }
+        ; return (Just tau_tys) }
 
 tcDefaults decls@(L locn (DefaultDecl _) : _)
   = setSrcSpan locn $
@@ -71,20 +65,20 @@ tcDefaults decls@(L locn (DefaultDecl _) : _)
 
 tc_default_ty :: [Class] -> LHsType Name -> TcM Type
 tc_default_ty deflt_clss hs_ty 
- = do	{ ty <- tcHsSigType DefaultDeclCtxt hs_ty
-	; checkTc (isTauTy ty) (polyDefErr hs_ty)
+ = do   { ty <- tcHsSigType DefaultDeclCtxt hs_ty
+        ; checkTc (isTauTy ty) (polyDefErr hs_ty)
 
-	-- Check that the type is an instance of at least one of the deflt_clss
-	; oks <- mapM (check_instance ty) deflt_clss
-	; checkTc (or oks) (badDefaultTy ty deflt_clss)
-	; return ty }
+        -- Check that the type is an instance of at least one of the deflt_clss
+        ; oks <- mapM (check_instance ty) deflt_clss
+        ; checkTc (or oks) (badDefaultTy ty deflt_clss)
+        ; return ty }
 
 check_instance :: Type -> Class -> TcM Bool
   -- Check that ty is an instance of cls
   -- We only care about whether it worked or not; return a boolean
 check_instance ty cls
-  = do	{ (_, mb_res) <- tryTc (simplifyDefault [mkClassPred cls [ty]])
-	; return (isJust mb_res) }
+  = do  { (_, mb_res) <- tryTc (simplifyDefault [mkClassPred cls [ty]])
+        ; return (isJust mb_res) }
     
 defaultDeclCtxt :: SDoc
 defaultDeclCtxt = ptext (sLit "When checking the types in a default declaration")
diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index 5b7dd2b..47b6546 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -1,11 +1,5 @@
 \begin{code}
 {-# LANGUAGE ScopedTypeVariables #-}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcErrors( 
        reportUnsolved, reportAllUnsolved,
@@ -49,9 +43,9 @@ import Data.List        ( partition, mapAccumL, zip4 )
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \section{Errors and contexts}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 ToDo: for these error messages, should we note the location as coming
@@ -144,7 +138,7 @@ report_unsolved mb_binds_var defer wanted
 
 data ReportErrCtxt 
     = CEC { cec_encl :: [Implication]  -- Enclosing implications
-                	       	       --   (innermost first)
+                                       --   (innermost first)
                                        -- ic_skols and givens are tidied, rest are not
           , cec_tidy  :: TidyEnv
           , cec_binds :: Maybe EvBindsVar 
@@ -553,9 +547,9 @@ mkIPErr ctxt cts
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                 Equality errors
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [Inaccessible code]
@@ -664,7 +658,7 @@ mkTyVarEqErr dflags ctxt extra ct oriented tv1 ty2
   -- So tv is a meta tyvar (or started that way before we 
   -- generalised it).  So presumably it is an *untouchable* 
   -- meta tyvar or a SigTv, else it'd have been unified
-  | not (k2 `tcIsSubKind` k1)   	 -- Kind error
+  | not (k2 `tcIsSubKind` k1)            -- Kind error
   = mkErrorMsg ctxt ct $ (kindErrorMsg (mkTyVarTy tv1) ty2 $$ extra)
 
   | OC_Occurs <- occ_check_expand
@@ -731,8 +725,8 @@ mkTyVarEqErr dflags ctxt extra ct oriented tv1 ty2
         -- Not an occurs check, because F is a type function.
   where         
     occ_check_expand = occurCheckExpand dflags tv1 ty2
-    k1 	= tyVarKind tv1
-    k2 	= typeKind ty2
+    k1  = tyVarKind tv1
+    k2  = typeKind ty2
     ty1 = mkTyVarTy tv1
 
 mkEqInfoMsg :: Ct -> TcType -> TcType -> SDoc
@@ -835,7 +829,7 @@ kindErrorMsg ty1 ty2
     k2 = typeKind ty2
 
 --------------------
-misMatchMsg :: Maybe SwapFlag -> TcType -> TcType -> SDoc	   -- Types are already tidy
+misMatchMsg :: Maybe SwapFlag -> TcType -> TcType -> SDoc          -- Types are already tidy
 -- If oriented then ty1 is actual, ty2 is expected
 misMatchMsg oriented ty1 ty2  
   | Just IsSwapped <- oriented
@@ -893,9 +887,9 @@ Warn of loopy local equalities that were dropped.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                  Type-class errors
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -967,7 +961,7 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
         hang (if isSingleton unifiers 
               then ptext (sLit "Note: there is a potential instance available:")
               else ptext (sLit "Note: there are several potential instances:"))
-    	   2 (ppr_insts unifiers)
+           2 (ppr_insts unifiers)
 
     -- Report "potential instances" only when the constraint arises
     -- directly from the user's use of an overloaded function
@@ -979,7 +973,7 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
       , (orig:origs) <- mapCatMaybes get_good_orig (cec_encl ctxt)
       = [sep [ ptext (sLit "add") <+> pprParendType pred
                <+> ptext (sLit "to the context of")
-	     , nest 2 $ ppr_skol orig $$ 
+             , nest 2 $ ppr_skol orig $$ 
                         vcat [ ptext (sLit "or") <+> ppr_skol orig 
                              | orig <- origs ] ] ]
       | otherwise = []
@@ -987,7 +981,7 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
     ppr_skol (PatSkol dc _) = ptext (sLit "the data constructor") <+> quotes (ppr dc)
     ppr_skol skol_info      = ppr skol_info
 
-	-- Do not suggest adding constraints to an *inferred* type signature!
+        -- Do not suggest adding constraints to an *inferred* type signature!
     get_good_orig ic = case ic_info ic of 
                          SigSkol (InfSigCtxt {}) _ -> Nothing
                          origin                    -> Just origin
@@ -1006,15 +1000,15 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
     -- Normal overlap error
     overlap_msg
       = ASSERT( not (null matches) )
-        vcat [	addArising orig (ptext (sLit "Overlapping instances for") 
-				<+> pprType (mkClassPred clas tys))
+        vcat [  addArising orig (ptext (sLit "Overlapping instances for") 
+                                <+> pprType (mkClassPred clas tys))
 
              ,  ppUnless (null matching_givens) $
                   sep [ptext (sLit "Matching givens (or their superclasses):") 
                       , nest 2 (vcat matching_givens)]
 
-    	     ,	sep [ptext (sLit "Matching instances:"),
-    		     nest 2 (vcat [pprInstances ispecs, pprInstances unifiers])]
+             ,  sep [ptext (sLit "Matching instances:"),
+                     nest 2 (vcat [pprInstances ispecs, pprInstances unifiers])]
 
              ,  ppWhen (null matching_givens && isSingleton matches && null unifiers) $
                 -- Intuitively, some given matched the wanted in their
@@ -1026,12 +1020,12 @@ mk_dict_err ctxt (ct, (matches, unifiers, safe_haskell))
                   sep [ ptext (sLit "There exists a (perhaps superclass) match:") 
                       , nest 2 (vcat (pp_givens givens))]
 
-	     ,	ppWhen (isSingleton matches) $
-		parens (vcat [ ptext (sLit "The choice depends on the instantiation of") <+>
-	    		          quotes (pprWithCommas ppr (varSetElems (tyVarsOfTypes tys)))
-			     , ppWhen (null (matching_givens)) $
+             ,  ppWhen (isSingleton matches) $
+                parens (vcat [ ptext (sLit "The choice depends on the instantiation of") <+>
+                                  quotes (pprWithCommas ppr (varSetElems (tyVarsOfTypes tys)))
+                             , ppWhen (null (matching_givens)) $
                                vcat [ ptext (sLit "To pick the first instance above, use IncoherentInstances")
-			            , ptext (sLit "when compiling the other instance declarations")]
+                                    , ptext (sLit "when compiling the other instance declarations")]
                         ])]
         where
             ispecs = [ispec | (ispec, _) <- matches]
@@ -1299,8 +1293,8 @@ relevantBindings want_filtering ctxt ct
        = do { (tidy_env', tidy_ty) <- zonkTidyTcType tidy_env (idType id)
             ; let id_tvs = tyVarsOfType tidy_ty
                   doc = sep [ pprPrefixOcc id <+> dcolon <+> ppr tidy_ty
-		            , nest 2 (parens (ptext (sLit "bound at")
-			    	 <+> ppr (getSrcLoc id)))]
+                            , nest 2 (parens (ptext (sLit "bound at")
+                                 <+> ppr (getSrcLoc id)))]
                   new_seen = tvs_seen `unionVarSet` id_tvs
 
             ; if (want_filtering && id_tvs `disjointVarSet` ct_tvs)
@@ -1343,10 +1337,10 @@ arising from *runtime* skolems in the debugger.  These
 are created by in RtClosureInspect.zonkRTTIType.  
 
 %************************************************************************
-%*									*
+%*                                                                      *
                  Error from the canonicaliser
-	 These ones are called *during* constraint simplification
-%*									*
+         These ones are called *during* constraint simplification
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1366,9 +1360,9 @@ solverDepthErrorTcS ct
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                  Tidying
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/typecheck/TcGenGenerics.lhs b/compiler/typecheck/TcGenGenerics.lhs
index af2407b..d74a390 100644
--- a/compiler/typecheck/TcGenGenerics.lhs
+++ b/compiler/typecheck/TcGenGenerics.lhs
@@ -7,12 +7,6 @@ The deriving code for the Generic class
 
 \begin{code}
 {-# LANGUAGE ScopedTypeVariables #-}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 
 module TcGenGenerics (canDoGenerics, canDoGenerics1,
@@ -230,8 +224,8 @@ canDoGenerics tc tc_args
                           then (Just (ppr dc <+> text "must be a vanilla data constructor"))
                           else Nothing)
 
-	-- Nor can we do the job if it's an existential data constructor,
-	-- Nor if the args are polymorphic types (I don't think)
+        -- Nor can we do the job if it's an existential data constructor,
+        -- Nor if the args are polymorphic types (I don't think)
     bad_arg_type ty = isUnLiftedType ty || not (isTauTy ty)
 
 mergeErrors :: [Maybe SDoc] -> Maybe SDoc
@@ -337,13 +331,13 @@ canDoGenerics1_w rep_tc
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Generating the RHS of a generic default method}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-type US = Int	-- Local unique supply, just a plain Int
+type US = Int   -- Local unique supply, just a plain Int
 type Alt = (LPat RdrName, LHsExpr RdrName)
 
 -- GenericKind serves to mark if a datatype derives Generic (Gen0) or
@@ -757,9 +751,9 @@ genLR_E i n e
 
 -- Build a product expression
 mkProd_E :: GenericKind_DC      -- Generic or Generic1?
-         -> US	            -- Base for unique names
+         -> US              -- Base for unique names
          -> [(RdrName, Type)] -- List of variables matched on the lhs and their types
-	 -> LHsExpr RdrName -- Resulting product expression
+         -> LHsExpr RdrName -- Resulting product expression
 mkProd_E _   _ []     = mkM1_E (nlHsVar u1DataCon_RDR)
 mkProd_E gk_ _ varTys = mkM1_E (foldBal prod appVars)
                      -- These M1s are meta-information for the constructor
@@ -783,9 +777,9 @@ wrapArg_E (Gen1_DC argVar) (var, ty) = mkM1_E $ converter ty `nlHsApp` nlHsVar v
 
 -- Build a product pattern
 mkProd_P :: GenericKind   -- Gen0 or Gen1
-         -> US		        -- Base for unique names
-	       -> [RdrName]     -- List of variables to match
-	       -> LPat RdrName  -- Resulting product pattern
+         -> US                  -- Base for unique names
+               -> [RdrName]     -- List of variables to match
+               -> LPat RdrName  -- Resulting product pattern
 mkProd_P _  _ []   = mkM1_P (nlNullaryConPat u1DataCon_RDR)
 mkProd_P gk _ vars = mkM1_P (foldBal prod appVars)
                      -- These M1s are meta-information for the constructor
diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs
index b7cd841..f629c2e 100644
--- a/compiler/typecheck/TcHsType.lhs
+++ b/compiler/typecheck/TcHsType.lhs
@@ -5,44 +5,38 @@
 \section[TcMonoType]{Typechecking user-specified @MonoTypes@}
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcHsType (
-	tcHsSigType, tcHsSigTypeNC, tcHsDeriv, tcHsVectInst, 
-	tcHsInstHead, 
-	UserTypeCtxt(..), 
+        tcHsSigType, tcHsSigTypeNC, tcHsDeriv, tcHsVectInst, 
+        tcHsInstHead, 
+        UserTypeCtxt(..), 
 
                 -- Type checking type and class decls
-	kcLookupKind, kcTyClTyVars, tcTyClTyVars,
+        kcLookupKind, kcTyClTyVars, tcTyClTyVars,
         tcHsConArgType, tcDataKindSig, 
         tcClassSigType,
 
-		-- Kind-checking types
+                -- Kind-checking types
                 -- No kind generalisation, no checkValidType
-	KindCheckingStrategy(..), kcStrategy, kcStrategyFamDecl,
+        KindCheckingStrategy(..), kcStrategy, kcStrategyFamDecl,
         kcHsTyVarBndrs, tcHsTyVarBndrs, 
         tcHsLiftedType, tcHsOpenType,
-	tcLHsType, tcCheckLHsType, 
+        tcLHsType, tcCheckLHsType, 
         tcHsContext, tcInferApps, tcHsArgTys,
 
         kindGeneralize, checkKind,
 
-		-- Sort-checking kinds
-	tcLHsKind, 
+                -- Sort-checking kinds
+        tcLHsKind, 
 
-		-- Pattern type signatures
-	tcHsPatSigType, tcPatSig
+                -- Pattern type signatures
+        tcHsPatSigType, tcPatSig
    ) where
 
 #include "HsVersions.h"
 
-#ifdef GHCI 	/* Only if bootstrapped */
-import {-# SOURCE #-}	TcSplice( tcSpliceType )
+#ifdef GHCI     /* Only if bootstrapped */
+import {-# SOURCE #-}   TcSplice( tcSpliceType )
 #endif
 
 import HsSyn
@@ -81,31 +75,31 @@ import PrelNames( ipClassName, funTyConKey )
 \end{code}
 
 
-	----------------------------
-		General notes
-	----------------------------
+        ----------------------------
+                General notes
+        ----------------------------
 
 Generally speaking we now type-check types in three phases
 
   1.  kcHsType: kind check the HsType
-	*includes* performing any TH type splices;
-	so it returns a translated, and kind-annotated, type
+        *includes* performing any TH type splices;
+        so it returns a translated, and kind-annotated, type
 
   2.  dsHsType: convert from HsType to Type:
-	perform zonking
-	expand type synonyms [mkGenTyApps]
-	hoist the foralls [tcHsType]
+        perform zonking
+        expand type synonyms [mkGenTyApps]
+        hoist the foralls [tcHsType]
 
   3.  checkValidType: check the validity of the resulting type
 
 Often these steps are done one after the other (tcHsSigType).
 But in mutually recursive groups of type and class decls we do
-	1 kind-check the whole group
-	2 build TyCons/Classes in a knot-tied way
-	3 check the validity of types in the now-unknotted TyCons/Classes
+        1 kind-check the whole group
+        2 build TyCons/Classes in a knot-tied way
+        3 check the validity of types in the now-unknotted TyCons/Classes
 
 For example, when we find
-	(forall a m. m a -> m a)
+        (forall a m. m a -> m a)
 we bind a,m to kind varibles and kind-check (m a -> m a).  This makes
 a get kind *, and m get kind *->*.  Now we typecheck (m a -> m a) in
 an environment that binds a and m suitably.
@@ -113,18 +107,18 @@ an environment that binds a and m suitably.
 The kind checker passed to tcHsTyVars needs to look at enough to
 establish the kind of the tyvar:
   * For a group of type and class decls, it's just the group, not
-	the rest of the program
+        the rest of the program
   * For a tyvar bound in a pattern type signature, its the types
-	mentioned in the other type signatures in that bunch of patterns
+        mentioned in the other type signatures in that bunch of patterns
   * For a tyvar bound in a RULE, it's the type signatures on other
-	universally quantified variables in the rule
+        universally quantified variables in the rule
 
 Note that this may occasionally give surprising results.  For example:
 
-	data T a b = MkT (a b)
+        data T a b = MkT (a b)
 
-Here we deduce			a::*->*,       b::*
-But equally valid would be	a::(*->*)-> *, b::*->*
+Here we deduce                  a::*->*,       b::*
+But equally valid would be      a::(*->*)-> *, b::*->*
 
 
 Validity checking
@@ -134,8 +128,8 @@ but not all:
 
 - During desugaring, we normalise by expanding type synonyms.  Only
   after this step can we check things like type-synonym saturation
-  e.g. 	type T k = k Int
-	type S a = a
+  e.g.  type T k = k Int
+        type S a = a
   Then (T S) is ok, because T is saturated; (T S) expands to (S Int);
   and then S is saturated.  This is a GHC extension.
 
@@ -158,15 +152,15 @@ the TyCon being defined.
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
               Check types AND do validity checking
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 tcHsSigType, tcHsSigTypeNC :: UserTypeCtxt -> LHsType Name -> TcM Type
   -- NB: it's important that the foralls that come from the top-level
-  --	 HsForAllTy in hs_ty occur *first* in the returned type.
+  --     HsForAllTy in hs_ty occur *first* in the returned type.
   --     See Note [Scoped] with TcSigInfo
 tcHsSigType ctxt hs_ty
   = addErrCtxt (pprHsSigCtxt ctxt hs_ty) $
@@ -217,7 +211,7 @@ tcHsDeriv hs_ty
   = do { kind <- newMetaKindVar
        ; ty   <- tcCheckHsTypeAndGen hs_ty kind
                  -- Funny newtype deriving form
-                 -- 	forall a. C [a]
+                 --     forall a. C [a]
                  -- where C has arity 2. Hence any-kinded result
        ; ty   <- zonkSigType ty
        ; let (tvs, pred) = splitForAllTys ty
@@ -237,18 +231,18 @@ tcHsVectInst ty
   = failWithTc $ ptext (sLit "Malformed instance type")
 \end{code}
 
-	These functions are used during knot-tying in
-	type and class declarations, when we have to
- 	separate kind-checking, desugaring, and validity checking
+        These functions are used during knot-tying in
+        type and class declarations, when we have to
+        separate kind-checking, desugaring, and validity checking
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
             The main kind checker: no validity checks here
-%*									*
+%*                                                                      *
 %************************************************************************
-	
-	First a couple of simple wrappers for kcHsType
+        
+        First a couple of simple wrappers for kcHsType
 
 \begin{code}
 tcClassSigType :: LHsType Name -> TcM Type
@@ -348,7 +342,7 @@ tc_fun_type ty ty1 ty2 exp_kind@(EK _ ctxt)
 tc_hs_type :: HsType Name -> ExpKind -> TcM TcType
 tc_hs_type (HsParTy ty)        exp_kind = tc_lhs_type ty exp_kind
 tc_hs_type (HsDocTy ty _)      exp_kind = tc_lhs_type ty exp_kind
-tc_hs_type (HsQuasiQuoteTy {}) _ = panic "tc_hs_type: qq"	-- Eliminated by renamer
+tc_hs_type (HsQuasiQuoteTy {}) _ = panic "tc_hs_type: qq"       -- Eliminated by renamer
 tc_hs_type ty@(HsBangTy {})    _
     -- While top-level bangs at this point are eliminated (eg !(Maybe Int)),
     -- other kinds of bangs are not (eg ((!Maybe) Int)). These kinds of
@@ -509,7 +503,7 @@ tc_hs_type (HsCoreTy ty) exp_kind
        ; return ty }
 
 
-#ifdef GHCI	/* Only if bootstrapped */
+#ifdef GHCI     /* Only if bootstrapped */
 -- This looks highly suspect to me
 -- It will really only be fixed properly when we do the TH
 -- reorganisation so that type splices happen in the renamer
@@ -578,9 +572,9 @@ finish_tuple hs_ty tup_sort tau_tys exp_kind
 ---------------------------
 tcInferApps :: Outputable a
        => a 
-       -> TcKind			-- Function kind
-       -> [LHsType Name]		-- Arg types
-       -> TcM ([TcType], TcKind)	-- Kind-checked args
+       -> TcKind                        -- Function kind
+       -> [LHsType Name]                -- Arg types
+       -> TcM ([TcType], TcKind)        -- Kind-checked args
 tcInferApps the_fun fun_kind args
   = do { (args_w_kinds, res_kind) <- splitFunKind (ppr the_fun) fun_kind args
        ; args' <- tc_lhs_types args_w_kinds
@@ -590,8 +584,8 @@ tcCheckApps :: Outputable a
             => HsType Name     -- The type being checked (for err messages only)
             -> a               -- The function
             -> TcKind -> [LHsType Name]   -- Fun kind and arg types
-	    -> ExpKind 	                  -- Expected kind
-	    -> TcM [TcType]
+            -> ExpKind                    -- Expected kind
+            -> TcM [TcType]
 tcCheckApps hs_ty the_fun fun_kind args exp_kind
   = do { (arg_tys, res_kind) <- tcInferApps the_fun fun_kind args
        ; checkExpectedKind hs_ty res_kind exp_kind
@@ -612,7 +606,7 @@ splitFunKind the_fun fun_kind args
                                      ; return ((arg, exp_kind) : aks, rk) } }
  
     too_many_args = quotes the_fun <+>
-		    ptext (sLit "is applied to too many type arguments")
+                    ptext (sLit "is applied to too many type arguments")
 
 
 ---------------------------
@@ -677,7 +671,7 @@ tcTyVar name         -- Could be a tyvar, a tycon, or a datacon
         (kvs, ki_body) = splitForAllTys kind
 
 tcClass :: Name -> TcM (Class, TcKind)
-tcClass cls 	-- Must be a class
+tcClass cls     -- Must be a class
   = do { thing <- tcLookup cls
        ; case thing of
            AThing kind -> return (aThingErr "tcClass" cls, kind)
@@ -760,14 +754,14 @@ zonkSigType ty
     go (AppTy fun arg)   = do fun' <- go fun
                               arg' <- go arg
                               return (mkAppTy fun' arg')
-		-- NB the mkAppTy; we might have instantiated a
-		-- type variable to a type constructor, so we need
-		-- to pull the TyConApp to the top.
+                -- NB the mkAppTy; we might have instantiated a
+                -- type variable to a type constructor, so we need
+                -- to pull the TyConApp to the top.
 
-	-- The two interesting cases!
+        -- The two interesting cases!
     go (TyVarTy tyvar) | isTcTyVar tyvar = zonkTcTyVar tyvar
-		       | otherwise	 = TyVarTy <$> updateTyVarKindM go tyvar
-		-- Ordinary (non Tc) tyvars occur inside quantified types
+                       | otherwise       = TyVarTy <$> updateTyVarKindM go tyvar
+                -- Ordinary (non Tc) tyvars occur inside quantified types
 
     go (ForAllTy tv ty) = do { tv' <- zonkTcTyVarBndr tv
                              ; ty' <- go ty
@@ -870,8 +864,8 @@ Moreover
   * it cannot fail, 
   * it does no unifications
   * it does no validity checking, except for structural matters, such as
-	(a) spurious ! annotations.
-	(b) a class used as a type
+        (a) spurious ! annotations.
+        (b) a class used as a type
 
 Note [Kind of a type splice]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -893,8 +887,8 @@ Help functions for type applications
 
 \begin{code}
 addTypeCtxt :: LHsType Name -> TcM a -> TcM a
-	-- Wrap a context around only if we want to show that contexts.  
-	-- Omit invisble ones and ones user's won't grok
+        -- Wrap a context around only if we want to show that contexts.  
+        -- Omit invisble ones and ones user's won't grok
 addTypeCtxt (L _ ty) thing 
   = addErrCtxt doc thing
   where
@@ -902,9 +896,9 @@ addTypeCtxt (L _ ty) thing
 \end{code}
 
 %************************************************************************
-%*									*
-		Type-variable binders
-%*									*
+%*                                                                      *
+                Type-variable binders
+%*                                                                      *
 %************************************************************************
 
 Note [Kind-checking strategies]
@@ -1104,8 +1098,8 @@ kcScopedKindVars kv_ns thing_inside
 
 kcHsTyVarBndrs :: KindCheckingStrategy
                -> LHsTyVarBndrs Name 
-	       -> TcM (Kind, r)   -- the result kind, possibly with other info
-	       -> TcM (Kind, r)
+               -> TcM (Kind, r)   -- the result kind, possibly with other info
+               -> TcM (Kind, r)
 -- Used in getInitialKind
 kcHsTyVarBndrs strat (HsQTvs { hsq_kvs = kv_ns, hsq_tvs = hs_tvs }) thing_inside
   = do { kvs <- if skolem_kvs
@@ -1132,9 +1126,9 @@ kcHsTyVarBndrs strat (HsQTvs { hsq_kvs = kv_ns, hsq_tvs = hs_tvs }) thing_inside
     kc_hs_tv (UserTyVar n)
       = do { mb_thing <- tcLookupLcl_maybe n
            ; kind <- case mb_thing of
-               	       Just (AThing k)     -> return k
-               	       _ | default_to_star -> return liftedTypeKind
-               	         | otherwise       -> newMetaKindVar
+                       Just (AThing k)     -> return k
+                       _ | default_to_star -> return liftedTypeKind
+                         | otherwise       -> newMetaKindVar
            ; return (n, kind) }
     kc_hs_tv (KindedTyVar n k) 
       = do { kind <- tcLHsKind k
@@ -1149,8 +1143,8 @@ kcHsTyVarBndrs strat (HsQTvs { hsq_kvs = kv_ns, hsq_tvs = hs_tvs }) thing_inside
            ; return (n, kind) }
 
 tcHsTyVarBndrs :: LHsTyVarBndrs Name 
-	       -> ([TcTyVar] -> TcM r)
-	       -> TcM r
+               -> ([TcTyVar] -> TcM r)
+               -> TcM r
 -- Bind the kind variables to fresh skolem variables
 -- and type variables to skolems, each with a meta-kind variable kind
 tcHsTyVarBndrs (HsQTvs { hsq_kvs = kv_ns, hsq_tvs = hs_tvs }) thing_inside
@@ -1200,9 +1194,9 @@ kindGeneralize tkvs
                 -- Any type variables in tkvs will be in scope,
                 -- and hence in gbl_tvs, so after removing gbl_tvs
                 -- we should only have kind variables left
-		--
- 		-- BUT there is a smelly case (to be fixed when TH is reorganised)
-		--     f t = [| e :: $t |]
+                --
+                -- BUT there is a smelly case (to be fixed when TH is reorganised)
+                --     f t = [| e :: $t |]
                 -- When typechecking the body of the bracket, we typecheck $t to a
                 -- unification variable 'alpha', with no biding forall.  We don't
                 -- want to kind-quantify it!
@@ -1263,8 +1257,8 @@ kcTyClTyVars :: Name -> LHsTyVarBndrs Name -> TcM a -> TcM a
 -- when doing the initial kind-check.  
 kcTyClTyVars name (HsQTvs { hsq_kvs = kvs, hsq_tvs = hs_tvs }) thing_inside
   = kcScopedKindVars kvs $
-    do 	{ tc_kind <- kcLookupKind name
-	; let (arg_ks, _res_k) = splitKindFunTysN (length hs_tvs) tc_kind
+    do  { tc_kind <- kcLookupKind name
+        ; let (arg_ks, _res_k) = splitKindFunTysN (length hs_tvs) tc_kind
                      -- There should be enough arrows, because
                      -- getInitialKinds used the tcdTyVars
         ; name_ks <- zipWithM kc_tv hs_tvs arg_ks
@@ -1283,7 +1277,7 @@ kcTyClTyVars name (HsQTvs { hsq_kvs = kvs, hsq_tvs = hs_tvs }) thing_inside
            ; return (n, exp_k) }
 
 -----------------------
-tcTyClTyVars :: Name -> LHsTyVarBndrs Name	-- LHS of the type or class decl
+tcTyClTyVars :: Name -> LHsTyVarBndrs Name      -- LHS of the type or class decl
              -> ([TyVar] -> Kind -> TcM a) -> TcM a
 -- Used for the type variables of a type or class decl,
 -- on the second pass when constructing the final result
@@ -1320,25 +1314,25 @@ tcTyClTyVars tycon (HsQTvs { hsq_kvs = hs_kvs, hsq_tvs = hs_tvs }) thing_inside
 -----------------------------------
 tcDataKindSig :: Kind -> TcM [TyVar]
 -- GADT decls can have a (perhaps partial) kind signature
---	e.g.  data T :: * -> * -> * where ...
+--      e.g.  data T :: * -> * -> * where ...
 -- This function makes up suitable (kinded) type variables for 
 -- the argument kinds, and checks that the result kind is indeed *.
 -- We use it also to make up argument type variables for for data instances.
 tcDataKindSig kind
-  = do	{ checkTc (isLiftedTypeKind res_kind) (badKindSig kind)
-	; span <- getSrcSpanM
-	; us   <- newUniqueSupply 
-	; let uniqs = uniqsFromSupply us
-	; return [ mk_tv span uniq str kind 
-		 | ((kind, str), uniq) <- arg_kinds `zip` dnames `zip` uniqs ] }
+  = do  { checkTc (isLiftedTypeKind res_kind) (badKindSig kind)
+        ; span <- getSrcSpanM
+        ; us   <- newUniqueSupply 
+        ; let uniqs = uniqsFromSupply us
+        ; return [ mk_tv span uniq str kind 
+                 | ((kind, str), uniq) <- arg_kinds `zip` dnames `zip` uniqs ] }
   where
     (arg_kinds, res_kind) = splitKindFunTys kind
     mk_tv loc uniq str kind = mkTyVar name kind
-	where
-	   name = mkInternalName uniq occ loc
-	   occ  = mkOccName tvName str
-	  
-    dnames = map ('$' :) names	-- Note [Avoid name clashes for associated data types]
+        where
+           name = mkInternalName uniq occ loc
+           occ  = mkOccName tvName str
+          
+    dnames = map ('$' :) names  -- Note [Avoid name clashes for associated data types]
 
     names :: [String]
     names = [ c:cs | cs <- "" : names, c <- ['a'..'z'] ] 
@@ -1346,7 +1340,7 @@ tcDataKindSig kind
 badKindSig :: Kind -> SDoc
 badKindSig kind 
  = hang (ptext (sLit "Kind signature on data type declaration has non-* return kind"))
-	2 (ppr kind)
+        2 (ppr kind)
 \end{code}
 
 Note [Avoid name clashes for associated data types]
@@ -1369,15 +1363,15 @@ interface file.)
 
 
 %************************************************************************
-%*									*
-		Scoped type variables
-%*									*
+%*                                                                      *
+                Scoped type variables
+%*                                                                      *
 %************************************************************************
 
 
 tcAddScopedTyVars is used for scoped type variables added by pattern
 type signatures
-	e.g.  \ ((x::a), (y::a)) -> x+y
+        e.g.  \ ((x::a), (y::a)) -> x+y
 They never have explicit kinds (because this is source-code only)
 They are mutable (because they can get bound to a more specific type).
 
@@ -1392,7 +1386,7 @@ The current not-very-good plan is to
   * do kind inference
   * bring the kinded type vars into scope
   * BUT throw away the kind-checked type
-  	(we'll kind-check it again when we type-check the pattern)
+        (we'll kind-check it again when we type-check the pattern)
 
 This is bad because throwing away the kind checked type throws away
 its splices.  But too bad for now.  [July 03]
@@ -1401,33 +1395,33 @@ Historical note:
     We no longer specify that these type variables must be univerally 
     quantified (lots of email on the subject).  If you want to put that 
     back in, you need to
-	a) Do a checkSigTyVars after thing_inside
-	b) More insidiously, don't pass in expected_ty, else
-	   we unify with it too early and checkSigTyVars barfs
-	   Instead you have to pass in a fresh ty var, and unify
-	   it with expected_ty afterwards
+        a) Do a checkSigTyVars after thing_inside
+        b) More insidiously, don't pass in expected_ty, else
+           we unify with it too early and checkSigTyVars barfs
+           Instead you have to pass in a fresh ty var, and unify
+           it with expected_ty afterwards
 
 \begin{code}
 tcHsPatSigType :: UserTypeCtxt
-	       -> HsWithBndrs (LHsType Name)  -- The type signature
-	      -> TcM ( Type                   -- The signature
+               -> HsWithBndrs (LHsType Name)  -- The type signature
+              -> TcM ( Type                   -- The signature
                       , [(Name, TcTyVar)] )   -- The new bit of type environment, binding
-				              -- the scoped type variables
+                                              -- the scoped type variables
 -- Used for type-checking type signatures in
--- (a) patterns 	  e.g  f (x::Int) = e
+-- (a) patterns           e.g  f (x::Int) = e
 -- (b) result signatures  e.g. g x :: Int = e
 -- (c) RULE forall bndrs  e.g. forall (x::Int). f x = x
 
 tcHsPatSigType ctxt (HsWB { hswb_cts = hs_ty, hswb_kvs = sig_kvs, hswb_tvs = sig_tvs })
   = addErrCtxt (pprHsSigCtxt ctxt hs_ty) $
-    do	{ kvs <- mapM new_kv sig_kvs
+    do  { kvs <- mapM new_kv sig_kvs
         ; tvs <- mapM new_tv sig_tvs
         ; let ktv_binds = (sig_kvs `zip` kvs) ++ (sig_tvs `zip` tvs)
-	; sig_ty <- tcExtendTyVarEnv2 ktv_binds $
+        ; sig_ty <- tcExtendTyVarEnv2 ktv_binds $
                     tcHsLiftedType hs_ty
         ; sig_ty <- zonkSigType sig_ty
-	; checkValidType ctxt sig_ty 
-	; return (sig_ty, ktv_binds) }
+        ; checkValidType ctxt sig_ty 
+        ; return (sig_ty, ktv_binds) }
   where
     new_kv name = new_tkv name superKind
     new_tv name = do { kind <- newMetaKindVar
@@ -1439,49 +1433,49 @@ tcHsPatSigType ctxt (HsWB { hswb_cts = hs_ty, hswb_kvs = sig_kvs, hswb_tvs = sig
           _              -> newSigTyVar name kind  -- See Note [Unifying SigTvs]
 
 tcPatSig :: UserTypeCtxt
-	 -> HsWithBndrs (LHsType Name)
-	 -> TcSigmaType
-	 -> TcM (TcType,	    -- The type to use for "inside" the signature
-		 [(Name, TcTyVar)], -- The new bit of type environment, binding
-				    -- the scoped type variables
+         -> HsWithBndrs (LHsType Name)
+         -> TcSigmaType
+         -> TcM (TcType,            -- The type to use for "inside" the signature
+                 [(Name, TcTyVar)], -- The new bit of type environment, binding
+                                    -- the scoped type variables
                  HsWrapper)         -- Coercion due to unification with actual ty
                                     -- Of shape:  res_ty ~ sig_ty
 tcPatSig ctxt sig res_ty
-  = do	{ (sig_ty, sig_tvs) <- tcHsPatSigType ctxt sig
-    	-- sig_tvs are the type variables free in 'sig', 
-	-- and not already in scope. These are the ones
-	-- that should be brought into scope
+  = do  { (sig_ty, sig_tvs) <- tcHsPatSigType ctxt sig
+        -- sig_tvs are the type variables free in 'sig', 
+        -- and not already in scope. These are the ones
+        -- that should be brought into scope
 
-	; if null sig_tvs then do {
-		-- Just do the subsumption check and return
+        ; if null sig_tvs then do {
+                -- Just do the subsumption check and return
                   wrap <- tcSubType PatSigOrigin ctxt res_ty sig_ty
-		; return (sig_ty, [], wrap)
+                ; return (sig_ty, [], wrap)
         } else do
-		-- Type signature binds at least one scoped type variable
-	
-		-- A pattern binding cannot bind scoped type variables
+                -- Type signature binds at least one scoped type variable
+        
+                -- A pattern binding cannot bind scoped type variables
                 -- It is more convenient to make the test here
                 -- than in the renamer
-	{ let in_pat_bind = case ctxt of
-				BindPatSigCtxt -> True
-				_              -> False
-	; when in_pat_bind (addErr (patBindSigErr sig_tvs))
-
-		-- Check that all newly-in-scope tyvars are in fact
-		-- constrained by the pattern.  This catches tiresome
-		-- cases like	
-		--	type T a = Int
-		--	f :: Int -> Int
-		-- 	f (x :: T a) = ...
-		-- Here 'a' doesn't get a binding.  Sigh
-	; let bad_tvs = [ tv | (_, tv) <- sig_tvs
+        { let in_pat_bind = case ctxt of
+                                BindPatSigCtxt -> True
+                                _              -> False
+        ; when in_pat_bind (addErr (patBindSigErr sig_tvs))
+
+                -- Check that all newly-in-scope tyvars are in fact
+                -- constrained by the pattern.  This catches tiresome
+                -- cases like   
+                --      type T a = Int
+                --      f :: Int -> Int
+                --      f (x :: T a) = ...
+                -- Here 'a' doesn't get a binding.  Sigh
+        ; let bad_tvs = [ tv | (_, tv) <- sig_tvs
                              , not (tv `elemVarSet` exactTyVarsOfType sig_ty) ]
-	; checkTc (null bad_tvs) (badPatSigTvs sig_ty bad_tvs)
+        ; checkTc (null bad_tvs) (badPatSigTvs sig_ty bad_tvs)
 
-	-- Now do a subsumption check of the pattern signature against res_ty
-	; wrap <- tcSubType PatSigOrigin ctxt res_ty sig_ty
+        -- Now do a subsumption check of the pattern signature against res_ty
+        ; wrap <- tcSubType PatSigOrigin ctxt res_ty sig_ty
 
-	-- Phew!
+        -- Phew!
         ; return (sig_ty, sig_tvs, wrap)
         } }
 
@@ -1744,17 +1738,17 @@ tc_kind_var_app name arg_kis
 tc_kind_var_app name arg_kis
   = do { thing <- tcLookup name
        ; case thing of
-  	   AGlobal (ATyCon tc)
-  	     -> do { data_kinds <- xoptM Opt_DataKinds
-  	           ; unless data_kinds $ addErr (dataKindsErr name)
-  	     	   ; case promotableTyCon_maybe tc of
-  	     	       Just prom_tc | arg_kis `lengthIs` tyConArity prom_tc
-  	     	               -> return (mkTyConApp prom_tc arg_kis)
-  	     	       Just _  -> tycon_err tc "is not fully applied"
-  	     	       Nothing -> tycon_err tc "is not promotable" }
-
-  	   -- A lexically scoped kind variable
-  	   ATyVar _ kind_var 
+           AGlobal (ATyCon tc)
+             -> do { data_kinds <- xoptM Opt_DataKinds
+                   ; unless data_kinds $ addErr (dataKindsErr name)
+                   ; case promotableTyCon_maybe tc of
+                       Just prom_tc | arg_kis `lengthIs` tyConArity prom_tc
+                               -> return (mkTyConApp prom_tc arg_kis)
+                       Just _  -> tycon_err tc "is not fully applied"
+                       Nothing -> tycon_err tc "is not promotable" }
+
+           -- A lexically scoped kind variable
+           ATyVar _ kind_var 
              | not (isKindVar kind_var) 
              -> failWithTc (ptext (sLit "Type variable") <+> quotes (ppr kind_var)
                             <+> ptext (sLit "used as a kind"))
@@ -1765,19 +1759,19 @@ tc_kind_var_app name arg_kis
              | otherwise 
              -> return (mkAppTys (mkTyVarTy kind_var) arg_kis)
 
-  	   -- It is in scope, but not what we expected
-  	   AThing _ 
+           -- It is in scope, but not what we expected
+           AThing _ 
              | isTyVarName name 
              -> failWithTc (ptext (sLit "Type variable") <+> quotes (ppr name)
                             <+> ptext (sLit "used in a kind"))
              | otherwise 
              -> failWithTc (hang (ptext (sLit "Type constructor") <+> quotes (ppr name)
                                   <+> ptext (sLit "used in a kind"))
-  	                       2 (ptext (sLit "inside its own recursive group"))) 
+                               2 (ptext (sLit "inside its own recursive group"))) 
 
            APromotionErr err -> promotionErr name err
 
-  	   _ -> wrongThingErr "promoted type" thing name
+           _ -> wrongThingErr "promoted type" thing name
                 -- This really should not happen
      }
   where 
@@ -1801,15 +1795,15 @@ promotionErr name err
 \end{code}
 
 %************************************************************************
-%*									*
-		Scoped type variables
-%*									*
+%*                                                                      *
+                Scoped type variables
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 pprHsSigCtxt :: UserTypeCtxt -> LHsType Name -> SDoc
 pprHsSigCtxt ctxt hs_ty = sep [ ptext (sLit "In") <+> pprUserTypeCtxt ctxt <> colon, 
-				 nest 2 (pp_sig ctxt) ]
+                                 nest 2 (pp_sig ctxt) ]
   where
     pp_sig (FunSigCtxt n)  = pp_n_colon n
     pp_sig (ConArgCtxt n)  = pp_n_colon n
@@ -1822,8 +1816,8 @@ badPatSigTvs :: TcType -> [TyVar] -> SDoc
 badPatSigTvs sig_ty bad_tvs
   = vcat [ fsep [ptext (sLit "The type variable") <> plural bad_tvs, 
                  quotes (pprWithCommas ppr bad_tvs), 
-          	 ptext (sLit "should be bound by the pattern signature") <+> quotes (ppr sig_ty),
-	  	 ptext (sLit "but are actually discarded by a type synonym") ]
+                 ptext (sLit "should be bound by the pattern signature") <+> quotes (ppr sig_ty),
+                 ptext (sLit "but are actually discarded by a type synonym") ]
          , ptext (sLit "To fix this, expand the type synonym") 
          , ptext (sLit "[Note: I hope to lift this restriction in due course]") ]
 
diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs
index 6b4cb8e..c56581f 100644
--- a/compiler/typecheck/TcInstDcls.lhs
+++ b/compiler/typecheck/TcInstDcls.lhs
@@ -6,12 +6,6 @@
 TcInstDecls: Typechecking instance declarations
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcInstDcls ( tcInstDecls1, tcInstDecls2 ) where
 
@@ -566,8 +560,8 @@ tcClsInstDecl (L loc (ClsInstDecl { cid_poly_ty = poly_ty, cid_binds = binds
 
         ; overlap_flag <- getOverlapFlag
         ; (subst, tyvars') <- tcInstSkolTyVars tyvars
-        ; let dfun  	= mkDictFunId dfun_name tyvars theta clas inst_tys
-              ispec 	= mkLocalInstance dfun overlap_flag tyvars' clas (substTys subst inst_tys)
+        ; let dfun      = mkDictFunId dfun_name tyvars theta clas inst_tys
+              ispec     = mkLocalInstance dfun overlap_flag tyvars' clas (substTys subst inst_tys)
                             -- Be sure to freshen those type variables, 
                             -- so they are sure not to appear in any lookup
               inst_info = InstInfo { iSpec  = ispec, iBinds = VanillaInst binds uprags False }
@@ -1387,13 +1381,13 @@ tcInstanceMethods dfun_id clas tyvars dfun_ev_vars inst_tys
 ------------------
 mkGenericDefMethBind :: Class -> [Type] -> Id -> Name -> TcM (LHsBind Name)
 mkGenericDefMethBind clas inst_tys sel_id dm_name
-  = 	-- A generic default method
-    	-- If the method is defined generically, we only have to call the
+  =     -- A generic default method
+        -- If the method is defined generically, we only have to call the
         -- dm_name.
-    do	{ dflags <- getDynFlags
-	; liftIO (dumpIfSet_dyn dflags Opt_D_dump_deriv "Filling in method body"
-		   (vcat [ppr clas <+> ppr inst_tys,
-			  nest 2 (ppr sel_id <+> equals <+> ppr rhs)]))
+    do  { dflags <- getDynFlags
+        ; liftIO (dumpIfSet_dyn dflags Opt_D_dump_deriv "Filling in method body"
+                   (vcat [ppr clas <+> ppr inst_tys,
+                          nest 2 (ppr sel_id <+> equals <+> ppr rhs)]))
 
         ; return (noLoc $ mkTopFunBind (noLoc (idName sel_id))
                                        [mkSimpleMatch [] rhs]) }
diff --git a/compiler/typecheck/TcInteract.lhs b/compiler/typecheck/TcInteract.lhs
index 682f9f4..9e07fe6 100644
--- a/compiler/typecheck/TcInteract.lhs
+++ b/compiler/typecheck/TcInteract.lhs
@@ -1,10 +1,4 @@
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcInteract ( 
      solveInteractGiven,  -- Solves [EvVar],GivenLoc
@@ -409,7 +403,7 @@ data SPSolveResult = SPCantSolve
 
 -- @trySpontaneousSolve wi@ solves equalities where one side is a
 -- touchable unification variable.
---     	    See Note [Touchables and givens] 
+--          See Note [Touchables and givens] 
 trySpontaneousSolve :: WorkItem -> TcS SPSolveResult
 trySpontaneousSolve workItem@(CTyEqCan { cc_ev = gw
                                        , cc_tyvar = tv1, cc_rhs = xi, cc_loc = d })
@@ -423,7 +417,7 @@ trySpontaneousSolve workItem@(CTyEqCan { cc_ev = gw
            (True,  True)  -> trySpontaneousEqTwoWay d gw tv1 tv2
            (True,  False) -> trySpontaneousEqOneWay d gw tv1 xi
            (False, True)  -> trySpontaneousEqOneWay d gw tv2 (mkTyVarTy tv1)
-	   _              -> return SPCantSolve }
+           _              -> return SPCantSolve }
   | otherwise
   = do { tch1 <- isTouchableMetaTyVarTcS tv1
        ; if tch1 then trySpontaneousEqOneWay d gw tv1 xi
@@ -874,8 +868,8 @@ solveOneFromTheOther info ifl workItem
   = return (IRWorkItemConsumed ("Solved[DW] " ++ info))
 
   | isDerived ifl -- The inert item is Derived, we can just throw it away, 
-    	      	  -- The workItem is inert wrt earlier inert-set items, 
-		  -- so it's safe to continue on from this point
+                  -- The workItem is inert wrt earlier inert-set items, 
+                  -- so it's safe to continue on from this point
   = return (IRInertConsumed ("Solved[DI] " ++ info))
   
   | CtWanted { ctev_evar = ev_id } <- wfl
@@ -884,7 +878,7 @@ solveOneFromTheOther info ifl workItem
   | CtWanted { ctev_evar = ev_id } <- ifl
   = do { setEvBind ev_id (ctEvTerm wfl); return (IRInertConsumed ("Solved(g) " ++ info)) }
 
-  | otherwise	   -- If both are Given, we already have evidence; no need to duplicate
+  | otherwise      -- If both are Given, we already have evidence; no need to duplicate
                    -- But the work item *overrides* the inert item (hence IRReplace)
                    -- See Note [Shadowing of Implicit Parameters]
   = return (IRReplace ("Replace(gg) " ++ info))
@@ -975,18 +969,18 @@ Example 2:
 
 We need to prove (Eq (D [])). Here's how we go:
 
-	d1 :_w Eq (D [])
+        d1 :_w Eq (D [])
 
 by instance decl, holds if
-	d2 :_w Eq [D []]
-	where 	d1 = dfEqD d2
+        d2 :_w Eq [D []]
+        where   d1 = dfEqD d2
 
 *BUT* we have an inert set which gives us (no superclasses): 
         d1 :_g Eq (D []) 
 By the instance declaration of Eq we can show the 'd2' goal if 
-	d3 :_w Eq (D [])
-	where	d2 = dfEqList d3
-		d1 = dfEqD d2
+        d3 :_w Eq (D [])
+        where   d2 = dfEqList d3
+                d1 = dfEqD d2
 Now, however this wanted can interact with our inert d1 to set: 
         d3 := d1 
 and solve the goal. Why was this interaction OK? Because, if we chase the 
@@ -1024,7 +1018,7 @@ This code arises in the context of "Scrap Your Boilerplate with Class"
     instance                 Foo [Char]                         -- dfunFoo3
 
 Consider generating the superclasses of the instance declaration
-	 instance Foo a => Foo [a]
+         instance Foo a => Foo [a]
 
 So our problem is this
     d0 :_g Foo t
@@ -1126,21 +1120,21 @@ accidentally build a loop. Here's an example:
 
 From (instance C Int) we get the constraint set {ds1:S Int, dd:D Int}
 Simplifying, we may well get:
-	$dfCInt = :C ds1 (opd dd)
-	dd  = $dfDInt
-	ds1 = $p1 dd
+        $dfCInt = :C ds1 (opd dd)
+        dd  = $dfDInt
+        ds1 = $p1 dd
 Notice that we spot that we can extract ds1 from dd.  
 
 Alas!  Alack! We can do the same for (instance D Int):
 
-	$dfDInt = :D ds2 (opc dc)
-	dc  = $dfCInt
-	ds2 = $p1 dc
+        $dfDInt = :D ds2 (opc dc)
+        dc  = $dfCInt
+        ds2 = $p1 dc
 
 And now we've defined the superclass in terms of itself.
 Two more nasty cases are in
-	tcrun021
-	tcrun033
+        tcrun021
+        tcrun033
 
 Solution: 
   - Satisfy the superclass context *all by itself* 
@@ -1154,8 +1148,8 @@ Note [SUPERCLASS-LOOP 2]
 We need to be careful when adding "the constaint we are trying to prove".
 Suppose we are *given* d1:Ord a, and want to deduce (d2:C [a]) where
 
-	class Ord a => C a where
-	instance Ord [a] => C [a] where ...
+        class Ord a => C a where
+        instance Ord [a] => C [a] where ...
 
 Then we'll use the instance decl to deduce C [a] from Ord [a], and then add the
 superclasses of C [a] to avails.  But we must not overwrite the binding
@@ -1163,18 +1157,18 @@ for Ord [a] (which is obtained from Ord a) with a superclass selection or we'll
 build a loop! 
 
 Here's another variant, immortalised in tcrun020
-	class Monad m => C1 m
-	class C1 m => C2 m x
-	instance C2 Maybe Bool
+        class Monad m => C1 m
+        class C1 m => C2 m x
+        instance C2 Maybe Bool
 For the instance decl we need to build (C1 Maybe), and it's no good if
 we run around and add (C2 Maybe Bool) and its superclasses to the avails 
 before we search for C1 Maybe.
 
 Here's another example 
- 	class Eq b => Foo a b
-	instance Eq a => Foo [a] a
+        class Eq b => Foo a b
+        instance Eq a => Foo [a] a
 If we are reducing
-	(Foo [t] t)
+        (Foo [t] t)
 
 we'll first deduce that it holds (via the instance decl).  We must not
 then overwrite the Eq t constraint with a superclass selection!
@@ -1216,8 +1210,8 @@ So that leaves (Sat (Maybe [a])).  Using the instance for Sat means
 we need (Foo [a]).  And that is the very dictionary we are bulding
 an instance for!  So we must put that in the "givens".  So in this
 case we have
-	Given:  Foo a, Foo [a]
-	Wanted: Data Maybe [a]
+        Given:  Foo a, Foo [a]
+        Wanted: Data Maybe [a]
 
 BUT we must *not not not* put the *superclasses* of (Foo [a]) in
 the givens, which is what 'addGiven' would normally do. Why? Because
@@ -1243,7 +1237,7 @@ We need a persistent property of the dictionary to record this
 special-ness.  Current I'm using the InstLocOrigin (a bit of a hack,
 but cool), which is maintained by dictionary normalisation.
 Specifically, the InstLocOrigin is
-	     NoScOrigin
+             NoScOrigin
 then the no-superclass thing kicks in.  WATCH OUT if you fiddle
 with InstLocOrigin!
 
@@ -1279,8 +1273,8 @@ constraint right away.  This avoids two dangers
 
  Danger 1: If we send the original constraint on down the pipeline
            it may react with an instance declaration, and in delicate
-	   situations (when a Given overlaps with an instance) that
-	   may produce new insoluble goals: see Trac #4952
+           situations (when a Given overlaps with an instance) that
+           may produce new insoluble goals: see Trac #4952
 
  Danger 2: If we don't rewrite the constraint, it may re-react
            with the same thing later, and produce the same equality
@@ -1326,12 +1320,12 @@ mkEqnMsg :: (TcPredType, SDoc)
 mkEqnMsg (pred1,from1) (pred2,from2) tidy_env
   = do  { zpred1 <- zonkTcPredType pred1
         ; zpred2 <- zonkTcPredType pred2
-	; let { tpred1 = tidyType tidy_env zpred1
+        ; let { tpred1 = tidyType tidy_env zpred1
               ; tpred2 = tidyType tidy_env zpred2 }
-	; let msg = vcat [ptext (sLit "When using functional dependencies to combine"),
-			  nest 2 (sep [ppr tpred1 <> comma, nest 2 from1]), 
-			  nest 2 (sep [ppr tpred2 <> comma, nest 2 from2])]
-	; return (tidy_env, msg) }
+        ; let msg = vcat [ptext (sLit "When using functional dependencies to combine"),
+                          nest 2 (sep [ppr tpred1 <> comma, nest 2 from1]), 
+                          nest 2 (sep [ppr tpred2 <> comma, nest 2 from2])]
+        ; return (tidy_env, msg) }
 \end{code}
 
 
@@ -1375,16 +1369,16 @@ doTopReact :: InertSet -> WorkItem -> TcS TopInteractResult
 doTopReact inerts workItem
   = do { traceTcS "doTopReact" (ppr workItem)
        ; case workItem of
-      	   CDictCan { cc_ev = fl, cc_class = cls, cc_tyargs = xis
-      	            , cc_loc = d }
-      	      -> doTopReactDict inerts fl cls xis d
+           CDictCan { cc_ev = fl, cc_class = cls, cc_tyargs = xis
+                    , cc_loc = d }
+              -> doTopReactDict inerts fl cls xis d
 
-      	   CFunEqCan { cc_ev = fl, cc_fun = tc, cc_tyargs = args
-      	             , cc_rhs = xi, cc_loc = d }
-      	      -> doTopReactFunEq workItem fl tc args xi d
+           CFunEqCan { cc_ev = fl, cc_fun = tc, cc_tyargs = args
+                     , cc_rhs = xi, cc_loc = d }
+              -> doTopReactFunEq workItem fl tc args xi d
 
-      	   _  -> -- Any other work item does not react with any top-level equations
-      	         return NoTopInt  }
+           _  -> -- Any other work item does not react with any top-level equations
+                 return NoTopInt  }
 
 --------------------
 doTopReactDict :: InertSet -> CtEvidence -> Class -> [Xi]
@@ -1523,7 +1517,7 @@ paramters, is that we simply produce new Derived equalities.  So for example
     spontaneously solved to become given and react with d2,
     discharging it in favour of a new constraint d2' thus:
         d2' :w D Int Bool
-	d2 := d2' |> D Int cv
+        d2 := d2' |> D Int cv
     Now d2' can be discharged from d1
 
 We could be more aggressive and try to *immediately* solve the dictionary 
@@ -1587,9 +1581,9 @@ Note [Weird fundeps]
 Consider   class Het a b | a -> b where
               het :: m (f c) -> a -> m b
 
-	   class GHet (a :: * -> *) (b :: * -> *) | a -> b
-	   instance            GHet (K a) (K [a])
-	   instance Het a b => GHet (K a) (K b)
+           class GHet (a :: * -> *) (b :: * -> *) | a -> b
+           instance            GHet (K a) (K [a])
+           instance Het a b => GHet (K a) (K b)
 
 The two instances don't actually conflict on their fundeps,
 although it's pretty strange.  So they are both accepted. Now
@@ -1798,7 +1792,7 @@ matchClassInst inerts clas tys loc
                         vcat [ text "dict" <+> ppr pred ]
                       ; return NoInstance }
 
-	    ([(ispec, inst_tys)], [], _) -- A single match 
+            ([(ispec, inst_tys)], [], _) -- A single match 
                 | not (xopt Opt_IncoherentInstances dflags)
                 , given_overlap untch 
                 -> -- See Note [Instance and Given overlap]
@@ -1808,18 +1802,18 @@ matchClassInst inerts clas tys loc
                       ; return NoInstance  }
 
                 | otherwise
-		-> do	{ let dfun_id = instanceDFunId ispec
-			; traceTcS "matchClass success" $
+                -> do   { let dfun_id = instanceDFunId ispec
+                        ; traceTcS "matchClass success" $
                           vcat [text "dict" <+> ppr pred, 
                                 text "witness" <+> ppr dfun_id
                                                <+> ppr (idType dfun_id) ]
-				  -- Record that this dfun is needed
+                                  -- Record that this dfun is needed
                         ; match_one dfun_id inst_tys }
 
-     	    (matches, _, _)    -- More than one matches 
+            (matches, _, _)    -- More than one matches 
                                -- Defer any reactions of a multitude
                                -- until we learn more about the reagent 
-		-> do	{ traceTcS "matchClass multiple matches, deferring choice" $
+                -> do   { traceTcS "matchClass multiple matches, deferring choice" $
                           vcat [text "dict" <+> ppr pred,
                                 text "matches" <+> ppr matches]
                         ; return NoInstance } }
diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs
index 93e3c82..d8368d6 100644
--- a/compiler/typecheck/TcMType.lhs
+++ b/compiler/typecheck/TcMType.lhs
@@ -9,12 +9,6 @@ This module contains monadic operations over types that contain
 mutable type variables
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcMType (
   TcTyVar, TcKind, TcType, TcTauType, TcThetaType, TcTyVarSet,
@@ -22,8 +16,8 @@ module TcMType (
   --------------------------------
   -- Creating new mutable type variables
   newFlexiTyVar,
-  newFlexiTyVarTy,		-- Kind -> TcM TcType
-  newFlexiTyVarTys,		-- Int -> Kind -> TcM [TcType]
+  newFlexiTyVarTy,              -- Kind -> TcM TcType
+  newFlexiTyVarTys,             -- Int -> Kind -> TcM [TcType]
   newPolyFlexiTyVarTy,
   newMetaKindVar, newMetaKindVars,
   mkTcTyVarName, cloneMetaTyVar, 
@@ -91,24 +85,24 @@ import Data.List        ( partition, mapAccumL )
 
 
 %************************************************************************
-%*									*
-	Kind variables
-%*									*
+%*                                                                      *
+        Kind variables
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 mkKindName :: Unique -> Name
 mkKindName unique = mkSystemName unique kind_var_occ
 
-kind_var_occ :: OccName	-- Just one for all MetaKindVars
-			-- They may be jiggled by tidying
+kind_var_occ :: OccName -- Just one for all MetaKindVars
+                        -- They may be jiggled by tidying
 kind_var_occ = mkOccName tvName "k"
 
 newMetaKindVar :: TcM TcKind
 newMetaKindVar = do { uniq <- newUnique
-		    ; details <- newMetaDetails TauTv
+                    ; details <- newMetaDetails TauTv
                     ; let kv = mkTcTyVar (mkKindName uniq) superKind details
-		    ; return (mkTyVarTy kv) }
+                    ; return (mkTyVarTy kv) }
 
 newMetaKindVars :: Int -> TcM [TcKind]
 newMetaKindVars n = mapM (\ _ -> newMetaKindVar) (nOfThem n ())
@@ -116,9 +110,9 @@ newMetaKindVars n = mapM (\ _ -> newMetaKindVar) (nOfThem n ())
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
      Evidence variables; range over constraints we can abstract over
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -176,27 +170,27 @@ newFlatWanteds orig theta
 \end{code}
 
 %************************************************************************
-%*									*
-	SkolemTvs (immutable)
-%*									*
+%*                                                                      *
+        SkolemTvs (immutable)
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 tcInstType :: ([TyVar] -> TcM (TvSubst, [TcTyVar]))     -- How to instantiate the type variables
-	   -> TcType 					-- Type to instantiate
-	   -> TcM ([TcTyVar], TcThetaType, TcType)	-- Result
-		-- (type vars (excl coercion vars), preds (incl equalities), rho)
+           -> TcType                                    -- Type to instantiate
+           -> TcM ([TcTyVar], TcThetaType, TcType)      -- Result
+                -- (type vars (excl coercion vars), preds (incl equalities), rho)
 tcInstType inst_tyvars ty
   = case tcSplitForAllTys ty of
-	([],     rho) -> let	-- There may be overloading despite no type variables;
-				-- 	(?x :: Int) => Int -> Int
-			   (theta, tau) = tcSplitPhiTy rho
-			 in
-			 return ([], theta, tau)
+        ([],     rho) -> let    -- There may be overloading despite no type variables;
+                                --      (?x :: Int) => Int -> Int
+                           (theta, tau) = tcSplitPhiTy rho
+                         in
+                         return ([], theta, tau)
 
-	(tyvars, rho) -> do { (subst, tyvars') <- inst_tyvars tyvars
-			    ; let (theta, tau) = tcSplitPhiTy (substTy subst rho)
-			    ; return (tyvars', theta, tau) }
+        (tyvars, rho) -> do { (subst, tyvars') <- inst_tyvars tyvars
+                            ; let (theta, tau) = tcSplitPhiTy (substTy subst rho)
+                            ; return (tyvars', theta, tau) }
 
 tcSkolDFunType :: Type -> TcM ([TcTyVar], TcThetaType, TcType)
 -- Instantiate a type signature with skolem constants, but 
@@ -269,7 +263,7 @@ tcInstSigTyVars :: [TyVar] -> TcM (TvSubst, [TcTyVar])
 -- Precondition: tyvars should be ordered (kind vars first)
 -- see Note [Kind substitution when instantiating]
 tcInstSigTyVars = mapAccumLM tcInstSigTyVar (mkTopTvSubst [])
-	-- The tyvars are freshly made, by tcInstSigTyVar
+        -- The tyvars are freshly made, by tcInstSigTyVar
         -- So mkTopTvSubst [] is ok
 
 tcInstSigTyVar :: TvSubst -> TyVar -> TcM (TvSubst, TcTyVar)
@@ -310,28 +304,28 @@ instead of the buggous
 
 
 %************************************************************************
-%*									*
-	MetaTvs (meta type variables; mutable)
-%*									*
+%*                                                                      *
+        MetaTvs (meta type variables; mutable)
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 newMetaTyVar :: MetaInfo -> Kind -> TcM TcTyVar
 -- Make a new meta tyvar out of thin air
 newMetaTyVar meta_info kind
-  = do	{ uniq <- newUnique
+  = do  { uniq <- newUnique
         ; let name = mkTcTyVarName uniq s
               s = case meta_info of
                         PolyTv -> fsLit "s"
                         TauTv  -> fsLit "t"
                         SigTv  -> fsLit "a"
         ; details <- newMetaDetails meta_info
-	; return (mkTcTyVar name kind details) }
+        ; return (mkTcTyVar name kind details) }
 
 cloneMetaTyVar :: TcTyVar -> TcM TcTyVar
 cloneMetaTyVar tv
   = ASSERT( isTcTyVar tv )
-    do	{ uniq <- newUnique
+    do  { uniq <- newUnique
         ; ref  <- newMutVar Flexi
         ; let name'    = setNameUnique (tyVarName tv) uniq
               details' = case tcTyVarDetails tv of 
@@ -347,15 +341,15 @@ mkTcTyVarName uniq str = mkSysTvName uniq str
 -- Works for both type and kind variables
 readMetaTyVar :: TyVar -> TcM MetaDetails
 readMetaTyVar tyvar = ASSERT2( isMetaTyVar tyvar, ppr tyvar )
-		      readMutVar (metaTvRef tyvar)
+                      readMutVar (metaTvRef tyvar)
 
 isFilledMetaTyVar :: TyVar -> TcM Bool
 -- True of a filled-in (Indirect) meta type variable
 isFilledMetaTyVar tv
   | not (isTcTyVar tv) = return False
   | MetaTv { mtv_ref = ref } <- tcTyVarDetails tv
-  = do 	{ details <- readMutVar ref
-	; return (isIndirect details) }
+  = do  { details <- readMutVar ref
+        ; return (isIndirect details) }
   | otherwise = return False
 
 isFlexiMetaTyVar :: TyVar -> TcM Bool
@@ -363,8 +357,8 @@ isFlexiMetaTyVar :: TyVar -> TcM Bool
 isFlexiMetaTyVar tv
   | not (isTcTyVar tv) = return False
   | MetaTv { mtv_ref = ref } <- tcTyVarDetails tv
-  = do 	{ details <- readMutVar ref
-	; return (isFlexi details) }
+  = do  { details <- readMutVar ref
+        ; return (isFlexi details) }
   | otherwise = return False
 
 --------------------
@@ -426,9 +420,9 @@ writeMetaTyVarRef tyvar ref ty
 
 
 %************************************************************************
-%*									*
-	MetaTvs: TauTvs
-%*									*
+%*                                                                      *
+        MetaTvs: TauTvs
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -477,9 +471,9 @@ tcInstTyVarX subst tyvar
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Quantification
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [quantifyTyVars]
@@ -543,7 +537,7 @@ zonkQuantifiedTyVar :: TcTyVar -> TcM TcTyVar
 -- The quantified type variables often include meta type variables
 -- we want to freeze them into ordinary type variables, and
 -- default their kind (e.g. from OpenTypeKind to TypeKind)
--- 			-- see notes with Kind.defaultKind
+--                      -- see notes with Kind.defaultKind
 -- The meta tyvar is updated to point to the new skolem TyVar.  Now any 
 -- bound occurences of the original type variable will get zonked to 
 -- the immutable version.
@@ -557,8 +551,8 @@ zonkQuantifiedTyVar tv
     case tcTyVarDetails tv of
       SkolemTv {} -> do { kind <- zonkTcKind (tyVarKind tv)
                         ; return $ setTyVarKind tv kind }
-	-- It might be a skolem type variable, 
-	-- for example from a user type signature
+        -- It might be a skolem type variable, 
+        -- for example from a user type signature
 
       MetaTv { mtv_ref = ref } ->
           do when debugIsOn $ do
@@ -644,28 +638,28 @@ simplifier knows how to deal with.
 Note [Silly Type Synonyms]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider this:
-	type C u a = u	-- Note 'a' unused
+        type C u a = u  -- Note 'a' unused
 
-	foo :: (forall a. C u a -> C u a) -> u
-	foo x = ...
+        foo :: (forall a. C u a -> C u a) -> u
+        foo x = ...
 
-	bar :: Num u => u
-	bar = foo (\t -> t + t)
+        bar :: Num u => u
+        bar = foo (\t -> t + t)
 
 * From the (\t -> t+t) we get type  {Num d} =>  d -> d
   where d is fresh.
 
 * Now unify with type of foo's arg, and we get:
-	{Num (C d a)} =>  C d a -> C d a
+        {Num (C d a)} =>  C d a -> C d a
   where a is fresh.
 
 * Now abstract over the 'a', but float out the Num (C d a) constraint
   because it does not 'really' mention a.  (see exactTyVarsOfType)
   The arg to foo becomes
-	\/\a -> \t -> t+t
+        \/\a -> \t -> t+t
 
 * So we get a dict binding for Num (C d a), which is zonked to give
-	a = ()
+        a = ()
   [Note Sept 04: now that we are zonking quantified type variables
   on construction, the 'a' will be frozen as a regular tyvar on
   quantification, so the floated dict will still have type (C d a).
@@ -677,9 +671,9 @@ All very silly.   I think its harmless to ignore the problem.  We'll end up with
 a \/\a in the final result but all the occurrences of a will be zonked to ()
 
 %************************************************************************
-%*									*
+%*                                                                      *
               Zonking
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @tcGetGlobalTyVars@ returns a fully-zonked set of tyvars free in the environment.
@@ -901,11 +895,11 @@ zonkSkolemInfo skol_info = return skol_info
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Zonking -- the main work-horses: zonkTcType, zonkTcTyVar}
-%*									*
-%*		For internal use only!					*
-%*									*
+%*                                                                      *
+%*              For internal use only!                                  *
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -917,7 +911,7 @@ zonkId id
 
 -- For unbound, mutable tyvars, zonkType uses the function given to it
 -- For tyvars bound at a for-all, zonkType zonks them to an immutable
---	type variable and zonks the kind too
+--      type variable and zonks the kind too
 
 zonkTcType :: TcType -> TcM TcType
 zonkTcType ty
@@ -938,17 +932,17 @@ zonkTcType ty
     go (AppTy fun arg)   = do fun' <- go fun
                               arg' <- go arg
                               return (mkAppTy fun' arg')
-		-- NB the mkAppTy; we might have instantiated a
-		-- type variable to a type constructor, so we need
-		-- to pull the TyConApp to the top.
+                -- NB the mkAppTy; we might have instantiated a
+                -- type variable to a type constructor, so we need
+                -- to pull the TyConApp to the top.
                 -- OK to do this because only strict in the structure
                 -- not in the TyCon.
                 -- See Note [Zonking inside the knot] in TcHsType
 
-	-- The two interesting cases!
+        -- The two interesting cases!
     go (TyVarTy tyvar) | isTcTyVar tyvar = zonkTcTyVar tyvar
-		       | otherwise	 = TyVarTy <$> updateTyVarKindM go tyvar
-		-- Ordinary (non Tc) tyvars occur inside quantified types
+                       | otherwise       = TyVarTy <$> updateTyVarKindM go tyvar
+                -- Ordinary (non Tc) tyvars occur inside quantified types
 
     go (ForAllTy tv ty) = do { tv' <- zonkTcTyVarBndr tv
                              ; ty' <- go ty
@@ -974,8 +968,8 @@ zonkTcTyVar tv
       MetaTv { mtv_ref = ref }
          -> do { cts <- readMutVar ref
                ; case cts of
-	            Flexi       -> zonk_kind_and_return
-	            Indirect ty -> zonkTcType ty }
+                    Flexi       -> zonk_kind_and_return
+                    Indirect ty -> zonkTcType ty }
   where
     zonk_kind_and_return = do { z_tv <- zonkTyVarKind tv
                               ; return (TyVarTy z_tv) }
@@ -984,9 +978,9 @@ zonkTcTyVar tv
 
 
 %************************************************************************
-%*									*
-			Zonking kinds
-%*									*
+%*                                                                      *
+                        Zonking kinds
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/typecheck/TcMatches.lhs b/compiler/typecheck/TcMatches.lhs
index 08ce774..71a4fae 100644
--- a/compiler/typecheck/TcMatches.lhs
+++ b/compiler/typecheck/TcMatches.lhs
@@ -6,20 +6,14 @@
 TcMatches: Typecheck some @Matches@
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcMatches ( tcMatchesFun, tcGRHS, tcGRHSsPat, tcMatchesCase, tcMatchLambda,
-		   TcMatchCtxt(..), TcStmtChecker, TcExprStmtChecker, TcCmdStmtChecker,
-		   tcStmts, tcStmtsAndThen, tcDoStmts, tcBody,
-		   tcDoStmt, tcGuardStmt
+                   TcMatchCtxt(..), TcStmtChecker, TcExprStmtChecker, TcCmdStmtChecker,
+                   tcStmts, tcStmtsAndThen, tcDoStmts, tcBody,
+                   tcDoStmt, tcGuardStmt
        ) where
 
-import {-# SOURCE #-}	TcExpr( tcSyntaxOp, tcInferRhoNC, tcInferRho, tcCheckId,
+import {-# SOURCE #-}   TcExpr( tcSyntaxOp, tcInferRhoNC, tcInferRho, tcCheckId,
                                 tcMonoExpr, tcMonoExprNC, tcPolyExpr )
 
 import HsSyn
@@ -51,9 +45,9 @@ import Control.Monad
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{tcMatchesFun, tcMatchesCase}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @tcMatchesFun@ typechecks a @[Match]@ list which occurs in a
@@ -74,20 +68,20 @@ tcMatchesFun :: Name -> Bool
              -> TcM (HsWrapper, MatchGroup TcId (LHsExpr TcId))
                                 -- Returns type of body
 tcMatchesFun fun_name inf matches exp_ty
-  = do	{  -- Check that they all have the same no of arguments
-	   -- Location is in the monad, set the caller so that 
-	   -- any inter-equation error messages get some vaguely
-	   -- sensible location.	Note: we have to do this odd
-	   -- ann-grabbing, because we don't always have annotations in
-	   -- hand when we call tcMatchesFun...
+  = do  {  -- Check that they all have the same no of arguments
+           -- Location is in the monad, set the caller so that 
+           -- any inter-equation error messages get some vaguely
+           -- sensible location.        Note: we have to do this odd
+           -- ann-grabbing, because we don't always have annotations in
+           -- hand when we call tcMatchesFun...
           traceTc "tcMatchesFun" (ppr fun_name $$ ppr exp_ty)
-	; checkArgs fun_name matches
+        ; checkArgs fun_name matches
 
-	; (wrap_gen, (wrap_fun, group)) 
+        ; (wrap_gen, (wrap_fun, group)) 
             <- tcGen (FunSigCtxt fun_name) exp_ty $ \ _ exp_rho ->
-	          -- Note [Polymorphic expected type for tcMatchesFun]
+                  -- Note [Polymorphic expected type for tcMatchesFun]
                matchFunTys herald arity exp_rho $ \ pat_tys rhs_ty -> 
-	       tcMatches match_ctxt pat_tys rhs_ty matches 
+               tcMatches match_ctxt pat_tys rhs_ty matches 
         ; return (wrap_gen <.> wrap_fun, group) }
   where
     arity = matchGroupArity matches
@@ -122,12 +116,12 @@ tcMatchLambda match res_ty
   where
     n_pats = matchGroupArity match
     herald = sep [ ptext (sLit "The lambda expression")
-	        	 <+> quotes (pprSetDepth (PartWay 1) $ 
+                         <+> quotes (pprSetDepth (PartWay 1) $ 
                              pprMatches (LambdaExpr :: HsMatchContext Name) match),
-			-- The pprSetDepth makes the abstraction print briefly
-		ptext (sLit "has")]
+                        -- The pprSetDepth makes the abstraction print briefly
+                ptext (sLit "has")]
     match_ctxt = MC { mc_what = LambdaExpr,
-		      mc_body = tcBody }
+                      mc_body = tcBody }
 \end{code}
 
 @tcGRHSsPat@ typechecks @[GRHSs]@ that occur in a @PatMonoBind@.
@@ -139,13 +133,13 @@ tcGRHSsPat :: GRHSs Name (LHsExpr Name) -> TcRhoType
 tcGRHSsPat grhss res_ty = tcGRHSs match_ctxt grhss res_ty
   where
     match_ctxt = MC { mc_what = PatBindRhs,
-		      mc_body = tcBody }
+                      mc_body = tcBody }
 \end{code}
 
 
 \begin{code}
 matchFunTys
-  :: SDoc	-- See Note [Herald for matchExpecteFunTys] in TcUnify
+  :: SDoc       -- See Note [Herald for matchExpecteFunTys] in TcUnify
   -> Arity
   -> TcRhoType
   -> ([TcSigmaType] -> TcRhoType -> TcM a)
@@ -155,15 +149,15 @@ matchFunTys
 -- could probably be un-CPSd, like matchExpectedTyConApp
 
 matchFunTys herald arity res_ty thing_inside
-  = do	{ (co, pat_tys, res_ty) <- matchExpectedFunTys herald arity res_ty
-	; res <- thing_inside pat_tys res_ty
+  = do  { (co, pat_tys, res_ty) <- matchExpectedFunTys herald arity res_ty
+        ; res <- thing_inside pat_tys res_ty
         ; return (coToHsWrapper (mkTcSymCo co), res) }
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{tcMatch}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -181,9 +175,9 @@ data TcMatchCtxt body   -- c.f. TcStmtCtxt, also in this module
                  -> TcM (Located (body TcId)) }
 
 tcMatches ctxt pat_tys rhs_ty (MG { mg_alts = matches })
-  = ASSERT( not (null matches) )	-- Ensure that rhs_ty is filled in
-    do	{ matches' <- mapM (tcMatch ctxt pat_tys rhs_ty) matches
-	; return (MG { mg_alts = matches', mg_arg_tys = pat_tys, mg_res_ty = rhs_ty }) }
+  = ASSERT( not (null matches) )        -- Ensure that rhs_ty is filled in
+    do  { matches' <- mapM (tcMatch ctxt pat_tys rhs_ty) matches
+        ; return (MG { mg_alts = matches', mg_arg_tys = pat_tys, mg_res_ty = rhs_ty }) }
 
 -------------
 tcMatch :: (Outputable (body Name)) => TcMatchCtxt body
@@ -198,38 +192,38 @@ tcMatch ctxt pat_tys rhs_ty match
     tc_match ctxt pat_tys rhs_ty match@(Match pats maybe_rhs_sig grhss)
       = add_match_ctxt match $
         do { (pats', grhss') <- tcPats (mc_what ctxt) pats pat_tys $
-    			        tc_grhss ctxt maybe_rhs_sig grhss rhs_ty
-	   ; return (Match pats' Nothing grhss') }
+                                tc_grhss ctxt maybe_rhs_sig grhss rhs_ty
+           ; return (Match pats' Nothing grhss') }
 
     tc_grhss ctxt Nothing grhss rhs_ty 
-      = tcGRHSs ctxt grhss rhs_ty	-- No result signature
+      = tcGRHSs ctxt grhss rhs_ty       -- No result signature
 
-	-- Result type sigs are no longer supported
+        -- Result type sigs are no longer supported
     tc_grhss _ (Just {}) _ _
-      = panic "tc_ghrss"  	-- Rejected by renamer
+      = panic "tc_ghrss"        -- Rejected by renamer
 
-	-- For (\x -> e), tcExpr has already said "In the expresssion \x->e"
-	-- so we don't want to add "In the lambda abstraction \x->e"
+        -- For (\x -> e), tcExpr has already said "In the expresssion \x->e"
+        -- so we don't want to add "In the lambda abstraction \x->e"
     add_match_ctxt match thing_inside
-	= case mc_what ctxt of
-	    LambdaExpr -> thing_inside
-	    m_ctxt     -> addErrCtxt (pprMatchInCtxt m_ctxt match) thing_inside
+        = case mc_what ctxt of
+            LambdaExpr -> thing_inside
+            m_ctxt     -> addErrCtxt (pprMatchInCtxt m_ctxt match) thing_inside
 
 -------------
 tcGRHSs :: TcMatchCtxt body -> GRHSs Name (Located (body Name)) -> TcRhoType
-	-> TcM (GRHSs TcId (Located (body TcId)))
+        -> TcM (GRHSs TcId (Located (body TcId)))
 
 -- Notice that we pass in the full res_ty, so that we get
 -- good inference from simple things like
---	f = \(x::forall a.a->a) -> <stuff>
+--      f = \(x::forall a.a->a) -> <stuff>
 -- We used to force it to be a monotype when there was more than one guard
 -- but we don't need to do that any more
 
 tcGRHSs ctxt (GRHSs grhss binds) res_ty
-  = do	{ (binds', grhss') <- tcLocalBinds binds $
-			      mapM (wrapLocM (tcGRHS ctxt res_ty)) grhss
+  = do  { (binds', grhss') <- tcLocalBinds binds $
+                              mapM (wrapLocM (tcGRHS ctxt res_ty)) grhss
 
-	; return (GRHSs grhss' binds') }
+        ; return (GRHSs grhss' binds') }
 
 -------------
 tcGRHS :: TcMatchCtxt body -> TcRhoType -> GRHS Name (Located (body Name))
@@ -237,39 +231,39 @@ tcGRHS :: TcMatchCtxt body -> TcRhoType -> GRHS Name (Located (body Name))
 
 tcGRHS ctxt res_ty (GRHS guards rhs)
   = do  { (guards', rhs') <- tcStmtsAndThen stmt_ctxt tcGuardStmt guards res_ty $
-			     mc_body ctxt rhs
-	; return (GRHS guards' rhs') }
+                             mc_body ctxt rhs
+        ; return (GRHS guards' rhs') }
   where
     stmt_ctxt  = PatGuard (mc_what ctxt)
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{@tcDoStmts@ typechecks a {\em list} of do statements}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 tcDoStmts :: HsStmtContext Name 
-	  -> [LStmt Name (LHsExpr Name)]
-	  -> TcRhoType
-	  -> TcM (HsExpr TcId)		-- Returns a HsDo
+          -> [LStmt Name (LHsExpr Name)]
+          -> TcRhoType
+          -> TcM (HsExpr TcId)          -- Returns a HsDo
 tcDoStmts ListComp stmts res_ty
-  = do	{ (co, elt_ty) <- matchExpectedListTy res_ty
+  = do  { (co, elt_ty) <- matchExpectedListTy res_ty
         ; let list_ty = mkListTy elt_ty
-	; stmts' <- tcStmts ListComp (tcLcStmt listTyCon) stmts elt_ty
-	; return $ mkHsWrapCo co (HsDo ListComp stmts' list_ty) }
+        ; stmts' <- tcStmts ListComp (tcLcStmt listTyCon) stmts elt_ty
+        ; return $ mkHsWrapCo co (HsDo ListComp stmts' list_ty) }
 
 tcDoStmts PArrComp stmts res_ty
-  = do	{ (co, elt_ty) <- matchExpectedPArrTy res_ty
+  = do  { (co, elt_ty) <- matchExpectedPArrTy res_ty
         ; let parr_ty = mkPArrTy elt_ty
-	; stmts' <- tcStmts PArrComp (tcLcStmt parrTyCon) stmts elt_ty
-	; return $ mkHsWrapCo co (HsDo PArrComp stmts' parr_ty) }
+        ; stmts' <- tcStmts PArrComp (tcLcStmt parrTyCon) stmts elt_ty
+        ; return $ mkHsWrapCo co (HsDo PArrComp stmts' parr_ty) }
 
 tcDoStmts DoExpr stmts res_ty
-  = do	{ stmts' <- tcStmts DoExpr tcDoStmt stmts res_ty
-	; return (HsDo DoExpr stmts' res_ty) }
+  = do  { stmts' <- tcStmts DoExpr tcDoStmt stmts res_ty
+        ; return (HsDo DoExpr stmts' res_ty) }
 
 tcDoStmts MDoExpr stmts res_ty
   = do  { stmts' <- tcStmts MDoExpr tcDoStmt stmts res_ty
@@ -283,17 +277,17 @@ tcDoStmts ctxt _ _ = pprPanic "tcDoStmts" (pprStmtContext ctxt)
 
 tcBody :: LHsExpr Name -> TcRhoType -> TcM (LHsExpr TcId)
 tcBody body res_ty
-  = do	{ traceTc "tcBody" (ppr res_ty)
-	; body' <- tcMonoExpr body res_ty
-	; return body' 
+  = do  { traceTc "tcBody" (ppr res_ty)
+        ; body' <- tcMonoExpr body res_ty
+        ; return body' 
         } 
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{tcStmts}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -329,49 +323,49 @@ tcStmtsAndThen :: (Outputable (body Name)) => HsStmtContext Name
 -- types in the equations for tcStmts
 
 tcStmtsAndThen _ _ [] res_ty thing_inside
-  = do	{ thing <- thing_inside res_ty
-	; return ([], thing) }
+  = do  { thing <- thing_inside res_ty
+        ; return ([], thing) }
 
 -- LetStmts are handled uniformly, regardless of context
 tcStmtsAndThen ctxt stmt_chk (L loc (LetStmt binds) : stmts) res_ty thing_inside
-  = do	{ (binds', (stmts',thing)) <- tcLocalBinds binds $
-				      tcStmtsAndThen ctxt stmt_chk stmts res_ty thing_inside
-	; return (L loc (LetStmt binds') : stmts', thing) }
+  = do  { (binds', (stmts',thing)) <- tcLocalBinds binds $
+                                      tcStmtsAndThen ctxt stmt_chk stmts res_ty thing_inside
+        ; return (L loc (LetStmt binds') : stmts', thing) }
 
 -- For the vanilla case, handle the location-setting part
 tcStmtsAndThen ctxt stmt_chk (L loc stmt : stmts) res_ty thing_inside
-  = do 	{ (stmt', (stmts', thing)) <- 
-		setSrcSpan loc		 		    $
-    		addErrCtxt (pprStmtInCtxt ctxt stmt)	    $
-		stmt_chk ctxt stmt res_ty		    $ \ res_ty' ->
-		popErrCtxt 				    $
-		tcStmtsAndThen ctxt stmt_chk stmts res_ty'  $
-		thing_inside
-	; return (L loc stmt' : stmts', thing) }
+  = do  { (stmt', (stmts', thing)) <- 
+                setSrcSpan loc                              $
+                addErrCtxt (pprStmtInCtxt ctxt stmt)        $
+                stmt_chk ctxt stmt res_ty                   $ \ res_ty' ->
+                popErrCtxt                                  $
+                tcStmtsAndThen ctxt stmt_chk stmts res_ty'  $
+                thing_inside
+        ; return (L loc stmt' : stmts', thing) }
 
 ---------------------------------------------------
---	        Pattern guards
+--              Pattern guards
 ---------------------------------------------------
 
 tcGuardStmt :: TcExprStmtChecker
 tcGuardStmt _ (BodyStmt guard _ _ _) res_ty thing_inside
-  = do	{ guard' <- tcMonoExpr guard boolTy
-	; thing  <- thing_inside res_ty
-	; return (BodyStmt guard' noSyntaxExpr noSyntaxExpr boolTy, thing) }
+  = do  { guard' <- tcMonoExpr guard boolTy
+        ; thing  <- thing_inside res_ty
+        ; return (BodyStmt guard' noSyntaxExpr noSyntaxExpr boolTy, thing) }
 
 tcGuardStmt ctxt (BindStmt pat rhs _ _) res_ty thing_inside
-  = do	{ (rhs', rhs_ty) <- tcInferRhoNC rhs	-- Stmt has a context already
-	; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat rhs_ty $
+  = do  { (rhs', rhs_ty) <- tcInferRhoNC rhs    -- Stmt has a context already
+        ; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat rhs_ty $
                             thing_inside res_ty
-	; return (BindStmt pat' rhs' noSyntaxExpr noSyntaxExpr, thing) }
+        ; return (BindStmt pat' rhs' noSyntaxExpr noSyntaxExpr, thing) }
 
 tcGuardStmt _ stmt _ _
   = pprPanic "tcGuardStmt: unexpected Stmt" (ppr stmt)
 
 
 ---------------------------------------------------
---	     List comprehensions and PArrays
---	         (no rebindable syntax)
+--           List comprehensions and PArrays
+--               (no rebindable syntax)
 ---------------------------------------------------
 
 -- Dealt with separately, rather than by tcMcStmt, because
@@ -393,45 +387,45 @@ tcLcStmt _ _ (LastStmt body _) elt_ty thing_inside
 
 -- A generator, pat <- rhs
 tcLcStmt m_tc ctxt (BindStmt pat rhs _ _) elt_ty thing_inside
- = do	{ pat_ty <- newFlexiTyVarTy liftedTypeKind
+ = do   { pat_ty <- newFlexiTyVarTy liftedTypeKind
         ; rhs'   <- tcMonoExpr rhs (mkTyConApp m_tc [pat_ty])
-	; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat pat_ty $
+        ; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat pat_ty $
                             thing_inside elt_ty
-	; return (BindStmt pat' rhs' noSyntaxExpr noSyntaxExpr, thing) }
+        ; return (BindStmt pat' rhs' noSyntaxExpr noSyntaxExpr, thing) }
 
 -- A boolean guard
 tcLcStmt _ _ (BodyStmt rhs _ _ _) elt_ty thing_inside
-  = do	{ rhs'  <- tcMonoExpr rhs boolTy
-	; thing <- thing_inside elt_ty
-	; return (BodyStmt rhs' noSyntaxExpr noSyntaxExpr boolTy, thing) }
+  = do  { rhs'  <- tcMonoExpr rhs boolTy
+        ; thing <- thing_inside elt_ty
+        ; return (BodyStmt rhs' noSyntaxExpr noSyntaxExpr boolTy, thing) }
 
 -- ParStmt: See notes with tcMcStmt
 tcLcStmt m_tc ctxt (ParStmt bndr_stmts_s _ _) elt_ty thing_inside
-  = do	{ (pairs', thing) <- loop bndr_stmts_s
-	; return (ParStmt pairs' noSyntaxExpr noSyntaxExpr, thing) }
+  = do  { (pairs', thing) <- loop bndr_stmts_s
+        ; return (ParStmt pairs' noSyntaxExpr noSyntaxExpr, thing) }
   where
     -- loop :: [([LStmt Name], [Name])] -> TcM ([([LStmt TcId], [TcId])], thing)
     loop [] = do { thing <- thing_inside elt_ty
-		 ; return ([], thing) }		-- matching in the branches
+                 ; return ([], thing) }         -- matching in the branches
 
     loop (ParStmtBlock stmts names _ : pairs)
       = do { (stmts', (ids, pairs', thing))
-		<- tcStmtsAndThen ctxt (tcLcStmt m_tc) stmts elt_ty $ \ _elt_ty' ->
-		   do { ids <- tcLookupLocalIds names
-		      ; (pairs', thing) <- loop pairs
-		      ; return (ids, pairs', thing) }
-	   ; return ( ParStmtBlock stmts' ids noSyntaxExpr : pairs', thing ) }
+                <- tcStmtsAndThen ctxt (tcLcStmt m_tc) stmts elt_ty $ \ _elt_ty' ->
+                   do { ids <- tcLookupLocalIds names
+                      ; (pairs', thing) <- loop pairs
+                      ; return (ids, pairs', thing) }
+           ; return ( ParStmtBlock stmts' ids noSyntaxExpr : pairs', thing ) }
 
 tcLcStmt m_tc ctxt (TransStmt { trS_form = form, trS_stmts = stmts
                               , trS_bndrs =  bindersMap
                               , trS_by = by, trS_using = using }) elt_ty thing_inside
   = do { let (bndr_names, n_bndr_names) = unzip bindersMap
              unused_ty = pprPanic "tcLcStmt: inner ty" (ppr bindersMap)
-       	     -- The inner 'stmts' lack a LastStmt, so the element type
-	     --  passed in to tcStmtsAndThen is never looked at
+             -- The inner 'stmts' lack a LastStmt, so the element type
+             --  passed in to tcStmtsAndThen is never looked at
        ; (stmts', (bndr_ids, by'))
             <- tcStmtsAndThen (TransStmtCtxt ctxt) (tcLcStmt m_tc) stmts unused_ty $ \_ -> do
-	       { by' <- case by of
+               { by' <- case by of
                            Nothing -> return Nothing
                            Just e  -> do { e_ty <- tcInferRho e; return (Just e_ty) }
                ; bndr_ids <- tcLookupLocalIds bndr_names
@@ -446,7 +440,7 @@ tcLcStmt m_tc ctxt (TransStmt { trS_form = form, trS_stmts = stmts
          -- n_app :: Type -> Type   -- Wraps a 'ty' into '[ty]' for GroupForm
        ; let n_app = case form of
                        ThenForm -> (\ty -> ty)
-  		       _ 	-> m_app
+                       _        -> m_app
 
              by_arrow :: Type -> Type     -- Wraps 'ty' to '(a->t) -> ty' if the By is present
              by_arrow = case by' of
@@ -455,22 +449,22 @@ tcLcStmt m_tc ctxt (TransStmt { trS_form = form, trS_stmts = stmts
 
              tup_ty        = mkBigCoreVarTupTy bndr_ids
              poly_arg_ty   = m_app alphaTy
-	     poly_res_ty   = m_app (n_app alphaTy)
-	     using_poly_ty = mkForAllTy alphaTyVar $ by_arrow $ 
+             poly_res_ty   = m_app (n_app alphaTy)
+             using_poly_ty = mkForAllTy alphaTyVar $ by_arrow $ 
                              poly_arg_ty `mkFunTy` poly_res_ty
 
        ; using' <- tcPolyExpr using using_poly_ty
        ; let final_using = fmap (HsWrap (WpTyApp tup_ty)) using' 
 
-	     -- 'stmts' returns a result of type (m1_ty tuple_ty),
-	     -- typically something like [(Int,Bool,Int)]
-	     -- We don't know what tuple_ty is yet, so we use a variable
+             -- 'stmts' returns a result of type (m1_ty tuple_ty),
+             -- typically something like [(Int,Bool,Int)]
+             -- We don't know what tuple_ty is yet, so we use a variable
        ; let mk_n_bndr :: Name -> TcId -> TcId
              mk_n_bndr n_bndr_name bndr_id = mkLocalId n_bndr_name (n_app (idType bndr_id))
 
              -- Ensure that every old binder of type `b` is linked up with its
              -- new binder which should have type `n b`
-	     -- See Note [GroupStmt binder map] in HsExpr
+             -- See Note [GroupStmt binder map] in HsExpr
              n_bndr_ids  = zipWith mk_n_bndr n_bndr_names bndr_ids
              bindersMap' = bndr_ids `zip` n_bndr_ids
 
@@ -487,8 +481,8 @@ tcLcStmt _ _ stmt _ _
 
 
 ---------------------------------------------------
---	     Monad comprehensions 
---	  (supports rebindable syntax)
+--           Monad comprehensions 
+--        (supports rebindable syntax)
 ---------------------------------------------------
 
 tcMcStmt :: TcExprStmtChecker
@@ -512,7 +506,7 @@ tcMcStmt ctxt (BindStmt pat rhs bind_op fail_op) res_ty thing_inside
         ; pat_ty     <- newFlexiTyVarTy liftedTypeKind
         ; new_res_ty <- newFlexiTyVarTy liftedTypeKind
 
-	   -- (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty
+           -- (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty
         ; bind_op'   <- tcSyntaxOp MCompOrigin bind_op 
                              (mkFunTys [rhs_ty, mkFunTy pat_ty new_res_ty] res_ty)
 
@@ -532,7 +526,7 @@ tcMcStmt ctxt (BindStmt pat rhs bind_op fail_op) res_ty thing_inside
 --   [ body | stmts, expr ]  ->  expr :: m Bool
 --
 tcMcStmt _ (BodyStmt rhs then_op guard_op _) res_ty thing_inside
-  = do	{ -- Deal with rebindable syntax:
+  = do  { -- Deal with rebindable syntax:
           --    guard_op :: test_ty -> rhs_ty
           --    then_op  :: rhs_ty -> new_res_ty -> res_ty
           -- Where test_ty is, for example, Bool
@@ -543,9 +537,9 @@ tcMcStmt _ (BodyStmt rhs then_op guard_op _) res_ty thing_inside
         ; guard_op'  <- tcSyntaxOp MCompOrigin guard_op
                                    (mkFunTy test_ty rhs_ty)
         ; then_op'   <- tcSyntaxOp MCompOrigin then_op
-		                   (mkFunTys [rhs_ty, new_res_ty] res_ty)
-	; thing      <- thing_inside new_res_ty
-	; return (BodyStmt rhs' then_op' guard_op' rhs_ty, thing) }
+                                   (mkFunTys [rhs_ty, new_res_ty] res_ty)
+        ; thing      <- thing_inside new_res_ty
+        ; return (BodyStmt rhs' then_op' guard_op' rhs_ty, thing) }
 
 -- Grouping statements
 --
@@ -559,10 +553,10 @@ tcMcStmt _ (BodyStmt rhs then_op guard_op _) res_ty thing_inside
 --     f <optional by> [ (a,b,c) | stmts ] >>= \(a,b,c) -> ...body....
 --
 -- We type the functions as follows:
---     f <optional by> :: m1 (a,b,c) -> m2 (a,b,c)		(ThenForm)
---     	 	       :: m1 (a,b,c) -> m2 (n (a,b,c))		(GroupForm)
---     (>>=) :: m2 (a,b,c)     -> ((a,b,c)   -> res) -> res	(ThenForm)
---           :: m2 (n (a,b,c)) -> (n (a,b,c) -> res) -> res	(GroupForm)
+--     f <optional by> :: m1 (a,b,c) -> m2 (a,b,c)              (ThenForm)
+--                     :: m1 (a,b,c) -> m2 (n (a,b,c))          (GroupForm)
+--     (>>=) :: m2 (a,b,c)     -> ((a,b,c)   -> res) -> res     (ThenForm)
+--           :: m2 (n (a,b,c)) -> (n (a,b,c) -> res) -> res     (GroupForm)
 -- 
 tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap
                          , trS_by = by, trS_using = using, trS_form = form
@@ -577,8 +571,8 @@ tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap
          -- n_app :: Type -> Type   -- Wraps a 'ty' into '(n ty)' for GroupForm
        ; n_app <- case form of
                     ThenForm -> return (\ty -> ty)
-		    _ 	     -> do { n_ty <- newFlexiTyVarTy star_star_kind
-                      	           ; return (n_ty `mkAppTy`) }
+                    _        -> do { n_ty <- newFlexiTyVarTy star_star_kind
+                                   ; return (n_ty `mkAppTy`) }
        ; let by_arrow :: Type -> Type     
              -- (by_arrow res) produces ((alpha->e_ty) -> res)     ('by' present)
              --                          or res                    ('by' absent) 
@@ -588,18 +582,18 @@ tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap
 
              poly_arg_ty  = m1_ty `mkAppTy` alphaTy
              using_arg_ty = m1_ty `mkAppTy` tup_ty
-	     poly_res_ty  = m2_ty `mkAppTy` n_app alphaTy
-	     using_res_ty = m2_ty `mkAppTy` n_app tup_ty
-	     using_poly_ty = mkForAllTy alphaTyVar $ by_arrow $ 
+             poly_res_ty  = m2_ty `mkAppTy` n_app alphaTy
+             using_res_ty = m2_ty `mkAppTy` n_app tup_ty
+             using_poly_ty = mkForAllTy alphaTyVar $ by_arrow $ 
                              poly_arg_ty `mkFunTy` poly_res_ty
 
-	     -- 'stmts' returns a result of type (m1_ty tuple_ty),
-	     -- typically something like [(Int,Bool,Int)]
-	     -- We don't know what tuple_ty is yet, so we use a variable
+             -- 'stmts' returns a result of type (m1_ty tuple_ty),
+             -- typically something like [(Int,Bool,Int)]
+             -- We don't know what tuple_ty is yet, so we use a variable
        ; let (bndr_names, n_bndr_names) = unzip bindersMap
        ; (stmts', (bndr_ids, by', return_op')) <-
             tcStmtsAndThen (TransStmtCtxt ctxt) tcMcStmt stmts using_arg_ty $ \res_ty' -> do
-	        { by' <- case by of
+                { by' <- case by of
                            Nothing -> return Nothing
                            Just e  -> do { e' <- tcMonoExpr e by_e_ty; return (Just e') }
 
@@ -641,7 +635,7 @@ tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap
 
              -- Ensure that every old binder of type `b` is linked up with its
              -- new binder which should have type `n b`
-	     -- See Note [GroupStmt binder map] in HsExpr
+             -- See Note [GroupStmt binder map] in HsExpr
              n_bndr_ids = zipWith mk_n_bndr n_bndr_names bndr_ids
              bindersMap' = bndr_ids `zip` n_bndr_ids
 
@@ -655,17 +649,17 @@ tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap
                            , trS_fmap = fmap_op', trS_form = form }, thing) }
 
 -- A parallel set of comprehensions
---	[ (g x, h x) | ... ; let g v = ...
---		     | ... ; let h v = ... ]
+--      [ (g x, h x) | ... ; let g v = ...
+--                   | ... ; let h v = ... ]
 --
 -- It's possible that g,h are overloaded, so we need to feed the LIE from the
 -- (g x, h x) up through both lots of bindings (so we get the bindLocalMethods).
 -- Similarly if we had an existential pattern match:
 --
---	data T = forall a. Show a => C a
+--      data T = forall a. Show a => C a
 --
---	[ (show x, show y) | ... ; C x <- ...
---			   | ... ; C y <- ... ]
+--      [ (show x, show y) | ... ; C x <- ...
+--                         | ... ; C y <- ... ]
 --
 -- Then we need the LIE from (show x, show y) to be simplified against
 -- the bindings for x and y.  
@@ -724,7 +718,7 @@ tcMcStmt ctxt (ParStmt bndr_stmts_s mzip_op bind_op) res_ty thing_inside
            ; (stmts', (ids, return_op', pairs', thing))
                 <- tcStmtsAndThen ctxt tcMcStmt stmts m_tup_ty $ \m_tup_ty' ->
                    do { ids <- tcLookupLocalIds names
-    		      ; let tup_ty = mkBigCoreVarTupTy ids
+                      ; let tup_ty = mkBigCoreVarTupTy ids
                       ; return_op' <- tcSyntaxOp MCompOrigin return_op
                                           (tup_ty `mkFunTy` m_tup_ty')
                       ; (pairs', thing) <- loop m_ty pairs
@@ -736,8 +730,8 @@ tcMcStmt _ stmt _ _
 
 
 ---------------------------------------------------
---	     Do-notation
---	  (supports rebindable syntax)
+--           Do-notation
+--        (supports rebindable syntax)
 ---------------------------------------------------
 
 tcDoStmt :: TcExprStmtChecker
@@ -748,46 +742,46 @@ tcDoStmt _ (LastStmt body _) res_ty thing_inside
        ; return (LastStmt body' noSyntaxExpr, thing) }
 
 tcDoStmt ctxt (BindStmt pat rhs bind_op fail_op) res_ty thing_inside
-  = do	{ 	-- Deal with rebindable syntax:
-		--	 (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty
-		-- This level of generality is needed for using do-notation
-		-- in full generality; see Trac #1537
+  = do  {       -- Deal with rebindable syntax:
+                --       (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty
+                -- This level of generality is needed for using do-notation
+                -- in full generality; see Trac #1537
 
-		-- I'd like to put this *after* the tcSyntaxOp 
+                -- I'd like to put this *after* the tcSyntaxOp 
                 -- (see Note [Treat rebindable syntax first], but that breaks 
-		-- the rigidity info for GADTs.  When we move to the new story
+                -- the rigidity info for GADTs.  When we move to the new story
                 -- for GADTs, we can move this after tcSyntaxOp
           rhs_ty     <- newFlexiTyVarTy liftedTypeKind
         ; pat_ty     <- newFlexiTyVarTy liftedTypeKind
         ; new_res_ty <- newFlexiTyVarTy liftedTypeKind
-	; bind_op'   <- tcSyntaxOp DoOrigin bind_op 
-			     (mkFunTys [rhs_ty, mkFunTy pat_ty new_res_ty] res_ty)
+        ; bind_op'   <- tcSyntaxOp DoOrigin bind_op 
+                             (mkFunTys [rhs_ty, mkFunTy pat_ty new_res_ty] res_ty)
 
-		-- If (but only if) the pattern can fail, 
-		-- typecheck the 'fail' operator
-	; fail_op' <- if isIrrefutableHsPat pat 
-		      then return noSyntaxExpr
-		      else tcSyntaxOp DoOrigin fail_op (mkFunTy stringTy new_res_ty)
+                -- If (but only if) the pattern can fail, 
+                -- typecheck the 'fail' operator
+        ; fail_op' <- if isIrrefutableHsPat pat 
+                      then return noSyntaxExpr
+                      else tcSyntaxOp DoOrigin fail_op (mkFunTy stringTy new_res_ty)
 
         ; rhs' <- tcMonoExprNC rhs rhs_ty
-	; (pat', thing) <- tcPat (StmtCtxt ctxt) pat pat_ty $
+        ; (pat', thing) <- tcPat (StmtCtxt ctxt) pat pat_ty $
                            thing_inside new_res_ty
 
-	; return (BindStmt pat' rhs' bind_op' fail_op', thing) }
+        ; return (BindStmt pat' rhs' bind_op' fail_op', thing) }
 
 
 tcDoStmt _ (BodyStmt rhs then_op _ _) res_ty thing_inside
-  = do	{   	-- Deal with rebindable syntax; 
+  = do  {       -- Deal with rebindable syntax; 
                 --   (>>) :: rhs_ty -> new_res_ty -> res_ty
-		-- See also Note [Treat rebindable syntax first]
+                -- See also Note [Treat rebindable syntax first]
           rhs_ty     <- newFlexiTyVarTy liftedTypeKind
         ; new_res_ty <- newFlexiTyVarTy liftedTypeKind
-	; then_op' <- tcSyntaxOp DoOrigin then_op 
-			   (mkFunTys [rhs_ty, new_res_ty] res_ty)
+        ; then_op' <- tcSyntaxOp DoOrigin then_op 
+                           (mkFunTys [rhs_ty, new_res_ty] res_ty)
 
         ; rhs' <- tcMonoExprNC rhs rhs_ty
-	; thing <- thing_inside new_res_ty
-	; return (BodyStmt rhs' then_op' noSyntaxExpr rhs_ty, thing) }
+        ; thing <- thing_inside new_res_ty
+        ; return (BodyStmt rhs' then_op' noSyntaxExpr rhs_ty, thing) }
 
 tcDoStmt ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names
                        , recS_rec_ids = rec_names, recS_ret_fn = ret_op
@@ -796,7 +790,7 @@ tcDoStmt ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names
   = do  { let tup_names = rec_names ++ filterOut (`elem` rec_names) later_names
         ; tup_elt_tys <- newFlexiTyVarTys (length tup_names) liftedTypeKind
         ; let tup_ids = zipWith mkLocalId tup_names tup_elt_tys
-	      tup_ty  = mkBigCoreTupTy tup_elt_tys
+              tup_ty  = mkBigCoreTupTy tup_elt_tys
 
         ; tcExtendIdEnv tup_ids $ do
         { stmts_ty <- newFlexiTyVarTy liftedTypeKind
@@ -805,22 +799,22 @@ tcDoStmt ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names
                    do { tup_rets <- zipWithM tcCheckId tup_names tup_elt_tys
                              -- Unify the types of the "final" Ids (which may 
                              -- be polymorphic) with those of "knot-tied" Ids
-		      ; ret_op' <- tcSyntaxOp DoOrigin ret_op (mkFunTy tup_ty inner_res_ty)
+                      ; ret_op' <- tcSyntaxOp DoOrigin ret_op (mkFunTy tup_ty inner_res_ty)
                       ; return (ret_op', tup_rets) }
 
-	; mfix_res_ty <- newFlexiTyVarTy liftedTypeKind
+        ; mfix_res_ty <- newFlexiTyVarTy liftedTypeKind
         ; mfix_op' <- tcSyntaxOp DoOrigin mfix_op
                                  (mkFunTy (mkFunTy tup_ty stmts_ty) mfix_res_ty)
 
-	; new_res_ty <- newFlexiTyVarTy liftedTypeKind
+        ; new_res_ty <- newFlexiTyVarTy liftedTypeKind
         ; bind_op' <- tcSyntaxOp DoOrigin bind_op 
-			         (mkFunTys [mfix_res_ty, mkFunTy tup_ty new_res_ty] res_ty)
+                                 (mkFunTys [mfix_res_ty, mkFunTy tup_ty new_res_ty] res_ty)
 
         ; thing <- thing_inside new_res_ty
   
         ; let rec_ids = takeList rec_names tup_ids
-	; later_ids <- tcLookupLocalIds later_names
-	; traceTc "tcdo" $ vcat [ppr rec_ids <+> ppr (map idType rec_ids),
+        ; later_ids <- tcLookupLocalIds later_names
+        ; traceTc "tcdo" $ vcat [ppr rec_ids <+> ppr (map idType rec_ids),
                                  ppr later_ids <+> ppr (map idType later_ids)]
         ; return (RecStmt { recS_stmts = stmts', recS_later_ids = later_ids
                           , recS_rec_ids = rec_ids, recS_ret_fn = ret_op' 
@@ -836,7 +830,7 @@ tcDoStmt _ stmt _ _
 Note [Treat rebindable syntax first]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 When typechecking
-	do { bar; ... } :: IO ()
+        do { bar; ... } :: IO ()
 we want to typecheck 'bar' in the knowledge that it should be an IO thing,
 pushing info from the context into the RHS.  To do this, we check the
 rebindable syntax first, and push that information into (tcMonoExprNC rhs).
@@ -845,9 +839,9 @@ the expected/inferred stuff is back to front (see Trac #3613).
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Errors and contexts}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 @sameNoOfArgs@ takes a @[RenamedMatch]@ and decides whether the same
@@ -862,9 +856,9 @@ checkArgs fun (MG { mg_alts = match1:matches })
     = return ()
     | otherwise
     = failWithTc (vcat [ptext (sLit "Equations for") <+> quotes (ppr fun) <+> 
-			  ptext (sLit "have different numbers of arguments"),
-			nest 2 (ppr (getLoc match1)),
-			nest 2 (ppr (getLoc (head bad_matches)))])
+                          ptext (sLit "have different numbers of arguments"),
+                        nest 2 (ppr (getLoc match1)),
+                        nest 2 (ppr (getLoc (head bad_matches)))])
   where
     n_args1 = args_in_match match1
     bad_matches = [m | m <- matches, args_in_match m /= n_args1]
diff --git a/compiler/typecheck/TcPat.lhs b/compiler/typecheck/TcPat.lhs
index ae7ef73..04977c2 100644
--- a/compiler/typecheck/TcPat.lhs
+++ b/compiler/typecheck/TcPat.lhs
@@ -6,21 +6,15 @@
 TcPat: Typechecking patterns
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcPat ( tcLetPat, TcSigFun, TcSigInfo(..), TcPragFun 
              , LetBndrSpec(..), addInlinePrags, warnPrags
              , tcPat, tcPats, newNoSigLetBndr
-	     , addDataConStupidTheta, badFieldCon, polyPatSig ) where
+             , addDataConStupidTheta, badFieldCon, polyPatSig ) where
 
 #include "HsVersions.h"
 
-import {-# SOURCE #-}	TcExpr( tcSyntaxOp, tcInferRho)
+import {-# SOURCE #-}   TcExpr( tcSyntaxOp, tcInferRho)
 
 import HsSyn
 import TcHsSyn
@@ -52,16 +46,16 @@ import Control.Monad
 
 
 %************************************************************************
-%*									*
-		External interface
-%*									*
+%*                                                                      *
+                External interface
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 tcLetPat :: TcSigFun -> LetBndrSpec
-      	 -> LPat Name -> TcSigmaType 
-     	 -> TcM a
-      	 -> TcM (LPat TcId, a)
+         -> LPat Name -> TcSigmaType 
+         -> TcM a
+         -> TcM (LPat TcId, a)
 tcLetPat sig_fn no_gen pat pat_ty thing_inside
   = tc_lpat pat pat_ty penv thing_inside 
   where
@@ -70,8 +64,8 @@ tcLetPat sig_fn no_gen pat pat_ty thing_inside
 
 -----------------
 tcPats :: HsMatchContext Name
-       -> [LPat Name]		 -- Patterns,
-       -> [TcSigmaType]	         --   and their types
+       -> [LPat Name]            -- Patterns,
+       -> [TcSigmaType]          --   and their types
        -> TcM a                  --   and the checker for the body
        -> TcM ([LPat TcId], a)
 
@@ -104,8 +98,8 @@ tcPat ctxt pat pat_ty thing_inside
 
 -----------------
 data PatEnv
-  = PE { pe_lazy :: Bool	-- True <=> lazy context, so no existentials allowed
-       , pe_ctxt :: PatCtxt   	-- Context in which the whole pattern appears
+  = PE { pe_lazy :: Bool        -- True <=> lazy context, so no existentials allowed
+       , pe_ctxt :: PatCtxt     -- Context in which the whole pattern appears
        }
 
 data PatCtxt
@@ -113,18 +107,18 @@ data PatCtxt
        (HsMatchContext Name) 
 
   | LetPat   -- Used only for let(rec) pattern bindings
-    	     -- See Note [Typing patterns in pattern bindings]
+             -- See Note [Typing patterns in pattern bindings]
        TcSigFun        -- Tells type sig if any
        LetBndrSpec     -- True <=> no generalisation of this let
 
 data LetBndrSpec 
-  = LetLclBndr		  -- The binder is just a local one;
-    			  -- an AbsBinds will provide the global version
+  = LetLclBndr            -- The binder is just a local one;
+                          -- an AbsBinds will provide the global version
 
   | LetGblBndr TcPragFun  -- Genrealisation plan is NoGen, so there isn't going 
                           -- to be an AbsBinds; So we must bind the global version
                           -- of the binder right away.  
-    	       		  -- Oh, and dhhere is the inline-pragma information
+                          -- Oh, and dhhere is the inline-pragma information
 
 makeLazy :: PatEnv -> PatEnv
 makeLazy penv = penv { pe_lazy = True }
@@ -145,12 +139,12 @@ data TcSigInfo
                            -- Instantiated type and kind variables
                            -- Just n <=> this skolem is lexically in scope with name n
                            -- See Note [Kind vars in sig_tvs]
-                     	   -- See Note [More instantiated than scoped] in TcBinds
+                           -- See Note [More instantiated than scoped] in TcBinds
 
         sig_theta  :: TcThetaType,  -- Instantiated theta
 
         sig_tau    :: TcSigmaType,  -- Instantiated tau
-		      		    -- See Note [sig_tau may be polymorphic]
+                                    -- See Note [sig_tau may be polymorphic]
 
         sig_loc    :: SrcSpan       -- The location of the signature
     }
@@ -197,9 +191,9 @@ res_ty free vars.
 
 
 %************************************************************************
-%*									*
-		Binders
-%*									*
+%*                                                                      *
+                Binders
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -299,9 +293,9 @@ Two cases, dealt with by the LetPat case of tcPatBndr
 
 
 %************************************************************************
-%*									*
-		The main worker functions
-%*									*
+%*                                                                      *
+                The main worker functions
+%*                                                                      *
 %************************************************************************
 
 Note [Nesting]
@@ -318,46 +312,46 @@ Hence the getErrCtxt/setErrCtxt stuff in tcMultiple
 \begin{code}
 --------------------
 type Checker inp out =  forall r.
-			  inp
-		       -> PatEnv
-		       -> TcM r
-		       -> TcM (out, r)
+                          inp
+                       -> PatEnv
+                       -> TcM r
+                       -> TcM (out, r)
 
 tcMultiple :: Checker inp out -> Checker [inp] [out]
 tcMultiple tc_pat args penv thing_inside
-  = do	{ err_ctxt <- getErrCtxt
-	; let loop _ []
-		= do { res <- thing_inside
-		     ; return ([], res) }
-
-	      loop penv (arg:args)
-		= do { (p', (ps', res)) 
-				<- tc_pat arg penv $ 
-				   setErrCtxt err_ctxt $
-				   loop penv args
-		-- setErrCtxt: restore context before doing the next pattern
-		-- See note [Nesting] above
-				
-		     ; return (p':ps', res) }
-
-	; loop penv args }
+  = do  { err_ctxt <- getErrCtxt
+        ; let loop _ []
+                = do { res <- thing_inside
+                     ; return ([], res) }
+
+              loop penv (arg:args)
+                = do { (p', (ps', res)) 
+                                <- tc_pat arg penv $ 
+                                   setErrCtxt err_ctxt $
+                                   loop penv args
+                -- setErrCtxt: restore context before doing the next pattern
+                -- See note [Nesting] above
+                                
+                     ; return (p':ps', res) }
+
+        ; loop penv args }
 
 --------------------
 tc_lpat :: LPat Name 
-	-> TcSigmaType
-	-> PatEnv
-	-> TcM a
-	-> TcM (LPat TcId, a)
+        -> TcSigmaType
+        -> PatEnv
+        -> TcM a
+        -> TcM (LPat TcId, a)
 tc_lpat (L span pat) pat_ty penv thing_inside
   = setSrcSpan span $
-    do	{ (pat', res) <- maybeWrapPatCtxt pat (tc_pat penv pat pat_ty)
+    do  { (pat', res) <- maybeWrapPatCtxt pat (tc_pat penv pat pat_ty)
                                           thing_inside
-	; return (L span pat', res) }
+        ; return (L span pat', res) }
 
 tc_lpats :: PatEnv
-	 -> [LPat Name] -> [TcSigmaType]
-       	 -> TcM a	
-       	 -> TcM ([LPat TcId], a)
+         -> [LPat Name] -> [TcSigmaType]
+         -> TcM a       
+         -> TcM ([LPat TcId], a)
 tc_lpats penv pats tys thing_inside 
   = ASSERT2( equalLength pats tys, ppr pats $$ ppr tys )
     tcMultiple (\(p,t) -> tc_lpat p t) 
@@ -365,68 +359,68 @@ tc_lpats penv pats tys thing_inside
                 penv thing_inside 
 
 --------------------
-tc_pat	:: PatEnv
+tc_pat  :: PatEnv
         -> Pat Name 
-        -> TcSigmaType	-- Fully refined result type
-        -> TcM a		-- Thing inside
-        -> TcM (Pat TcId, 	-- Translated pattern
-                a)		-- Result of thing inside
+        -> TcSigmaType  -- Fully refined result type
+        -> TcM a                -- Thing inside
+        -> TcM (Pat TcId,       -- Translated pattern
+                a)              -- Result of thing inside
 
 tc_pat penv (VarPat name) pat_ty thing_inside
-  = do	{ (co, id) <- tcPatBndr penv name pat_ty
+  = do  { (co, id) <- tcPatBndr penv name pat_ty
         ; res <- tcExtendIdEnv1 name id thing_inside
         ; return (mkHsWrapPatCo co (VarPat id) pat_ty, res) }
 
 tc_pat penv (ParPat pat) pat_ty thing_inside
-  = do	{ (pat', res) <- tc_lpat pat pat_ty penv thing_inside
-	; return (ParPat pat', res) }
+  = do  { (pat', res) <- tc_lpat pat pat_ty penv thing_inside
+        ; return (ParPat pat', res) }
 
 tc_pat penv (BangPat pat) pat_ty thing_inside
-  = do	{ (pat', res) <- tc_lpat pat pat_ty penv thing_inside
-	; return (BangPat pat', res) }
+  = do  { (pat', res) <- tc_lpat pat pat_ty penv thing_inside
+        ; return (BangPat pat', res) }
 
 tc_pat penv lpat@(LazyPat pat) pat_ty thing_inside
-  = do	{ (pat', (res, pat_ct)) 
-		<- tc_lpat pat pat_ty (makeLazy penv) $ 
-		   captureConstraints thing_inside
-		-- Ignore refined penv', revert to penv
+  = do  { (pat', (res, pat_ct)) 
+                <- tc_lpat pat pat_ty (makeLazy penv) $ 
+                   captureConstraints thing_inside
+                -- Ignore refined penv', revert to penv
 
-	; emitConstraints pat_ct
-	-- captureConstraints/extendConstraints: 
+        ; emitConstraints pat_ct
+        -- captureConstraints/extendConstraints: 
         --   see Note [Hopping the LIE in lazy patterns]
 
-	-- Check there are no unlifted types under the lazy pattern
-	; when (any (isUnLiftedType . idType) $ collectPatBinders pat') $
+        -- Check there are no unlifted types under the lazy pattern
+        ; when (any (isUnLiftedType . idType) $ collectPatBinders pat') $
                lazyUnliftedPatErr lpat
 
-	-- Check that the expected pattern type is itself lifted
-	; pat_ty' <- newFlexiTyVarTy liftedTypeKind
-	; _ <- unifyType pat_ty pat_ty'
+        -- Check that the expected pattern type is itself lifted
+        ; pat_ty' <- newFlexiTyVarTy liftedTypeKind
+        ; _ <- unifyType pat_ty pat_ty'
 
-	; return (LazyPat pat', res) }
+        ; return (LazyPat pat', res) }
 
 tc_pat _ p@(QuasiQuotePat _) _ _
   = pprPanic "Should never see QuasiQuotePat in type checker" (ppr p)
 
 tc_pat _ (WildPat _) pat_ty thing_inside
-  = do	{ res <- thing_inside 
-	; return (WildPat pat_ty, res) }
+  = do  { res <- thing_inside 
+        ; return (WildPat pat_ty, res) }
 
 tc_pat penv (AsPat (L nm_loc name) pat) pat_ty thing_inside
-  = do	{ (co, bndr_id) <- setSrcSpan nm_loc (tcPatBndr penv name pat_ty)
+  = do  { (co, bndr_id) <- setSrcSpan nm_loc (tcPatBndr penv name pat_ty)
         ; (pat', res) <- tcExtendIdEnv1 name bndr_id $
-			 tc_lpat pat (idType bndr_id) penv thing_inside
-	    -- NB: if we do inference on:
-	    --		\ (y@(x::forall a. a->a)) = e
-	    -- we'll fail.  The as-pattern infers a monotype for 'y', which then
-	    -- fails to unify with the polymorphic type for 'x'.  This could 
-	    -- perhaps be fixed, but only with a bit more work.
-	    --
-	    -- If you fix it, don't forget the bindInstsOfPatIds!
-	; return (mkHsWrapPatCo co (AsPat (L nm_loc bndr_id) pat') pat_ty, res) }
+                         tc_lpat pat (idType bndr_id) penv thing_inside
+            -- NB: if we do inference on:
+            --          \ (y@(x::forall a. a->a)) = e
+            -- we'll fail.  The as-pattern infers a monotype for 'y', which then
+            -- fails to unify with the polymorphic type for 'x'.  This could 
+            -- perhaps be fixed, but only with a bit more work.
+            --
+            -- If you fix it, don't forget the bindInstsOfPatIds!
+        ; return (mkHsWrapPatCo co (AsPat (L nm_loc bndr_id) pat') pat_ty, res) }
 
 tc_pat penv (ViewPat expr pat _) overall_pat_ty thing_inside 
-  = do	{
+  = do  {
          -- Morally, expr must have type `forall a1...aN. OPT' -> B` 
          -- where overall_pat_ty is an instance of OPT'.
          -- Here, we infer a rho type for it,
@@ -440,69 +434,69 @@ tc_pat penv (ViewPat expr pat _) overall_pat_ty thing_inside
          -- (view -> f)    where view :: _ -> forall b. b
          -- we will only be able to use view at one instantation in the
          -- rest of the view
-	; (expr_co, pat_ty) <- tcInfer $ \ pat_ty -> 
-		unifyType expr'_inferred (mkFunTy overall_pat_ty pat_ty)
+        ; (expr_co, pat_ty) <- tcInfer $ \ pat_ty -> 
+                unifyType expr'_inferred (mkFunTy overall_pat_ty pat_ty)
         
          -- pattern must have pat_ty
         ; (pat', res) <- tc_lpat pat pat_ty penv thing_inside
 
-	; return (ViewPat (mkLHsWrapCo expr_co expr') pat' overall_pat_ty, res) }
+        ; return (ViewPat (mkLHsWrapCo expr_co expr') pat' overall_pat_ty, res) }
 
 -- Type signatures in patterns
 -- See Note [Pattern coercions] below
 tc_pat penv (SigPatIn pat sig_ty) pat_ty thing_inside
-  = do	{ (inner_ty, tv_binds, wrap) <- tcPatSig (patSigCtxt penv) sig_ty pat_ty
-	; (pat', res) <- tcExtendTyVarEnv2 tv_binds $
-			 tc_lpat pat inner_ty penv thing_inside
+  = do  { (inner_ty, tv_binds, wrap) <- tcPatSig (patSigCtxt penv) sig_ty pat_ty
+        ; (pat', res) <- tcExtendTyVarEnv2 tv_binds $
+                         tc_lpat pat inner_ty penv thing_inside
 
         ; return (mkHsWrapPat wrap (SigPatOut pat' inner_ty) pat_ty, res) }
 
 ------------------------
 -- Lists, tuples, arrays
 tc_pat penv (ListPat pats _ Nothing) pat_ty thing_inside
-  = do	{ (coi, elt_ty) <- matchExpectedPatTy matchExpectedListTy pat_ty      
+  = do  { (coi, elt_ty) <- matchExpectedPatTy matchExpectedListTy pat_ty      
         ; (pats', res) <- tcMultiple (\p -> tc_lpat p elt_ty)
-				     pats penv thing_inside
- 	; return (mkHsWrapPat coi (ListPat pats' elt_ty Nothing) pat_ty, res) 
+                                     pats penv thing_inside
+        ; return (mkHsWrapPat coi (ListPat pats' elt_ty Nothing) pat_ty, res) 
         }
 
 tc_pat penv (ListPat pats _ (Just (_,e))) pat_ty thing_inside
-  = do	{ list_pat_ty <- newFlexiTyVarTy liftedTypeKind
+  = do  { list_pat_ty <- newFlexiTyVarTy liftedTypeKind
         ; e' <- tcSyntaxOp ListOrigin e (mkFunTy pat_ty list_pat_ty)
         ; (coi, elt_ty) <- matchExpectedPatTy matchExpectedListTy list_pat_ty
         ; (pats', res) <- tcMultiple (\p -> tc_lpat p elt_ty)
-				     pats penv thing_inside
- 	; return (mkHsWrapPat coi (ListPat pats' elt_ty (Just (pat_ty,e'))) list_pat_ty, res) 
+                                     pats penv thing_inside
+        ; return (mkHsWrapPat coi (ListPat pats' elt_ty (Just (pat_ty,e'))) list_pat_ty, res) 
         }
 
 tc_pat penv (PArrPat pats _) pat_ty thing_inside
-  = do	{ (coi, elt_ty) <- matchExpectedPatTy matchExpectedPArrTy pat_ty
-	; (pats', res) <- tcMultiple (\p -> tc_lpat p elt_ty)
-				     pats penv thing_inside 
-	; return (mkHsWrapPat coi (PArrPat pats' elt_ty) pat_ty, res)
+  = do  { (coi, elt_ty) <- matchExpectedPatTy matchExpectedPArrTy pat_ty
+        ; (pats', res) <- tcMultiple (\p -> tc_lpat p elt_ty)
+                                     pats penv thing_inside 
+        ; return (mkHsWrapPat coi (PArrPat pats' elt_ty) pat_ty, res)
         }
 
 tc_pat penv (TuplePat pats boxity _) pat_ty thing_inside
-  = do	{ let tc = tupleTyCon (boxityNormalTupleSort boxity) (length pats)
+  = do  { let tc = tupleTyCon (boxityNormalTupleSort boxity) (length pats)
         ; (coi, arg_tys) <- matchExpectedPatTy (matchExpectedTyConApp tc) pat_ty
-	; (pats', res) <- tc_lpats penv pats arg_tys thing_inside
+        ; (pats', res) <- tc_lpats penv pats arg_tys thing_inside
 
-	; dflags <- getDynFlags
+        ; dflags <- getDynFlags
 
-	-- Under flag control turn a pattern (x,y,z) into ~(x,y,z)
-	-- so that we can experiment with lazy tuple-matching.
-	-- This is a pretty odd place to make the switch, but
-	-- it was easy to do.
-	; let pat_ty'          = mkTyConApp tc arg_tys
+        -- Under flag control turn a pattern (x,y,z) into ~(x,y,z)
+        -- so that we can experiment with lazy tuple-matching.
+        -- This is a pretty odd place to make the switch, but
+        -- it was easy to do.
+        ; let pat_ty'          = mkTyConApp tc arg_tys
                                      -- pat_ty /= pat_ty iff coi /= IdCo
               unmangled_result = TuplePat pats' boxity pat_ty'
-	      possibly_mangled_result
-	        | gopt Opt_IrrefutableTuples dflags &&
+              possibly_mangled_result
+                | gopt Opt_IrrefutableTuples dflags &&
                   isBoxed boxity            = LazyPat (noLoc unmangled_result)
-	        | otherwise		    = unmangled_result
+                | otherwise                 = unmangled_result
 
- 	; ASSERT( length arg_tys == length pats )      -- Syntactically enforced
-	  return (mkHsWrapPat coi possibly_mangled_result pat_ty, res)
+        ; ASSERT( length arg_tys == length pats )      -- Syntactically enforced
+          return (mkHsWrapPat coi possibly_mangled_result pat_ty, res)
         }
 
 ------------------------
@@ -513,48 +507,48 @@ tc_pat penv (ConPatIn con arg_pats) pat_ty thing_inside
 ------------------------
 -- Literal patterns
 tc_pat _ (LitPat simple_lit) pat_ty thing_inside
-  = do	{ let lit_ty = hsLitType simple_lit
-	; co <- unifyPatType lit_ty pat_ty
-		-- coi is of kind: pat_ty ~ lit_ty
-	; res <- thing_inside 
-	; return ( mkHsWrapPatCo co (LitPat simple_lit) pat_ty 
+  = do  { let lit_ty = hsLitType simple_lit
+        ; co <- unifyPatType lit_ty pat_ty
+                -- coi is of kind: pat_ty ~ lit_ty
+        ; res <- thing_inside 
+        ; return ( mkHsWrapPatCo co (LitPat simple_lit) pat_ty 
                  , res) }
 
 ------------------------
 -- Overloaded patterns: n, and n+k
 tc_pat _ (NPat over_lit mb_neg eq) pat_ty thing_inside
-  = do	{ let orig = LiteralOrigin over_lit
-	; lit'    <- newOverloadedLit orig over_lit pat_ty
-	; eq'     <- tcSyntaxOp orig eq (mkFunTys [pat_ty, pat_ty] boolTy)
-	; mb_neg' <- case mb_neg of
-			Nothing  -> return Nothing	-- Positive literal
-			Just neg -> 	-- Negative literal
-					-- The 'negate' is re-mappable syntax
- 			    do { neg' <- tcSyntaxOp orig neg (mkFunTy pat_ty pat_ty)
-			       ; return (Just neg') }
-	; res <- thing_inside 
-	; return (NPat lit' mb_neg' eq', res) }
+  = do  { let orig = LiteralOrigin over_lit
+        ; lit'    <- newOverloadedLit orig over_lit pat_ty
+        ; eq'     <- tcSyntaxOp orig eq (mkFunTys [pat_ty, pat_ty] boolTy)
+        ; mb_neg' <- case mb_neg of
+                        Nothing  -> return Nothing      -- Positive literal
+                        Just neg ->     -- Negative literal
+                                        -- The 'negate' is re-mappable syntax
+                            do { neg' <- tcSyntaxOp orig neg (mkFunTy pat_ty pat_ty)
+                               ; return (Just neg') }
+        ; res <- thing_inside 
+        ; return (NPat lit' mb_neg' eq', res) }
 
 tc_pat penv (NPlusKPat (L nm_loc name) lit ge minus) pat_ty thing_inside
-  = do	{ (co, bndr_id) <- setSrcSpan nm_loc (tcPatBndr penv name pat_ty)
+  = do  { (co, bndr_id) <- setSrcSpan nm_loc (tcPatBndr penv name pat_ty)
         ; let pat_ty' = idType bndr_id
-	      orig    = LiteralOrigin lit
-	; lit' <- newOverloadedLit orig lit pat_ty'
+              orig    = LiteralOrigin lit
+        ; lit' <- newOverloadedLit orig lit pat_ty'
 
-	-- The '>=' and '-' parts are re-mappable syntax
-	; ge'    <- tcSyntaxOp orig ge    (mkFunTys [pat_ty', pat_ty'] boolTy)
-	; minus' <- tcSyntaxOp orig minus (mkFunTys [pat_ty', pat_ty'] pat_ty')
+        -- The '>=' and '-' parts are re-mappable syntax
+        ; ge'    <- tcSyntaxOp orig ge    (mkFunTys [pat_ty', pat_ty'] boolTy)
+        ; minus' <- tcSyntaxOp orig minus (mkFunTys [pat_ty', pat_ty'] pat_ty')
         ; let pat' = NPlusKPat (L nm_loc bndr_id) lit' ge' minus'
 
-	-- The Report says that n+k patterns must be in Integral
-	-- We may not want this when using re-mappable syntax, though (ToDo?)
-	; icls <- tcLookupClass integralClassName
-	; instStupidTheta orig [mkClassPred icls [pat_ty']]	
+        -- The Report says that n+k patterns must be in Integral
+        -- We may not want this when using re-mappable syntax, though (ToDo?)
+        ; icls <- tcLookupClass integralClassName
+        ; instStupidTheta orig [mkClassPred icls [pat_ty']]     
     
-	; res <- tcExtendIdEnv1 name bndr_id thing_inside
-	; return (mkHsWrapPatCo co pat' pat_ty, res) }
+        ; res <- tcExtendIdEnv1 name bndr_id thing_inside
+        ; return (mkHsWrapPatCo co pat' pat_ty, res) }
 
-tc_pat _ _other_pat _ _ = panic "tc_pat" 	-- ConPatOut, SigPatOut
+tc_pat _ _other_pat _ _ = panic "tc_pat"        -- ConPatOut, SigPatOut
 
 ----------------
 unifyPatType :: TcType -> TcType -> TcM TcCoercion
@@ -571,7 +565,7 @@ Note [Hopping the LIE in lazy patterns]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In a lazy pattern, we must *not* discharge constraints from the RHS
 from dictionaries bound in the pattern.  E.g.
-	f ~(C x) = 3
+        f ~(C x) = 3
 We can't discharge the Num constraint from dictionaries bound by
 the pattern C!  
 
@@ -580,9 +574,9 @@ the pattern.  Hence the captureConstraints and emitConstraints.
 
 The same thing ensures that equality constraints in a lazy match
 are not made available in the RHS of the match. For example
-	data T a where { T1 :: Int -> T Int; ... }
-	f :: T a -> Int -> a
-	f ~(T1 i) y = y
+        data T a where { T1 :: Int -> T Int; ... }
+        f :: T a -> Int -> a
+        f ~(T1 i) y = y
 It's obviously not sound to refine a to Int in the right
 hand side, because the arugment might not match T1 at all!
 
@@ -591,10 +585,10 @@ because they won't be in scope when we do the desugaring
 
 
 %************************************************************************
-%*									*
-	Most of the work for constructors is here
-	(the rest is in the ConPatIn case of tc_pat)
-%*									*
+%*                                                                      *
+        Most of the work for constructors is here
+        (the rest is in the ConPatIn case of tc_pat)
+%*                                                                      *
 %************************************************************************
 
 [Pattern matching indexed data types]
@@ -651,85 +645,85 @@ equality constraints that are used in conjunction with implication constraints
 to express the local scope of GADT refinements.
 
 \begin{code}
---	Running example:
+--      Running example:
 -- MkT :: forall a b c. (a~[b]) => b -> c -> T a
--- 	 with scrutinee of type (T ty)
+--       with scrutinee of type (T ty)
 
 tcConPat :: PatEnv -> Located Name 
-	 -> TcRhoType  	       	-- Type of the pattern
-	 -> HsConPatDetails Name -> TcM a
-	 -> TcM (Pat TcId, a)
+         -> TcRhoType           -- Type of the pattern
+         -> HsConPatDetails Name -> TcM a
+         -> TcM (Pat TcId, a)
 tcConPat penv (L con_span con_name) pat_ty arg_pats thing_inside
-  = do	{ data_con <- tcLookupDataCon con_name
-	; let tycon = dataConTyCon data_con
-         	  -- For data families this is the representation tycon
-	      (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _)
+  = do  { data_con <- tcLookupDataCon con_name
+        ; let tycon = dataConTyCon data_con
+                  -- For data families this is the representation tycon
+              (univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _)
                 = dataConFullSig data_con
 
-	  -- Instantiate the constructor type variables [a->ty]
-	  -- This may involve doing a family-instance coercion, 
-	  -- and building a wrapper 
-	; (wrap, ctxt_res_tys) <- matchExpectedPatTy (matchExpectedConTy tycon) pat_ty
+          -- Instantiate the constructor type variables [a->ty]
+          -- This may involve doing a family-instance coercion, 
+          -- and building a wrapper 
+        ; (wrap, ctxt_res_tys) <- matchExpectedPatTy (matchExpectedConTy tycon) pat_ty
 
-	  -- Add the stupid theta
-	; setSrcSpan con_span $ addDataConStupidTheta data_con ctxt_res_tys
+          -- Add the stupid theta
+        ; setSrcSpan con_span $ addDataConStupidTheta data_con ctxt_res_tys
 
-	; checkExistentials ex_tvs penv 
+        ; checkExistentials ex_tvs penv 
         ; (tenv, ex_tvs') <- tcInstSuperSkolTyVarsX
                                (zipTopTvSubst univ_tvs ctxt_res_tys) ex_tvs
                      -- Get location from monad, not from ex_tvs
 
         ; let pat_ty' = mkTyConApp tycon ctxt_res_tys
-	      -- pat_ty' is type of the actual constructor application
+              -- pat_ty' is type of the actual constructor application
               -- pat_ty' /= pat_ty iff coi /= IdCo
               
-	      arg_tys' = substTys tenv arg_tys
+              arg_tys' = substTys tenv arg_tys
 
         ; traceTc "tcConPat" (ppr con_name $$ ppr ex_tvs' $$ ppr pat_ty' $$ ppr arg_tys')
-	; if null ex_tvs && null eq_spec && null theta
-	  then do { -- The common case; no class bindings etc 
+        ; if null ex_tvs && null eq_spec && null theta
+          then do { -- The common case; no class bindings etc 
                     -- (see Note [Arrows and patterns])
-		    (arg_pats', res) <- tcConArgs data_con arg_tys' 
-						  arg_pats penv thing_inside
-		  ; let res_pat = ConPatOut { pat_con = L con_span data_con, 
-			            	      pat_tvs = [], pat_dicts = [], 
+                    (arg_pats', res) <- tcConArgs data_con arg_tys' 
+                                                  arg_pats penv thing_inside
+                  ; let res_pat = ConPatOut { pat_con = L con_span data_con, 
+                                              pat_tvs = [], pat_dicts = [], 
                                               pat_binds = emptyTcEvBinds,
-					      pat_args = arg_pats', 
+                                              pat_args = arg_pats', 
                                               pat_ty = pat_ty' }
 
-		  ; return (mkHsWrapPat wrap res_pat pat_ty, res) }
+                  ; return (mkHsWrapPat wrap res_pat pat_ty, res) }
 
-	  else do   -- The general case, with existential, 
+          else do   -- The general case, with existential, 
                     -- and local equality constraints
-	{ let theta'   = substTheta tenv (eqSpecPreds eq_spec ++ theta)
+        { let theta'   = substTheta tenv (eqSpecPreds eq_spec ++ theta)
                            -- order is *important* as we generate the list of
                            -- dictionary binders from theta'
-	      no_equalities = not (any isEqPred theta')
+              no_equalities = not (any isEqPred theta')
               skol_info = case pe_ctxt penv of
                             LamPat mc -> PatSkol data_con mc
                             LetPat {} -> UnkSkol -- Doesn't matter
  
         ; gadts_on    <- xoptM Opt_GADTs
         ; families_on <- xoptM Opt_TypeFamilies
-	; checkTc (no_equalities || gadts_on || families_on)
-		  (ptext (sLit "A pattern match on a GADT requires GADTs or TypeFamilies"))
-		  -- Trac #2905 decided that a *pattern-match* of a GADT
-		  -- should require the GADT language flag.  
+        ; checkTc (no_equalities || gadts_on || families_on)
+                  (ptext (sLit "A pattern match on a GADT requires GADTs or TypeFamilies"))
+                  -- Trac #2905 decided that a *pattern-match* of a GADT
+                  -- should require the GADT language flag.  
                   -- Re TypeFamilies see also #7156 
 
         ; given <- newEvVars theta'
         ; (ev_binds, (arg_pats', res))
-	     <- checkConstraints skol_info ex_tvs' given $
+             <- checkConstraints skol_info ex_tvs' given $
                 tcConArgs data_con arg_tys' arg_pats penv thing_inside
 
         ; let res_pat = ConPatOut { pat_con   = L con_span data_con, 
-			            pat_tvs   = ex_tvs',
-			            pat_dicts = given,
-			            pat_binds = ev_binds,
-			            pat_args  = arg_pats', 
+                                    pat_tvs   = ex_tvs',
+                                    pat_dicts = given,
+                                    pat_binds = ev_binds,
+                                    pat_args  = arg_pats', 
                                     pat_ty    = pat_ty' }
-	; return (mkHsWrapPat wrap res_pat pat_ty, res)
-	} }
+        ; return (mkHsWrapPat wrap res_pat pat_ty, res)
+        } }
 
 ----------------------------
 matchExpectedPatTy :: (TcRhoType -> TcM (TcCoercion, a))
@@ -740,8 +734,8 @@ matchExpectedPatTy inner_match pat_ty
   | null tvs && null theta
   = do { (co, res) <- inner_match pat_ty
        ; return (coToHsWrapper (mkTcSymCo co), res) }
-       	 -- The Sym is because the inner_match returns a coercion
-	 -- that is the other way round to matchExpectedPatTy
+         -- The Sym is because the inner_match returns a coercion
+         -- that is the other way round to matchExpectedPatTy
 
   | otherwise
   = do { (_, tys, subst) <- tcInstTyVars tvs
@@ -752,35 +746,35 @@ matchExpectedPatTy inner_match pat_ty
     (tvs, theta, tau) = tcSplitSigmaTy pat_ty
 
 ----------------------------
-matchExpectedConTy :: TyCon  	 -- The TyCon that this data 
-		    		 -- constructor actually returns
-		   -> TcRhoType  -- The type of the pattern
-		   -> TcM (TcCoercion, [TcSigmaType])
+matchExpectedConTy :: TyCon      -- The TyCon that this data 
+                                 -- constructor actually returns
+                   -> TcRhoType  -- The type of the pattern
+                   -> TcM (TcCoercion, [TcSigmaType])
 -- See Note [Matching constructor patterns]
 -- Returns a coercion : T ty1 ... tyn ~ pat_ty
 -- This is the same way round as matchExpectedListTy etc
 -- but the other way round to matchExpectedPatTy
 matchExpectedConTy data_tc pat_ty
   | Just (fam_tc, fam_args, co_tc) <- tyConFamInstSig_maybe data_tc
-    	 -- Comments refer to Note [Matching constructor patterns]
-     	 -- co_tc :: forall a. T [a] ~ T7 a
+         -- Comments refer to Note [Matching constructor patterns]
+         -- co_tc :: forall a. T [a] ~ T7 a
   = do { (_, tys, subst) <- tcInstTyVars (tyConTyVars data_tc)
-       	     -- tys = [ty1,ty2]
+             -- tys = [ty1,ty2]
 
        ; traceTc "matchExpectedConTy" (vcat [ppr data_tc, 
                                              ppr (tyConTyVars data_tc),
                                              ppr fam_tc, ppr fam_args])
        ; co1 <- unifyType (mkTyConApp fam_tc (substTys subst fam_args)) pat_ty
-       	     -- co1 : T (ty1,ty2) ~ pat_ty
+             -- co1 : T (ty1,ty2) ~ pat_ty
 
        ; let co2 = mkTcUnbranchedAxInstCo co_tc tys
-       	     -- co2 : T (ty1,ty2) ~ T7 ty1 ty2
+             -- co2 : T (ty1,ty2) ~ T7 ty1 ty2
 
        ; return (mkTcSymCo co2 `mkTcTransCo` co1, tys) }
 
   | otherwise
   = matchExpectedTyConApp data_tc pat_ty
-       	     -- coi : T tys ~ pat_ty
+             -- coi : T tys ~ pat_ty
 \end{code}
 
 Note [Matching constructor patterns]
@@ -812,66 +806,66 @@ Suppose (coi, tys) = matchExpectedConType data_tc pat_ty
 
 \begin{code}
 tcConArgs :: DataCon -> [TcSigmaType]
-	  -> Checker (HsConPatDetails Name) (HsConPatDetails Id)
+          -> Checker (HsConPatDetails Name) (HsConPatDetails Id)
 
 tcConArgs data_con arg_tys (PrefixCon arg_pats) penv thing_inside
-  = do	{ checkTc (con_arity == no_of_args)	-- Check correct arity
-		  (arityErr "Constructor" data_con con_arity no_of_args)
-	; let pats_w_tys = zipEqual "tcConArgs" arg_pats arg_tys
-	; (arg_pats', res) <- tcMultiple tcConArg pats_w_tys
-					      penv thing_inside 
-	; return (PrefixCon arg_pats', res) }
+  = do  { checkTc (con_arity == no_of_args)     -- Check correct arity
+                  (arityErr "Constructor" data_con con_arity no_of_args)
+        ; let pats_w_tys = zipEqual "tcConArgs" arg_pats arg_tys
+        ; (arg_pats', res) <- tcMultiple tcConArg pats_w_tys
+                                              penv thing_inside 
+        ; return (PrefixCon arg_pats', res) }
   where
     con_arity  = dataConSourceArity data_con
     no_of_args = length arg_pats
 
 tcConArgs data_con arg_tys (InfixCon p1 p2) penv thing_inside
-  = do	{ checkTc (con_arity == 2)	-- Check correct arity
-	 	  (arityErr "Constructor" data_con con_arity 2)
-	; let [arg_ty1,arg_ty2] = arg_tys	-- This can't fail after the arity check
-	; ([p1',p2'], res) <- tcMultiple tcConArg [(p1,arg_ty1),(p2,arg_ty2)]
-					      penv thing_inside
-	; return (InfixCon p1' p2', res) }
+  = do  { checkTc (con_arity == 2)      -- Check correct arity
+                  (arityErr "Constructor" data_con con_arity 2)
+        ; let [arg_ty1,arg_ty2] = arg_tys       -- This can't fail after the arity check
+        ; ([p1',p2'], res) <- tcMultiple tcConArg [(p1,arg_ty1),(p2,arg_ty2)]
+                                              penv thing_inside
+        ; return (InfixCon p1' p2', res) }
   where
     con_arity  = dataConSourceArity data_con
 
 tcConArgs data_con arg_tys (RecCon (HsRecFields rpats dd)) penv thing_inside
-  = do	{ (rpats', res) <- tcMultiple tc_field rpats penv thing_inside
-	; return (RecCon (HsRecFields rpats' dd), res) }
+  = do  { (rpats', res) <- tcMultiple tc_field rpats penv thing_inside
+        ; return (RecCon (HsRecFields rpats' dd), res) }
   where
     tc_field :: Checker (HsRecField FieldLabel (LPat Name)) (HsRecField TcId (LPat TcId))
     tc_field (HsRecField field_lbl pat pun) penv thing_inside
       = do { (sel_id, pat_ty) <- wrapLocFstM find_field_ty field_lbl
-	   ; (pat', res) <- tcConArg (pat, pat_ty) penv thing_inside
-	   ; return (HsRecField sel_id pat' pun, res) }
+           ; (pat', res) <- tcConArg (pat, pat_ty) penv thing_inside
+           ; return (HsRecField sel_id pat' pun, res) }
 
     find_field_ty :: FieldLabel -> TcM (Id, TcType)
     find_field_ty field_lbl
-	= case [ty | (f,ty) <- field_tys, f == field_lbl] of
-
-		-- No matching field; chances are this field label comes from some
-		-- other record type (or maybe none).  As well as reporting an
-		-- error we still want to typecheck the pattern, principally to
-		-- make sure that all the variables it binds are put into the
-		-- environment, else the type checker crashes later:
-		--	f (R { foo = (a,b) }) = a+b
-		-- If foo isn't one of R's fields, we don't want to crash when
-		-- typechecking the "a+b".
-	   [] -> do { addErrTc (badFieldCon data_con field_lbl)
-		    ; bogus_ty <- newFlexiTyVarTy liftedTypeKind
-		    ; return (error "Bogus selector Id", bogus_ty) }
-
-		-- The normal case, when the field comes from the right constructor
-	   (pat_ty : extras) -> 
-		ASSERT( null extras )
-		do { sel_id <- tcLookupField field_lbl
-		   ; return (sel_id, pat_ty) }
+        = case [ty | (f,ty) <- field_tys, f == field_lbl] of
+
+                -- No matching field; chances are this field label comes from some
+                -- other record type (or maybe none).  As well as reporting an
+                -- error we still want to typecheck the pattern, principally to
+                -- make sure that all the variables it binds are put into the
+                -- environment, else the type checker crashes later:
+                --      f (R { foo = (a,b) }) = a+b
+                -- If foo isn't one of R's fields, we don't want to crash when
+                -- typechecking the "a+b".
+           [] -> do { addErrTc (badFieldCon data_con field_lbl)
+                    ; bogus_ty <- newFlexiTyVarTy liftedTypeKind
+                    ; return (error "Bogus selector Id", bogus_ty) }
+
+                -- The normal case, when the field comes from the right constructor
+           (pat_ty : extras) -> 
+                ASSERT( null extras )
+                do { sel_id <- tcLookupField field_lbl
+                   ; return (sel_id, pat_ty) }
 
     field_tys :: [(FieldLabel, TcType)]
     field_tys = zip (dataConFieldLabels data_con) arg_tys
-	-- Don't use zipEqual! If the constructor isn't really a record, then
-	-- dataConFieldLabels will be empty (and each field in the pattern
-	-- will generate an error below).
+        -- Don't use zipEqual! If the constructor isn't really a record, then
+        -- dataConFieldLabels will be empty (and each field in the pattern
+        -- will generate an error below).
 
 tcConArg :: Checker (LPat Name, TcSigmaType) (LPat Id)
 tcConArg (arg_pat, arg_ty) penv thing_inside
@@ -884,15 +878,15 @@ addDataConStupidTheta :: DataCon -> [TcType] -> TcM ()
 -- the constraints into the constraint set
 addDataConStupidTheta data_con inst_tys
   | null stupid_theta = return ()
-  | otherwise	      = instStupidTheta origin inst_theta
+  | otherwise         = instStupidTheta origin inst_theta
   where
     origin = OccurrenceOf (dataConName data_con)
-	-- The origin should always report "occurrence of C"
-	-- even when C occurs in a pattern
+        -- The origin should always report "occurrence of C"
+        -- even when C occurs in a pattern
     stupid_theta = dataConStupidTheta data_con
     tenv = mkTopTvSubst (dataConUnivTyVars data_con `zip` inst_tys)
-    	 -- NB: inst_tys can be longer than the univ tyvars
-	 --     because the constructor might have existentials
+         -- NB: inst_tys can be longer than the univ tyvars
+         --     because the constructor might have existentials
     inst_theta = substTheta tenv stupid_theta
 \end{code}
 
@@ -921,24 +915,24 @@ plan for ordinary vanilla patterns to bypass the constraint
 simplification step.
 
 %************************************************************************
-%*									*
-		Note [Pattern coercions]
-%*									*
+%*                                                                      *
+                Note [Pattern coercions]
+%*                                                                      *
 %************************************************************************
 
 In principle, these program would be reasonable:
-	
-	f :: (forall a. a->a) -> Int
-	f (x :: Int->Int) = x 3
+        
+        f :: (forall a. a->a) -> Int
+        f (x :: Int->Int) = x 3
 
-	g :: (forall a. [a]) -> Bool
-	g [] = True
+        g :: (forall a. [a]) -> Bool
+        g [] = True
 
 In both cases, the function type signature restricts what arguments can be passed
 in a call (to polymorphic ones).  The pattern type signature then instantiates this
 type.  For example, in the first case,  (forall a. a->a) <= Int -> Int, and we
 generate the translated term
-	f = \x' :: (forall a. a->a).  let x = x' Int in x 3
+        f = \x' :: (forall a. a->a).  let x = x' Int in x 3
 
 From a type-system point of view, this is perfectly fine, but it's *very* seldom useful.
 And it requires a significant amount of code to implement, because we need to decorate
@@ -953,20 +947,20 @@ A SigPat is a type coercion and must be handled one at at time.  We can't
 combine them unless the type of the pattern inside is identical, and we don't
 bother to check for that.  For example:
 
-	data T = T1 Int | T2 Bool
-	f :: (forall a. a -> a) -> T -> t
-	f (g::Int->Int)   (T1 i) = T1 (g i)
-	f (g::Bool->Bool) (T2 b) = T2 (g b)
+        data T = T1 Int | T2 Bool
+        f :: (forall a. a -> a) -> T -> t
+        f (g::Int->Int)   (T1 i) = T1 (g i)
+        f (g::Bool->Bool) (T2 b) = T2 (g b)
 
 We desugar this as follows:
 
-	f = \ g::(forall a. a->a) t::T ->
-	    let gi = g Int
-	    in case t of { T1 i -> T1 (gi i)
-			   other ->
-	    let	gb = g Bool
-	    in case t of { T2 b -> T2 (gb b)
-			   other -> fail }}
+        f = \ g::(forall a. a->a) t::T ->
+            let gi = g Int
+            in case t of { T1 i -> T1 (gi i)
+                           other ->
+            let gb = g Bool
+            in case t of { T2 b -> T2 (gb b)
+                           other -> fail }}
 
 Note that we do not treat the first column of patterns as a
 column of variables, because the coerced variables (gi, gb)
@@ -975,16 +969,16 @@ But I don't think this is a common case, and if it was we could
 doubtless improve it.
 
 Meanwhile, the strategy is:
-	* treat each SigPat coercion (always non-identity coercions)
-		as a separate block
-	* deal with the stuff inside, and then wrap a binding round
-		the result to bind the new variable (gi, gb, etc)
+        * treat each SigPat coercion (always non-identity coercions)
+                as a separate block
+        * deal with the stuff inside, and then wrap a binding round
+                the result to bind the new variable (gi, gb, etc)
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Errors and contexts}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -993,17 +987,17 @@ maybeWrapPatCtxt :: Pat Name -> (TcM a -> TcM b) -> TcM a -> TcM b
 maybeWrapPatCtxt pat tcm thing_inside 
   | not (worth_wrapping pat) = tcm thing_inside
   | otherwise                = addErrCtxt msg $ tcm $ popErrCtxt thing_inside
-    			       -- Remember to pop before doing thing_inside
+                               -- Remember to pop before doing thing_inside
   where
    worth_wrapping (VarPat {}) = False
    worth_wrapping (ParPat {}) = False
    worth_wrapping (AsPat {})  = False
-   worth_wrapping _  	      = True
+   worth_wrapping _           = True
    msg = hang (ptext (sLit "In the pattern:")) 2 (ppr pat)
 
 -----------------------------------------------
 checkExistentials :: [TyVar] -> PatEnv -> TcM ()
-	  -- See Note [Arrows and patterns]
+          -- See Note [Arrows and patterns]
 checkExistentials [] _                                 = return ()
 checkExistentials _ (PE { pe_ctxt = LetPat {}})        = failWithTc existentialLetPat
 checkExistentials _ (PE { pe_ctxt = LamPat ProcExpr }) = failWithTc existentialProcPat
@@ -1022,13 +1016,13 @@ existentialProcPat
 existentialLetPat :: SDoc
 existentialLetPat
   = vcat [text "My brain just exploded",
-	  text "I can't handle pattern bindings for existential or GADT data constructors.",
-	  text "Instead, use a case-expression, or do-notation, to unpack the constructor."]
+          text "I can't handle pattern bindings for existential or GADT data constructors.",
+          text "Instead, use a case-expression, or do-notation, to unpack the constructor."]
 
 badFieldCon :: DataCon -> Name -> SDoc
 badFieldCon con field
   = hsep [ptext (sLit "Constructor") <+> quotes (ppr con),
-	  ptext (sLit "does not have field"), quotes (ppr field)]
+          ptext (sLit "does not have field"), quotes (ppr field)]
 
 polyPatSig :: TcType -> SDoc
 polyPatSig sig_ty
diff --git a/compiler/typecheck/TcRules.lhs b/compiler/typecheck/TcRules.lhs
index c9899f7..57e2092 100644
--- a/compiler/typecheck/TcRules.lhs
+++ b/compiler/typecheck/TcRules.lhs
@@ -6,12 +6,6 @@
 TcRules: Typechecking transformation rules
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcRules ( tcRules ) where
 
@@ -62,32 +56,32 @@ amount of simplification, so simplifyRuleLhs just sets the flag
 appropriately.
 
 Example.  Consider the following left-hand side of a rule
-	f (x == y) (y > z) = ...
+        f (x == y) (y > z) = ...
 If we typecheck this expression we get constraints
-	d1 :: Ord a, d2 :: Eq a
+        d1 :: Ord a, d2 :: Eq a
 We do NOT want to "simplify" to the LHS
-	forall x::a, y::a, z::a, d1::Ord a.
-	  f ((==) (eqFromOrd d1) x y) ((>) d1 y z) = ...
-Instead we want	
-	forall x::a, y::a, z::a, d1::Ord a, d2::Eq a.
-	  f ((==) d2 x y) ((>) d1 y z) = ...
+        forall x::a, y::a, z::a, d1::Ord a.
+          f ((==) (eqFromOrd d1) x y) ((>) d1 y z) = ...
+Instead we want 
+        forall x::a, y::a, z::a, d1::Ord a, d2::Eq a.
+          f ((==) d2 x y) ((>) d1 y z) = ...
 
 Here is another example:
-	fromIntegral :: (Integral a, Num b) => a -> b
-	{-# RULES "foo"  fromIntegral = id :: Int -> Int #-}
+        fromIntegral :: (Integral a, Num b) => a -> b
+        {-# RULES "foo"  fromIntegral = id :: Int -> Int #-}
 In the rule, a=b=Int, and Num Int is a superclass of Integral Int. But
 we *dont* want to get
-	forall dIntegralInt.
-	   fromIntegral Int Int dIntegralInt (scsel dIntegralInt) = id Int
+        forall dIntegralInt.
+           fromIntegral Int Int dIntegralInt (scsel dIntegralInt) = id Int
 because the scsel will mess up RULE matching.  Instead we want
-	forall dIntegralInt, dNumInt.
-	  fromIntegral Int Int dIntegralInt dNumInt = id Int
+        forall dIntegralInt, dNumInt.
+          fromIntegral Int Int dIntegralInt dNumInt = id Int
 
 Even if we have 
-	g (x == y) (y == z) = ..
+        g (x == y) (y == z) = ..
 where the two dictionaries are *identical*, we do NOT WANT
-	forall x::a, y::a, z::a, d1::Eq a
-	  f ((==) d1 x y) ((>) d1 y z) = ...
+        forall x::a, y::a, z::a, d1::Eq a
+          f ((==) d1 x y) ((>) d1 y z) = ...
 because that will only match if the dict args are (visibly) equal.
 Instead we want to quantify over the dictionaries separately.
 
@@ -96,7 +90,7 @@ all dicts unchanged, with absolutely no sharing.
 
 Also note that we can't solve the LHS constraints in isolation:
 Example   foo :: Ord a => a -> a
-	  foo_spec :: Int -> Int
+          foo_spec :: Int -> Int
           {-# RULE "foo"  foo = foo_spec #-}
 Here, it's the RHS that fixes the type variable
 
@@ -131,10 +125,10 @@ tcRules decls = mapM (wrapLocM tcRule) decls
 
 tcRule :: RuleDecl Name -> TcM (RuleDecl TcId)
 tcRule (HsRule name act hs_bndrs lhs fv_lhs rhs fv_rhs)
-  = addErrCtxt (ruleCtxt name)	$
+  = addErrCtxt (ruleCtxt name)  $
     do { traceTc "---- Rule ------" (ppr name)
 
-    	-- Note [Typechecking rules]
+        -- Note [Typechecking rules]
        ; vars <- tcRuleBndrs hs_bndrs
        ; let (id_bndrs, tv_bndrs) = partition isId vars
        ; (lhs', lhs_wanted, rhs', rhs_wanted, rule_ty)
@@ -146,17 +140,17 @@ tcRule (HsRule name act hs_bndrs lhs fv_lhs rhs fv_rhs)
 
        ; (lhs_evs, other_lhs_wanted) <- simplifyRule name lhs_wanted rhs_wanted
 
-	-- Now figure out what to quantify over
-	-- c.f. TcSimplify.simplifyInfer
-	-- We quantify over any tyvars free in *either* the rule
-	--  *or* the bound variables.  The latter is important.  Consider
-	--	ss (x,(y,z)) = (x,z)
-	--	RULE:  forall v. fst (ss v) = fst v
-	-- The type of the rhs of the rule is just a, but v::(a,(b,c))
-	--
-	-- We also need to get the completely-uconstrained tyvars of
-	-- the LHS, lest they otherwise get defaulted to Any; but we do that
-	-- during zonking (see TcHsSyn.zonkRule)
+        -- Now figure out what to quantify over
+        -- c.f. TcSimplify.simplifyInfer
+        -- We quantify over any tyvars free in *either* the rule
+        --  *or* the bound variables.  The latter is important.  Consider
+        --      ss (x,(y,z)) = (x,z)
+        --      RULE:  forall v. fst (ss v) = fst v
+        -- The type of the rhs of the rule is just a, but v::(a,(b,c))
+        --
+        -- We also need to get the completely-uconstrained tyvars of
+        -- the LHS, lest they otherwise get defaulted to Any; but we do that
+        -- during zonking (see TcHsSyn.zonkRule)
 
        ; let tpl_ids    = lhs_evs ++ id_bndrs
              forall_tvs = tyVarsOfTypes (rule_ty : map idType tpl_ids)
@@ -198,23 +192,23 @@ tcRule (HsRule name act hs_bndrs lhs fv_lhs rhs fv_rhs)
                                   , ic_env    = lcl_env } 
 
        ; return (HsRule name act
-		    (map (RuleBndr . noLoc) (qtkvs ++ tpl_ids))
-		    (mkHsDictLet (TcEvBinds lhs_binds_var) lhs') fv_lhs
-		    (mkHsDictLet (TcEvBinds rhs_binds_var) rhs') fv_rhs) }
+                    (map (RuleBndr . noLoc) (qtkvs ++ tpl_ids))
+                    (mkHsDictLet (TcEvBinds lhs_binds_var) lhs') fv_lhs
+                    (mkHsDictLet (TcEvBinds rhs_binds_var) rhs') fv_rhs) }
 
 tcRuleBndrs :: [RuleBndr Name] -> TcM [Var]
 tcRuleBndrs [] 
   = return []
 tcRuleBndrs (RuleBndr (L _ name) : rule_bndrs)
-  = do 	{ ty <- newFlexiTyVarTy openTypeKind
+  = do  { ty <- newFlexiTyVarTy openTypeKind
         ; vars <- tcRuleBndrs rule_bndrs
-	; return (mkLocalId name ty : vars) }
+        ; return (mkLocalId name ty : vars) }
 tcRuleBndrs (RuleBndrSig (L _ name) rn_ty : rule_bndrs)
---  e.g 	x :: a->a
+--  e.g         x :: a->a
 --  The tyvar 'a' is brought into scope first, just as if you'd written
---		a::*, x :: a->a
-  = do	{ let ctxt = RuleSigCtxt name
-	; (id_ty, tv_prs) <- tcHsPatSigType ctxt rn_ty
+--              a::*, x :: a->a
+  = do  { let ctxt = RuleSigCtxt name
+        ; (id_ty, tv_prs) <- tcHsPatSigType ctxt rn_ty
         ; let id  = mkLocalId name id_ty
               tvs = map snd tv_prs   
                     -- tcHsPatSigType returns (Name,TyVar) pairs
@@ -222,12 +216,12 @@ tcRuleBndrs (RuleBndrSig (L _ name) rn_ty : rule_bndrs)
                     -- cloned, so we get (n, tv-with-name-n) pairs
                     -- See Note [Pattern signature binders] in TcHsType
 
-	      -- The type variables scope over subsequent bindings; yuk
+              -- The type variables scope over subsequent bindings; yuk
         ; vars <- tcExtendTyVarEnv tvs $ 
                   tcRuleBndrs rule_bndrs 
-	; return (tvs ++ id : vars) }
+        ; return (tvs ++ id : vars) }
 
 ruleCtxt :: FastString -> SDoc
 ruleCtxt name = ptext (sLit "When checking the transformation rule") <+> 
-		doubleQuotes (ftext name)
+                doubleQuotes (ftext name)
 \end{code}
diff --git a/compiler/typecheck/TcSMonad.lhs b/compiler/typecheck/TcSMonad.lhs
index f8c5e04..c98d77f 100644
--- a/compiler/typecheck/TcSMonad.lhs
+++ b/compiler/typecheck/TcSMonad.lhs
@@ -1,10 +1,5 @@
 \begin{code}
-{-# OPTIONS -fno-warn-tabs -w #-}
--- 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
+{-# OPTIONS -w #-}
 
 -- Type definitions for the constraint solver
 module TcSMonad ( 
@@ -152,12 +147,12 @@ import Digraph
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 %*                            Worklists                                *
 %*  Canonical and non-canonical constraints that the simplifier has to  *
 %*  work on. Including their simplification depths.                     *
 %*                                                                      *
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [WorkList priorities]
@@ -451,10 +446,10 @@ filterSolved p (PredMap mp) = PredMap (foldTM upd mp emptyTM)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 %*                            Inert Sets                                *
 %*                                                                      *
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [Detailed InertCans Invariants]
@@ -570,7 +565,7 @@ data InertCans
 data InertSet
   = IS { inert_cans :: InertCans
               -- Canonical Given, Wanted, Derived (no Solved)
-	      -- Sometimes called "the inert set"
+              -- Sometimes called "the inert set"
 
        , inert_flat_cache :: FamHeadMap (CtEvidence, TcType)
               -- See Note [Type family equations]
@@ -592,13 +587,13 @@ data InertSet
               -- Not necessarily fully rewritten (by type substitutions)
 
        , inert_solved_dicts   :: PredMap CtEvidence 
-       	      -- Of form ev :: C t1 .. tn
+              -- Of form ev :: C t1 .. tn
               -- Always the result of using a top-level instance declaration
               -- See Note [Solved constraints]
-       	      -- - Used to avoid creating a new EvVar when we have a new goal 
-       	      --   that we have solved in the past
-       	      -- - Stored not necessarily as fully rewritten 
-       	      --   (ToDo: rewrite lazily when we lookup)
+              -- - Used to avoid creating a new EvVar when we have a new goal 
+              --   that we have solved in the past
+              -- - Stored not necessarily as fully rewritten 
+              --   (ToDo: rewrite lazily when we lookup)
        }
 
 
@@ -787,8 +782,8 @@ We don't try to turn any *other* Wanteds into Givens:
 There might be cases where interactions between wanteds can help
 to solve a constraint. For example
 
-  	class C a b | a -> b
-  	(C Int alpha), (forall d. C d blah => C Int a)
+        class C a b | a -> b
+        (C Int alpha), (forall d. C d blah => C Int a)
 
 If we push the (C Int alpha) inwards, as a given, it can produce a
 fundep (alpha~a) and this can float out again and be used to fix
@@ -925,15 +920,15 @@ lookupInInertCans (IS { inert_cans = ics }) pty
       EqPred ty1 _ty2 
          | Just tv <- getTyVar_maybe ty1      -- Tyvar equation
          , Just ct <- lookupVarEnv (inert_eqs ics) tv
-      	 , let ctev = ctEvidence ct
-      	 , ctEvPred ctev `eqType` pty
-      	 -> Just ctev
+         , let ctev = ctEvidence ct
+         , ctEvPred ctev `eqType` pty
+         -> Just ctev
 
-      	 | Just _ <- splitTyConApp_maybe ty1  -- Family equation
-      	 , Just ct <- lookupTM ty1 (unFamHeadMap $ inert_funeqs ics)
-      	 , let ctev = ctEvidence ct
-      	 , ctEvPred ctev `eqType` pty
-      	 -> Just ctev
+         | Just _ <- splitTyConApp_maybe ty1  -- Family equation
+         , Just ct <- lookupTM ty1 (unFamHeadMap $ inert_funeqs ics)
+         , let ctev = ctEvidence ct
+         , ctEvPred ctev `eqType` pty
+         -> Just ctev
 
       IrredPred {} -> findEvidence (\ct -> ctEvPred ct `eqType` pty) (inert_irreds ics)
     
@@ -944,9 +939,9 @@ lookupInInertCans (IS { inert_cans = ics }) pty
 
 
 %************************************************************************
-%*									*
-%*		The TcS solver monad                                    *
-%*									*
+%*                                                                      *
+%*              The TcS solver monad                                    *
+%*                                                                      *
 %************************************************************************
 
 Note [The TcS monad]
@@ -1041,7 +1036,7 @@ traceFireTcS ct doc
        ; let msg = int n <> brackets (int (ctLocDepth (cc_loc ct))) <+> doc
        ; TcM.dumpTcRn msg }
 
-runTcS :: TcS a		       -- What to run
+runTcS :: TcS a                -- What to run
        -> TcM (a, Bag EvBind)
 runTcS tcs
   = do { ev_binds_var <- TcM.newTcEvBinds
@@ -1059,15 +1054,15 @@ runTcSWithEvBinds ev_binds_var tcs
 
        ; let env = TcSEnv { tcs_ev_binds = ev_binds_var
                           , tcs_ty_binds = ty_binds_var
-			  , tcs_count    = step_count
+                          , tcs_count    = step_count
                           , tcs_inerts   = inert_var
                           , tcs_worklist    = panic "runTcS: worklist"
                           , tcs_implics     = panic "runTcS: implics" }
                                -- NB: Both these are initialised by withWorkList
 
-	     -- Run the computation
+             -- Run the computation
        ; res <- unTcS tcs env
-	     -- Perform the type unifications required
+             -- Perform the type unifications required
        ; ty_binds <- TcM.readTcRef ty_binds_var
        ; mapM_ do_unification (varEnvElts ty_binds)
 
@@ -1229,7 +1224,7 @@ emitInsoluble ct
       | otherwise     = is { inert_cans = ics { inert_insols = extendCts old_insols ct } }
       where
         already_there = not (isWantedCt ct) && anyBag (eqType this_pred . ctPred) old_insols
-	     -- See Note [Do not add duplicate derived insolubles]
+             -- See Note [Do not add duplicate derived insolubles]
 
 getTcSImplicsRef :: TcS (IORef (Bag Implication))
 getTcSImplicsRef = TcS (return . tcs_implics) 
@@ -1725,7 +1720,7 @@ deferTcSForAllEq (loc,orig_ev) (tvs1,body1) (tvs2,body2)
                                ; env <- wrapTcS $ TcM.getLclEnv
                                ; let ev_binds = TcEvBinds ev_binds_var
                                      new_ct = mkNonCanonical loc ctev
-              			     new_co = evTermCoercion (ctEvTerm ctev)
+                                     new_co = evTermCoercion (ctEvTerm ctev)
                                      new_untch = pushUntouchables (tcl_untch env)
                                ; let wc = WC { wc_flat  = singleCt new_ct 
                                              , wc_impl  = emptyBag
diff --git a/compiler/typecheck/TcSimplify.lhs b/compiler/typecheck/TcSimplify.lhs
index 16cabeb..046ba3a 100644
--- a/compiler/typecheck/TcSimplify.lhs
+++ b/compiler/typecheck/TcSimplify.lhs
@@ -1,10 +1,4 @@
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcSimplify( 
        simplifyInfer, quantifyPred,
@@ -41,7 +35,7 @@ import PrelInfo
 import PrelNames
 import Control.Monad    ( unless )
 import DynFlags         ( ExtensionFlag( Opt_AllowAmbiguousTypes ) )
-import Class		( classKey )
+import Class            ( classKey )
 import BasicTypes       ( RuleName )
 import Outputable
 import FastString
@@ -190,8 +184,8 @@ simplifyInteractive wanteds
     simplifyTop wanteds
 
 ------------------
-simplifyDefault :: ThetaType	-- Wanted; has no type variables in it
-                -> TcM ()	-- Succeeds iff the constraint is soluble
+simplifyDefault :: ThetaType    -- Wanted; has no type variables in it
+                -> TcM ()       -- Succeeds iff the constraint is soluble
 simplifyDefault theta
   = do { traceTc "simplifyInteractive" empty
        ; wanted <- newFlatWanteds DefaultOrigin theta
@@ -223,9 +217,9 @@ simplifyInfer :: Bool
               -> WantedConstraints
               -> TcM ([TcTyVar],    -- Quantify over these type variables
                       [EvVar],      -- ... and these constraints
-		      Bool,	    -- The monomorphism restriction did something
-		      		    --   so the results type is not as general as
-				    --   it could be
+                      Bool,         -- The monomorphism restriction did something
+                                    --   so the results type is not as general as
+                                    --   it could be
                       TcEvBinds)    -- ... binding these evidence variables
 simplifyInfer _top_lvl apply_mr name_taus wanteds
   | isEmptyWC wanteds
@@ -302,9 +296,9 @@ simplifyInfer _top_lvl apply_mr name_taus wanteds
                          `minusVarSet` gbl_tvs
              pbound    = filter (quantifyPred poly_qtvs) quant_pred_candidates
              
-	     -- Monomorphism restriction
+             -- Monomorphism restriction
              constrained_tvs = tyVarsOfTypes pbound `unionVarSet` gbl_tvs
-	     mr_bites        = apply_mr && not (null pbound)
+             mr_bites        = apply_mr && not (null pbound)
 
        ; (qtvs, bound) <- if mr_bites 
                           then do { qtvs <- quantifyTyVars constrained_tvs zonked_tau_tvs
@@ -363,27 +357,27 @@ simplifyInfer _top_lvl apply_mr name_taus wanteds
                 , mr_bites,  TcEvBinds ev_binds_var) } }
 
 quantifyPred :: TyVarSet           -- Quantifying over these
-	     -> PredType -> Bool   -- True <=> quantify over this wanted
+             -> PredType -> Bool   -- True <=> quantify over this wanted
 quantifyPred qtvs pred
   | isIPPred pred = True  -- Note [Inheriting implicit parameters]
-  | otherwise	  = tyVarsOfType pred `intersectsVarSet` qtvs
+  | otherwise     = tyVarsOfType pred `intersectsVarSet` qtvs
 \end{code}
 
 Note [Inheriting implicit parameters]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Consider this:
 
-	f x = (x::Int) + ?y
+        f x = (x::Int) + ?y
 
 where f is *not* a top-level binding.
 From the RHS of f we'll get the constraint (?y::Int).
 There are two types we might infer for f:
 
-	f :: Int -> Int
+        f :: Int -> Int
 
 (so we get ?y from the context of f's definition), or
 
-	f :: (?y::Int) => Int -> Int
+        f :: (?y::Int) => Int -> Int
 
 At first you might think the first was better, because then
 ?y behaves like a free variable of the definition, rather than
@@ -506,13 +500,13 @@ and if so refrain from quantifying over *any* equalites.
 
 \begin{code}
 simplifyRule :: RuleName 
-             -> WantedConstraints	-- Constraints from LHS
-             -> WantedConstraints	-- Constraints from RHS
+             -> WantedConstraints       -- Constraints from LHS
+             -> WantedConstraints       -- Constraints from RHS
              -> TcM ([EvVar], WantedConstraints)   -- LHS evidence varaibles
 -- See Note [Simplifying RULE constraints] in TcRule
 simplifyRule name lhs_wanted rhs_wanted
-  = do {      	 -- We allow ourselves to unify environment 
-		 -- variables: runTcS runs with NoUntouchables
+  = do {         -- We allow ourselves to unify environment 
+                 -- variables: runTcS runs with NoUntouchables
          (resid_wanted, _) <- solveWantedsTcM (lhs_wanted `andWC` rhs_wanted)
                               -- Post: these are zonked and unflattened
 
@@ -829,7 +823,7 @@ defaultTyVar the_tv
              -- See Note [DefaultTyVar]
              -- We keep the same Untouchables on tv'
 
-  | otherwise = return the_tv	 -- The common case
+  | otherwise = return the_tv    -- The common case
 
 approximateWC :: WantedConstraints -> Cts
 -- Postcondition: Wanted or Derived Cts 
@@ -1148,7 +1142,7 @@ applyDefaultingRules wanteds
 findDefaultableGroups 
     :: ( [Type]
        , (Bool,Bool) )  -- (Overloaded strings, extended default rules)
-    -> Cts	        -- Unsolved (wanted or derived)
+    -> Cts              -- Unsolved (wanted or derived)
     -> [[(Ct,Class,TcTyVar)]]
 findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds
   | null default_tys             = []
@@ -1173,7 +1167,7 @@ findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds
     cmp_tv (_,_,tv1) (_,_,tv2) = tv1 `compare` tv2
 
     is_defaultable_group ds@((_,_,tv):_)
-        = let b1 = isTyConableTyVar tv	-- Note [Avoiding spurious errors]
+        = let b1 = isTyConableTyVar tv  -- Note [Avoiding spurious errors]
               b2 = not (tv `elemVarSet` bad_tvs)
               b4 = defaultable_classes [cls | (_,cls,_) <- ds]
           in (b1 && b2 && b4)
@@ -1198,7 +1192,7 @@ findDefaultableGroups (default_tys, (ovl_strings, extended_defaults)) wanteds
 ------------------------------
 disambigGroup :: [Type]                  -- The default types 
               -> [(Ct, Class, TcTyVar)]  -- All classes of the form (C a)
-	      	 	          	 --  sharing same type variable
+                                         --  sharing same type variable
               -> TcS Bool   -- True <=> something happened, reflected in ty_binds
 
 disambigGroup []  _grp
@@ -1235,7 +1229,7 @@ Note [Avoiding spurious errors]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 When doing the unification for defaulting, we check for skolem
 type variables, and simply don't default them.  For example:
-   f = (*)	-- Monomorphic
+   f = (*)      -- Monomorphic
    g :: Num a => a -> a
    g x = f x x
 Here, we get a complaint when checking the type signature for g,
diff --git a/compiler/typecheck/TcTyDecls.lhs b/compiler/typecheck/TcTyDecls.lhs
index f2969e6..8a7122c 100644
--- a/compiler/typecheck/TcTyDecls.lhs
+++ b/compiler/typecheck/TcTyDecls.lhs
@@ -9,12 +9,6 @@ This stuff is only used for source-code decls; it's recorded in interface
 files for imported data types.
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcTyDecls(
         calcRecFlags, RecTyInfo(..), 
@@ -144,7 +138,7 @@ and then *their* superclasses, and so on.  This set must be finite!
 It is OK for superclasses to be type synonyms for other classes, so
 must "look through" type synonyms. Eg
      type X a = C [a]
-     class X a => C a	-- No!  Recursive superclass!
+     class X a => C a   -- No!  Recursive superclass!
 
 We want definitions such as:
 
@@ -408,12 +402,12 @@ calcRecFlags boot_details is_boot mrole_env tyclss
 
     (new_tycons, prod_tycons) = partition isNewTyCon single_con_tycons
         -- NB: we do *not* call isProductTyCon because that checks
-	--     for vanilla-ness of data constructors; and that depends
-	--     on empty existential type variables; and that is figured
-	--     out by tcResultType; which uses tcMatchTy; which uses
-	--     coreView; which calls coreExpandTyCon_maybe; which uses
-	--     the recursiveness of the TyCon.  Result... a black hole.
-	-- YUK YUK YUK
+        --     for vanilla-ness of data constructors; and that depends
+        --     on empty existential type variables; and that is figured
+        --     out by tcResultType; which uses tcMatchTy; which uses
+        --     coreView; which calls coreExpandTyCon_maybe; which uses
+        --     the recursiveness of the TyCon.  Result... a black hole.
+        -- YUK YUK YUK
 
         --------------- Newtypes ----------------------
     nt_loop_breakers = mkNameSet (findLoopBreakers nt_edges)
@@ -525,9 +519,9 @@ isPromotableType rec_tcs con_arg_ty
                          && (tyConName tc `elemNameSet` rec_tcs 
                              || isJust (promotableTyCon_maybe tc))
                          && all go tys
-    go (FunTy arg res) 	 = go arg && go res
-    go (TyVarTy {})    	 = True
-    go _               	 = False
+    go (FunTy arg res)   = go arg && go res
+    go (TyVarTy {})      = True
+    go _                 = False
 \end{code}
 
 %************************************************************************
diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs
index 8e5bac4..2cc3324 100644
--- a/compiler/typecheck/TcType.lhs
+++ b/compiler/typecheck/TcType.lhs
@@ -7,20 +7,14 @@
 This module provides the Type interface for front-end parts of the 
 compiler.  These parts 
 
-	* treat "source types" as opaque: 
-		newtypes, and predicates are meaningful. 
-	* look through usage types
+        * treat "source types" as opaque: 
+                newtypes, and predicates are meaningful. 
+        * look through usage types
 
 The "tc" prefix is for "TypeChecker", because the type checker
 is the principal client.
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcType (
   --------------------------------
@@ -102,7 +96,7 @@ module TcType (
   isFFILabelTy,        -- :: Type -> Bool
   isFFIDotnetTy,       -- :: DynFlags -> Type -> Bool
   isFFIDotnetObjTy,    -- :: Type -> Bool
-  isFFITy,	       -- :: Type -> Bool
+  isFFITy,             -- :: Type -> Bool
   isFunPtrTy,          -- :: Type -> Bool
   tcSplitIOType_maybe, -- :: Type -> Maybe Type  
 
@@ -129,7 +123,7 @@ module TcType (
   mkEqPred, 
 
   -- Type substitutions
-  TvSubst(..), 	-- Representation visible to a few friends
+  TvSubst(..),  -- Representation visible to a few friends
   TvSubstEnv, emptyTvSubst, 
   mkOpenTvSubst, zipOpenTvSubst, zipTopTvSubst, 
   mkTopTvSubst, notElemTvSubst, unionTvSubst,
@@ -138,8 +132,8 @@ module TcType (
   extendTvSubstList, isInScope, mkTvSubst, zipTyEnv,
   Type.substTy, substTys, substTyWith, substTheta, substTyVar, substTyVars, 
 
-  isUnLiftedType,	-- Source types are always lifted
-  isUnboxedTupleType,	-- Ditto
+  isUnLiftedType,       -- Source types are always lifted
+  isUnboxedTupleType,   -- Ditto
   isPrimitiveType, 
 
   tyVarsOfType, tyVarsOfTypes, closeOverKinds,
@@ -187,24 +181,24 @@ import Control.Applicative (Applicative(..))
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The type checker divides the generic Type world into the 
 following more structured beasts:
 
 sigma ::= forall tyvars. phi
-	-- A sigma type is a qualified type
-	--
-	-- Note that even if 'tyvars' is empty, theta
-	-- may not be: e.g.   (?x::Int) => Int
+        -- A sigma type is a qualified type
+        --
+        -- Note that even if 'tyvars' is empty, theta
+        -- may not be: e.g.   (?x::Int) => Int
 
-	-- Note that 'sigma' is in prenex form:
-	-- all the foralls are at the front.
-	-- A 'phi' type has no foralls to the right of
-	-- an arrow
+        -- Note that 'sigma' is in prenex form:
+        -- all the foralls are at the front.
+        -- A 'phi' type has no foralls to the right of
+        -- an arrow
 
 phi :: theta => rho
 
@@ -222,13 +216,13 @@ tau ::= tyvar
 -- provided it expands to the required form.
 
 \begin{code}
-type TcTyVar = TyVar  	-- Used only during type inference
-type TcCoVar = CoVar  	-- Used only during type inference; mutable
-type TcType = Type 	-- A TcType can have mutable type variables
-	-- Invariant on ForAllTy in TcTypes:
-	-- 	forall a. T
-	-- a cannot occur inside a MutTyVar in T; that is,
-	-- T is "flattened" before quantifying over a
+type TcTyVar = TyVar    -- Used only during type inference
+type TcCoVar = CoVar    -- Used only during type inference; mutable
+type TcType = Type      -- A TcType can have mutable type variables
+        -- Invariant on ForAllTy in TcTypes:
+        --      forall a. T
+        -- a cannot occur inside a MutTyVar in T; that is,
+        -- T is "flattened" before quantifying over a
 
 -- These types do not have boxy type variables in them
 type TcPredType     = PredType
@@ -242,9 +236,9 @@ type TcTyVarSet     = TyVarSet
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{TyVarDetails}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 TyVarDetails gives extra info about type variables, used during type
@@ -264,7 +258,7 @@ Consider this
 Here, x and y have type sigs, which go into the environment.  We used to
 instantiate their types with skolem constants, and push those types into
 the RHS, so we'd typecheck the RHS with type
-	( [a*], b*, c )
+        ( [a*], b*, c )
 where a*, b* are skolem constants, and c is an ordinary meta type varible.
 
 The trouble is that the occurrences of z in the RHS force a* and b* to 
@@ -294,7 +288,7 @@ data TcTyVarDetails
 
   | FlatSkol TcType
            -- The "skolem" obtained by flattening during
-    	   -- constraint simplification
+           -- constraint simplification
     
            -- In comments we will use the notation alpha[flat = ty]
            -- to represent a flattening skolem variable alpha
@@ -319,53 +313,53 @@ instance Outputable MetaDetails where
   ppr (Indirect ty) = ptext (sLit "Indirect") <+> ppr ty
 
 data MetaInfo
-   = TauTv	   -- This MetaTv is an ordinary unification variable
-     		   -- A TauTv is always filled in with a tau-type, which
-		   -- never contains any ForAlls 
+   = TauTv         -- This MetaTv is an ordinary unification variable
+                   -- A TauTv is always filled in with a tau-type, which
+                   -- never contains any ForAlls 
 
    | PolyTv        -- Like TauTv, but can unify with a sigma-type
 
-   | SigTv 	   -- A variant of TauTv, except that it should not be
-		   -- unified with a type, only with a type variable
-		   -- SigTvs are only distinguished to improve error messages
-		   --      see Note [Signature skolems]        
-		   --      The MetaDetails, if filled in, will 
-		   --      always be another SigTv or a SkolemTv
+   | SigTv         -- A variant of TauTv, except that it should not be
+                   -- unified with a type, only with a type variable
+                   -- SigTvs are only distinguished to improve error messages
+                   --      see Note [Signature skolems]        
+                   --      The MetaDetails, if filled in, will 
+                   --      always be another SigTv or a SkolemTv
 
 -------------------------------------
 -- UserTypeCtxt describes the origin of the polymorphic type
 -- in the places where we need to an expression has that type
 
 data UserTypeCtxt
-  = FunSigCtxt Name	-- Function type signature
-			-- Also used for types in SPECIALISE pragmas
-  | InfSigCtxt Name	-- Inferred type for function
-  | ExprSigCtxt		-- Expression type signature
-  | ConArgCtxt Name	-- Data constructor argument
-  | TySynCtxt Name	-- RHS of a type synonym decl
-  | LamPatSigCtxt		-- Type sig in lambda pattern
-			-- 	f (x::t) = ...
-  | BindPatSigCtxt	-- Type sig in pattern binding pattern
-			--	(x::t, y) = e
+  = FunSigCtxt Name     -- Function type signature
+                        -- Also used for types in SPECIALISE pragmas
+  | InfSigCtxt Name     -- Inferred type for function
+  | ExprSigCtxt         -- Expression type signature
+  | ConArgCtxt Name     -- Data constructor argument
+  | TySynCtxt Name      -- RHS of a type synonym decl
+  | LamPatSigCtxt               -- Type sig in lambda pattern
+                        --      f (x::t) = ...
+  | BindPatSigCtxt      -- Type sig in pattern binding pattern
+                        --      (x::t, y) = e
   | RuleSigCtxt Name    -- LHS of a RULE forall
                         --    RULE "foo" forall (x :: a -> a). f (Just x) = ...
-  | ResSigCtxt		-- Result type sig
-			-- 	f x :: t = ....
-  | ForSigCtxt Name	-- Foreign import or export signature
-  | DefaultDeclCtxt	-- Types in a default declaration
+  | ResSigCtxt          -- Result type sig
+                        --      f x :: t = ....
+  | ForSigCtxt Name     -- Foreign import or export signature
+  | DefaultDeclCtxt     -- Types in a default declaration
   | InstDeclCtxt        -- An instance declaration
-  | SpecInstCtxt	-- SPECIALISE instance pragma
-  | ThBrackCtxt		-- Template Haskell type brackets [t| ... |]
+  | SpecInstCtxt        -- SPECIALISE instance pragma
+  | ThBrackCtxt         -- Template Haskell type brackets [t| ... |]
   | GenSigCtxt          -- Higher-rank or impredicative situations
                         -- e.g. (f e) where f has a higher-rank type
                         -- We might want to elaborate this
   | GhciCtxt            -- GHCi command :kind <type>
 
-  | ClassSCCtxt Name	-- Superclasses of a class
-  | SigmaCtxt		-- Theta part of a normal for-all type
-			--	f :: <S> => a -> a
-  | DataTyCtxt Name	-- Theta part of a data decl
-			--	data <S> => T a = MkT a
+  | ClassSCCtxt Name    -- Superclasses of a class
+  | SigmaCtxt           -- Theta part of a normal for-all type
+                        --      f :: <S> => a -> a
+  | DataTyCtxt Name     -- Theta part of a data decl
+                        --      data <S> => T a = MkT a
 \end{code}
 
 
@@ -374,16 +368,16 @@ data UserTypeCtxt
 --
 -- If the RHS mentions tyvars that aren't in scope, we'll 
 -- quantify over them:
---	e.g. 	type T = a->a
--- will become	type T = forall a. a->a
+--      e.g.    type T = a->a
+-- will become  type T = forall a. a->a
 --
 -- With gla-exts that's right, but for H98 we should complain. 
 
 
 %************************************************************************
-%*									*
-		Untoucable type variables
-%*									*
+%*                                                                      *
+                Untoucable type variables
+%*                                                                      *
 %************************************************************************
 
 Note [Untouchable type variables]
@@ -467,9 +461,9 @@ instance Outputable Untouchables where
 
 
 %************************************************************************
-%*									*
-		Pretty-printing
-%*									*
+%*                                                                      *
+                Pretty-printing
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -586,9 +580,9 @@ exactTyVarsOfTypes tys = foldr (unionVarSet . exactTyVarsOfType) emptyVarSet tys
 \end{code}
 
 %************************************************************************
-%*									*
-		Predicates
-%*									*
+%*                                                                      *
+                Predicates
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -617,15 +611,15 @@ isImmutableTyVar tv
 isTyConableTyVar, isSkolemTyVar, isOverlappableTyVar,
   isMetaTyVar, isAmbiguousTyVar, isFlatSkolTyVar :: TcTyVar -> Bool 
 
-isTyConableTyVar tv	
-	-- True of a meta-type variable that can be filled in 
-	-- with a type constructor application; in particular,
-	-- not a SigTv
+isTyConableTyVar tv     
+        -- True of a meta-type variable that can be filled in 
+        -- with a type constructor application; in particular,
+        -- not a SigTv
   = ASSERT( isTcTyVar tv) 
     case tcTyVarDetails tv of
-	MetaTv { mtv_info = SigTv } -> False
-	_                           -> True
-	
+        MetaTv { mtv_info = SigTv } -> False
+        _                           -> True
+        
 isFlatSkolTyVar tv
   = ASSERT2( isTcTyVar tv, ppr tv )
     case tcTyVarDetails tv of
@@ -649,8 +643,8 @@ isOverlappableTyVar tv
 isMetaTyVar tv 
   = ASSERT2( isTcTyVar tv, ppr tv )
     case tcTyVarDetails tv of
-	MetaTv {} -> True
-	_         -> False
+        MetaTv {} -> True
+        _         -> False
 
 -- isAmbiguousTyVar is used only when reporting type errors
 -- It picks out variables that are unbound, namely meta
@@ -660,9 +654,9 @@ isMetaTyVar tv
 isAmbiguousTyVar tv 
   = ASSERT2( isTcTyVar tv, ppr tv )
     case tcTyVarDetails tv of
-	MetaTv {}     -> True
-	RuntimeUnk {} -> True
-	_             -> False
+        MetaTv {}     -> True
+        RuntimeUnk {} -> True
+        _             -> False
 
 isMetaTyVarTy :: TcType -> Bool
 isMetaTyVarTy (TyVarTy tv) = isMetaTyVar tv
@@ -693,15 +687,15 @@ isSigTyVar :: Var -> Bool
 isSigTyVar tv 
   = ASSERT( isTcTyVar tv )
     case tcTyVarDetails tv of
-	MetaTv { mtv_info = SigTv } -> True
-	_                           -> False
+        MetaTv { mtv_info = SigTv } -> True
+        _                           -> False
 
 metaTvRef :: TyVar -> IORef MetaDetails
 metaTvRef tv 
   = ASSERT2( isTcTyVar tv, ppr tv )
     case tcTyVarDetails tv of
-	MetaTv { mtv_ref = ref } -> ref
-	_ -> pprPanic "metaTvRef" (ppr tv)
+        MetaTv { mtv_ref = ref } -> ref
+        _ -> pprPanic "metaTvRef" (ppr tv)
 
 isFlexi, isIndirect :: MetaDetails -> Bool
 isFlexi Flexi = True
@@ -719,9 +713,9 @@ isRuntimeUnkSkol x
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Tau, sigma and rho}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -754,11 +748,11 @@ mkTcEqPred ty1 ty2
 \begin{code}
 isTauTy :: Type -> Bool
 isTauTy ty | Just ty' <- tcView ty = isTauTy ty'
-isTauTy (TyVarTy _)	  = True
+isTauTy (TyVarTy _)       = True
 isTauTy (LitTy {})        = True
 isTauTy (TyConApp tc tys) = all isTauTy tys && isTauTyCon tc
-isTauTy (AppTy a b)	  = isTauTy a && isTauTy b
-isTauTy (FunTy a b)	  = isTauTy a && isTauTy b
+isTauTy (AppTy a b)       = isTauTy a && isTauTy b
+isTauTy (FunTy a b)       = isTauTy a && isTauTy b
 isTauTy (ForAllTy {})     = False
 
 isTauTyCon :: TyCon -> Bool
@@ -769,7 +763,7 @@ isTauTyCon tc
 
 ---------------
 getDFunTyKey :: Type -> OccName -- Get some string from a type, to be used to
-				-- construct a dictionary function name
+                                -- construct a dictionary function name
 getDFunTyKey ty | Just ty' <- tcView ty = getDFunTyKey ty'
 getDFunTyKey (TyVarTy tv)    = getOccName tv
 getDFunTyKey (TyConApp tc _) = getOccName tc
@@ -785,13 +779,13 @@ getDFunTyLitKey (StrTyLit n) = mkOccName Name.varName (show n)  -- hm
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Expanding and splitting}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 These tcSplit functions are like their non-Tc analogues, but
-	*) they do not look through newtypes
+        *) they do not look through newtypes
 
 However, they are non-monadic and do not follow through mutable type
 variables.  It's up to you to make sure this doesn't matter.
@@ -824,13 +818,13 @@ tcSplitPhiTy ty
   where
     split ty ts 
       = case tcSplitPredFunTy_maybe ty of
-	  Just (pred, ty) -> split ty (pred:ts)
-	  Nothing         -> (reverse ts, ty)
+          Just (pred, ty) -> split ty (pred:ts)
+          Nothing         -> (reverse ts, ty)
 
 tcSplitSigmaTy :: Type -> ([TyVar], ThetaType, Type)
 tcSplitSigmaTy ty = case tcSplitForAllTys ty of
-			(tvs, rho) -> case tcSplitPhiTy rho of
-					(theta, tau) -> (tvs, theta, tau)
+                        (tvs, rho) -> case tcSplitPhiTy rho of
+                                        (theta, tau) -> (tvs, theta, tau)
 
 -----------------------
 tcDeepSplitSigmaTy_maybe
@@ -852,60 +846,60 @@ tcDeepSplitSigmaTy_maybe ty
 -----------------------
 tcTyConAppTyCon :: Type -> TyCon
 tcTyConAppTyCon ty = case tcSplitTyConApp_maybe ty of
-			Just (tc, _) -> tc
-			Nothing	     -> pprPanic "tcTyConAppTyCon" (pprType ty)
+                        Just (tc, _) -> tc
+                        Nothing      -> pprPanic "tcTyConAppTyCon" (pprType ty)
 
 tcTyConAppArgs :: Type -> [Type]
 tcTyConAppArgs ty = case tcSplitTyConApp_maybe ty of
-			Just (_, args) -> args
-			Nothing	       -> pprPanic "tcTyConAppArgs" (pprType ty)
+                        Just (_, args) -> args
+                        Nothing        -> pprPanic "tcTyConAppArgs" (pprType ty)
 
 tcSplitTyConApp :: Type -> (TyCon, [Type])
 tcSplitTyConApp ty = case tcSplitTyConApp_maybe ty of
-			Just stuff -> stuff
-			Nothing	   -> pprPanic "tcSplitTyConApp" (pprType ty)
+                        Just stuff -> stuff
+                        Nothing    -> pprPanic "tcSplitTyConApp" (pprType ty)
 
 tcSplitTyConApp_maybe :: Type -> Maybe (TyCon, [Type])
 tcSplitTyConApp_maybe ty | Just ty' <- tcView ty = tcSplitTyConApp_maybe ty'
 tcSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys)
 tcSplitTyConApp_maybe (FunTy arg res)   = Just (funTyCon, [arg,res])
-	-- Newtypes are opaque, so they may be split
-	-- However, predicates are not treated
-	-- as tycon applications by the type checker
+        -- Newtypes are opaque, so they may be split
+        -- However, predicates are not treated
+        -- as tycon applications by the type checker
 tcSplitTyConApp_maybe _                 = Nothing
 
 -----------------------
 tcSplitFunTys :: Type -> ([Type], Type)
 tcSplitFunTys ty = case tcSplitFunTy_maybe ty of
-			Nothing	       -> ([], ty)
-			Just (arg,res) -> (arg:args, res')
-				       where
-					  (args,res') = tcSplitFunTys res
+                        Nothing        -> ([], ty)
+                        Just (arg,res) -> (arg:args, res')
+                                       where
+                                          (args,res') = tcSplitFunTys res
 
 tcSplitFunTy_maybe :: Type -> Maybe (Type, Type)
 tcSplitFunTy_maybe ty | Just ty' <- tcView ty           = tcSplitFunTy_maybe ty'
 tcSplitFunTy_maybe (FunTy arg res) | not (isPredTy arg) = Just (arg, res)
 tcSplitFunTy_maybe _                                    = Nothing
-	-- Note the typeKind guard
-	-- Consider	(?x::Int) => Bool
-	-- We don't want to treat this as a function type!
-	-- A concrete example is test tc230:
-	--	f :: () -> (?p :: ()) => () -> ()
-	--
-	--	g = f () ()
+        -- Note the typeKind guard
+        -- Consider     (?x::Int) => Bool
+        -- We don't want to treat this as a function type!
+        -- A concrete example is test tc230:
+        --      f :: () -> (?p :: ()) => () -> ()
+        --
+        --      g = f () ()
 
 tcSplitFunTysN
-	:: TcRhoType 
-	-> Arity		-- N: Number of desired args
-	-> ([TcSigmaType], 	-- Arg types (N or fewer)
-	    TcSigmaType)	-- The rest of the type
+        :: TcRhoType 
+        -> Arity                -- N: Number of desired args
+        -> ([TcSigmaType],      -- Arg types (N or fewer)
+            TcSigmaType)        -- The rest of the type
 
 tcSplitFunTysN ty n_args
   | n_args == 0
   = ([], ty)
   | Just (arg,res) <- tcSplitFunTy_maybe ty
   = case tcSplitFunTysN res (n_args - 1) of
-	(args, res) -> (arg:args, res)
+        (args, res) -> (arg:args, res)
   | otherwise
   = ([], ty)
 
@@ -925,16 +919,16 @@ tcSplitAppTy_maybe ty = repSplitAppTy_maybe ty
 
 tcSplitAppTy :: Type -> (Type, Type)
 tcSplitAppTy ty = case tcSplitAppTy_maybe ty of
-		    Just stuff -> stuff
-		    Nothing    -> pprPanic "tcSplitAppTy" (pprType ty)
+                    Just stuff -> stuff
+                    Nothing    -> pprPanic "tcSplitAppTy" (pprType ty)
 
 tcSplitAppTys :: Type -> (Type, [Type])
 tcSplitAppTys ty
   = go ty []
   where
     go ty args = case tcSplitAppTy_maybe ty of
-		   Just (ty', arg) -> go ty' (arg:args)
-		   Nothing	   -> (ty,args)
+                   Just (ty', arg) -> go ty' (arg:args)
+                   Nothing         -> (ty,args)
 
 -----------------------
 tcGetTyVar_maybe :: Type -> Maybe TyVar
@@ -985,17 +979,17 @@ tcInstHeadTyAppAllTyVars ty
   = tcInstHeadTyAppAllTyVars ty'
   | otherwise
   = case ty of
-	TyConApp _ tys  -> ok (filter (not . isKind) tys)  -- avoid kinds
-	FunTy arg res   -> ok [arg, res]
-	_               -> False
+        TyConApp _ tys  -> ok (filter (not . isKind) tys)  -- avoid kinds
+        FunTy arg res   -> ok [arg, res]
+        _               -> False
   where
-	-- Check that all the types are type variables,
-	-- and that each is distinct
+        -- Check that all the types are type variables,
+        -- and that each is distinct
     ok tys = equalLength tvs tys && hasNoDups tvs
-	   where
-	     tvs = mapCatMaybes get_tv tys
+           where
+             tvs = mapCatMaybes get_tv tys
 
-    get_tv (TyVarTy tv)  = Just tv	-- through synonyms
+    get_tv (TyVarTy tv)  = Just tv      -- through synonyms
     get_tv _             = Nothing
 \end{code}
 
@@ -1116,11 +1110,11 @@ occurCheckExpand dflags tv ty
                        | otherwise = return t
     go ty@(LitTy {}) = return ty
     go (AppTy ty1 ty2) = do { ty1' <- go ty1
-           		    ; ty2' <- go ty2  
-           		    ; return (mkAppTy ty1' ty2') }
+                            ; ty2' <- go ty2  
+                            ; return (mkAppTy ty1' ty2') }
     go (FunTy ty1 ty2) = do { ty1' <- go ty1 
-           		    ; ty2' <- go ty2 
-           		    ; return (mkFunTy ty1' ty2') } 
+                            ; ty2' <- go ty2 
+                            ; return (mkFunTy ty1' ty2') } 
     go ty@(ForAllTy tv' body_ty)
        | not impredicative                = OC_Forall
        | not (fast_check (tyVarKind tv')) = OC_Occurs
@@ -1146,9 +1140,9 @@ occurCheckExpand dflags tv ty
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Predicate types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Deconstructors and tests on predicate types
@@ -1211,14 +1205,14 @@ immSuperClasses cls tys
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Predicates}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 isSigmaTy returns true of any qualified type.  It doesn't *necessarily* have 
 any foralls.  E.g.
-	f :: (?x::Int) => Int -> Int
+        f :: (?x::Int) => Int -> Int
 
 \begin{code}
 isSigmaTy :: Type -> Bool
@@ -1258,8 +1252,8 @@ isStringTy ty
 is_tc :: Unique -> Type -> Bool
 -- Newtypes are opaque to this
 is_tc uniq ty = case tcSplitTyConApp_maybe ty of
-			Just (tc, _) -> uniq == getUnique tc
-			Nothing	     -> False
+                        Just (tc, _) -> uniq == getUnique tc
+                        Nothing      -> False
 \end{code}
 
 \begin{code}
@@ -1274,9 +1268,9 @@ isSynFamilyTyConApp _other            = False
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Misc}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1288,14 +1282,14 @@ deNoteType ty = ty
 tcTyVarsOfType :: Type -> TcTyVarSet
 -- Just the *TcTyVars* free in the type
 -- (Types.tyVarsOfTypes finds all free TyVars)
-tcTyVarsOfType (TyVarTy tv)	    = if isTcTyVar tv then unitVarSet tv
-						      else emptyVarSet
+tcTyVarsOfType (TyVarTy tv)         = if isTcTyVar tv then unitVarSet tv
+                                                      else emptyVarSet
 tcTyVarsOfType (TyConApp _ tys)     = tcTyVarsOfTypes tys
 tcTyVarsOfType (LitTy {})           = emptyVarSet
-tcTyVarsOfType (FunTy arg res)	    = tcTyVarsOfType arg `unionVarSet` tcTyVarsOfType res
-tcTyVarsOfType (AppTy fun arg)	    = tcTyVarsOfType fun `unionVarSet` tcTyVarsOfType arg
+tcTyVarsOfType (FunTy arg res)      = tcTyVarsOfType arg `unionVarSet` tcTyVarsOfType res
+tcTyVarsOfType (AppTy fun arg)      = tcTyVarsOfType fun `unionVarSet` tcTyVarsOfType arg
 tcTyVarsOfType (ForAllTy tyvar ty)  = tcTyVarsOfType ty `delVarSet` tyvar
-	-- We do sometimes quantify over skolem TcTyVars
+        -- We do sometimes quantify over skolem TcTyVars
 
 tcTyVarsOfTypes :: [Type] -> TyVarSet
 tcTyVarsOfTypes tys = foldr (unionVarSet.tcTyVarsOfType) emptyVarSet tys
@@ -1312,14 +1306,14 @@ orphNamesOfTyCon tycon = unitNameSet (getName tycon) `unionNameSets` case tyConC
 
 orphNamesOfType :: Type -> NameSet
 orphNamesOfType ty | Just ty' <- tcView ty = orphNamesOfType ty'
-		-- Look through type synonyms (Trac #4912)
-orphNamesOfType (TyVarTy _)		   = emptyNameSet
+                -- Look through type synonyms (Trac #4912)
+orphNamesOfType (TyVarTy _)                = emptyNameSet
 orphNamesOfType (TyConApp tycon tys)       = orphNamesOfTyCon tycon
                                              `unionNameSets` orphNamesOfTypes tys
 orphNamesOfType (LitTy {})          = emptyNameSet
-orphNamesOfType (FunTy arg res)	    = orphNamesOfType arg `unionNameSets` orphNamesOfType res
-orphNamesOfType (AppTy fun arg)	    = orphNamesOfType fun `unionNameSets` orphNamesOfType arg
-orphNamesOfType (ForAllTy _ ty)	    = orphNamesOfType ty
+orphNamesOfType (FunTy arg res)     = orphNamesOfType arg `unionNameSets` orphNamesOfType res
+orphNamesOfType (AppTy fun arg)     = orphNamesOfType fun `unionNameSets` orphNamesOfType arg
+orphNamesOfType (ForAllTy _ ty)     = orphNamesOfType ty
 
 orphNamesOfThings :: (a -> NameSet) -> [a] -> NameSet
 orphNamesOfThings f = foldr (unionNameSets . f) emptyNameSet
@@ -1331,12 +1325,12 @@ orphNamesOfDFunHead :: Type -> NameSet
 -- Find the free type constructors and classes 
 -- of the head of the dfun instance type
 -- The 'dfun_head_type' is because of
---	instance Foo a => Baz T where ...
+--      instance Foo a => Baz T where ...
 -- The decl is an orphan if Baz and T are both not locally defined,
---	even if Foo *is* locally defined
+--      even if Foo *is* locally defined
 orphNamesOfDFunHead dfun_ty 
   = case tcSplitSigmaTy dfun_ty of
-	(_, _, head_ty) -> orphNamesOfType head_ty
+        (_, _, head_ty) -> orphNamesOfType head_ty
         
 orphNamesOfCo :: Coercion -> NameSet
 orphNamesOfCo (Refl _ ty)           = orphNamesOfType ty
@@ -1372,9 +1366,9 @@ orphNamesOfCoAxBranch (CoAxBranch { cab_lhs = lhs, cab_rhs = rhs })
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[TysWiredIn-ext-type]{External types}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The compiler's foreign function interface supports the passing of a
@@ -1451,10 +1445,10 @@ isFFIPrimResultTy dflags ty
 isFFIDotnetTy :: DynFlags -> Type -> Bool
 isFFIDotnetTy dflags ty
   = checkRepTyCon (\ tc -> (legalFIResultTyCon dflags tc || 
-			   isFFIDotnetObjTy ty || isStringTy ty)) ty
-	-- NB: isStringTy used to look through newtypes, but
-	--     it no longer does so.  May need to adjust isFFIDotNetTy
-	--     if we do want to look through newtypes.
+                           isFFIDotnetObjTy ty || isStringTy ty)) ty
+        -- NB: isStringTy used to look through newtypes, but
+        --     it no longer does so.  May need to adjust isFFIDotNetTy
+        --     if we do want to look through newtypes.
 
 isFFIDotnetObjTy :: Type -> Bool
 isFFIDotnetObjTy ty
@@ -1511,7 +1505,7 @@ legalFEArgTyCon tc
 legalFIResultTyCon :: DynFlags -> TyCon -> Bool
 legalFIResultTyCon dflags tc
   | tc == unitTyCon         = True
-  | otherwise	            = marshalableTyCon dflags tc
+  | otherwise               = marshalableTyCon dflags tc
 
 legalFEResultTyCon :: TyCon -> Bool
 legalFEResultTyCon tc
@@ -1533,23 +1527,23 @@ marshalableTyCon dflags tc
   =  (xopt Opt_UnliftedFFITypes dflags 
       && isUnLiftedTyCon tc
       && not (isUnboxedTupleTyCon tc)
-      && case tyConPrimRep tc of	-- Note [Marshalling VoidRep]
-	   VoidRep -> False
-	   _       -> True)
+      && case tyConPrimRep tc of        -- Note [Marshalling VoidRep]
+           VoidRep -> False
+           _       -> True)
   || boxedMarshalableTyCon tc
 
 boxedMarshalableTyCon :: TyCon -> Bool
 boxedMarshalableTyCon tc
    = getUnique tc `elem` [ intTyConKey, int8TyConKey, int16TyConKey
-			 , int32TyConKey, int64TyConKey
-			 , wordTyConKey, word8TyConKey, word16TyConKey
-			 , word32TyConKey, word64TyConKey
-			 , floatTyConKey, doubleTyConKey
-			 , ptrTyConKey, funPtrTyConKey
-			 , charTyConKey
-			 , stablePtrTyConKey
-			 , boolTyConKey
-			 ]
+                         , int32TyConKey, int64TyConKey
+                         , wordTyConKey, word8TyConKey, word16TyConKey
+                         , word32TyConKey, word64TyConKey
+                         , floatTyConKey, doubleTyConKey
+                         , ptrTyConKey, funPtrTyConKey
+                         , charTyConKey
+                         , stablePtrTyConKey
+                         , boolTyConKey
+                         ]
 
 legalFIPrimArgTyCon :: DynFlags -> TyCon -> Bool
 -- Check args of 'foreign import prim', only allow simple unlifted types.
@@ -1567,16 +1561,16 @@ legalFIPrimResultTyCon dflags tc
   = xopt Opt_UnliftedFFITypes dflags
     && isUnLiftedTyCon tc
     && (isUnboxedTupleTyCon tc
-        || case tyConPrimRep tc of	-- Note [Marshalling VoidRep]
-	   VoidRep -> False
-	   _       -> True)
+        || case tyConPrimRep tc of      -- Note [Marshalling VoidRep]
+           VoidRep -> False
+           _       -> True)
 \end{code}
 
 Note [Marshalling VoidRep]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 We don't treat State# (whose PrimRep is VoidRep) as marshalable.
 In turn that means you can't write
-	foreign import foo :: Int -> State# RealWorld
+        foreign import foo :: Int -> State# RealWorld
 
 Reason: the back end falls over with panic "primRepHint:VoidRep";
-	and there is no compelling reason to permit it
+        and there is no compelling reason to permit it
diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs
index b226e4b..4ace630 100644
--- a/compiler/typecheck/TcUnify.lhs
+++ b/compiler/typecheck/TcUnify.lhs
@@ -6,12 +6,6 @@
 Type subsumption and unification
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module TcUnify (
   -- Full-blown subsumption
@@ -99,8 +93,8 @@ thing_inside, and returns a wrapper to coerce between the two types
 
 It's used wherever a language construct must have a functional type,
 namely:
-	A lambda expression
-	A function definition
+        A lambda expression
+        A function definition
      An operator section
 
 This is not (currently) where deep skolemisation occurs;
@@ -109,9 +103,9 @@ expected type, because it expects that to have been done already
 
 
 \begin{code}
-matchExpectedFunTys :: SDoc 	-- See Note [Herald for matchExpectedFunTys]
-            	    -> Arity
-            	    -> TcRhoType 
+matchExpectedFunTys :: SDoc     -- See Note [Herald for matchExpectedFunTys]
+                    -> Arity
+                    -> TcRhoType 
                     -> TcM (TcCoercion, [TcSigmaType], TcRhoType)
 
 -- If    matchExpectFunTys n ty = (co, [t1,..,tn], ty_r)
@@ -120,7 +114,7 @@ matchExpectedFunTys :: SDoc 	-- See Note [Herald for matchExpectedFunTys]
 -- Does not allocate unnecessary meta variables: if the input already is 
 -- a function, we just take it apart.  Not only is this efficient, 
 -- it's important for higher rank: the argument might be of form
---		(forall a. ty) -> other
+--              (forall a. ty) -> other
 -- If allocated (fresh-meta-var1 -> fresh-meta-var2) and unified, we'd
 -- hide the forall inside a meta-variable
 
@@ -144,9 +138,9 @@ matchExpectedFunTys herald arity orig_ty
     go n_req ty@(TyVarTy tv)
       | ASSERT( isTcTyVar tv) isMetaTyVar tv
       = do { cts <- readMetaTyVar tv
-	   ; case cts of
-	       Indirect ty' -> go n_req ty'
-	       Flexi        -> defer n_req ty }
+           ; case cts of
+               Indirect ty' -> go n_req ty'
+               Flexi        -> defer n_req ty }
 
        -- In all other cases we bale out into ordinary unification
        -- However unlike the meta-tyvar case, we are sure that the
@@ -173,9 +167,9 @@ matchExpectedFunTys herald arity orig_ty
 
     mk_msg ty n_args
       = herald <+> speakNOf arity (ptext (sLit "argument")) <> comma $$ 
-	sep [ptext (sLit "but its type") <+> quotes (pprType ty), 
-	     if n_args == 0 then ptext (sLit "has none") 
-	     else ptext (sLit "has only") <+> speakN n_args]
+        sep [ptext (sLit "but its type") <+> quotes (pprType ty), 
+             if n_args == 0 then ptext (sLit "has none") 
+             else ptext (sLit "has only") <+> speakN n_args]
 \end{code}
 
 Note [Foralls to left of arrow]
@@ -204,7 +198,7 @@ matchExpectedPArrTy exp_ty
 
 ----------------------
 matchExpectedTyConApp :: TyCon                -- T :: forall kv1 ... kvm. k1 -> ... -> kn -> *
-                      -> TcRhoType 	      -- orig_ty
+                      -> TcRhoType            -- orig_ty
                       -> TcM (TcCoercion,     -- T k1 k2 k3 a b c ~ orig_ty
                               [TcSigmaType])  -- Element types, k1 k2 k3 a b c
 
@@ -328,9 +322,9 @@ tcSubType origin ctxt ty_actual ty_expected
             ; return (coToHsWrapper cow <.> in_wrap) }
        ; return (sk_wrap <.> inst_wrap) }
 
-  | otherwise	-- Urgh!  It seems deeply weird to have equality
-    		-- when actual is not a polytype, and it makes a big 
-		-- difference e.g. tcfail104
+  | otherwise   -- Urgh!  It seems deeply weird to have equality
+                -- when actual is not a polytype, and it makes a big 
+                -- difference e.g. tcfail104
   = do { cow <- unify ty_actual ty_expected
        ; return (coToHsWrapper cow) }
   where
@@ -346,13 +340,13 @@ tcSubType origin ctxt ty_actual ty_expected
 tcInfer :: (TcType -> TcM a) -> TcM (a, TcType)
 tcInfer tc_infer = do { ty  <- newFlexiTyVarTy openTypeKind
                       ; res <- tc_infer ty
-		      ; return (res, ty) }
+                      ; return (res, ty) }
 
 -----------------
 tcWrapResult :: HsExpr TcId -> TcRhoType -> TcRhoType -> TcM (HsExpr TcId)
 tcWrapResult expr actual_ty res_ty
   = do { cow <- unifyType actual_ty res_ty
-       	        -- Both types are deeply skolemised
+                -- Both types are deeply skolemised
        ; return (mkHsWrapCo cow expr) }
 
 -----------------------------------
@@ -395,7 +389,7 @@ tcGen ctxt expected_ty thing_inside
                            text "expected_ty" <+> ppr expected_ty,
                            text "inst ty" <+> ppr tvs' <+> ppr rho' ]
 
-	-- Generally we must check that the "forall_tvs" havn't been constrained
+        -- Generally we must check that the "forall_tvs" havn't been constrained
         -- The interesting bit here is that we must include the free variables
         -- of the expected_ty.  Here's an example:
         --       runST (newVar True)
@@ -404,9 +398,9 @@ tcGen ctxt expected_ty thing_inside
         -- forall s'. ST s' a. That unifies s' with s, and a with MutVar s Bool.
         -- So now s' isn't unconstrained because it's linked to a.
         -- 
-	-- However [Oct 10] now that the untouchables are a range of 
+        -- However [Oct 10] now that the untouchables are a range of 
         -- TcTyVars, all this is handled automatically with no need for
-	-- extra faffing around
+        -- extra faffing around
 
         -- Use the *instantiated* type in the SkolemInfo
         -- so that the names of displayed type variables line up
@@ -416,14 +410,14 @@ tcGen ctxt expected_ty thing_inside
                                 thing_inside tvs' rho'
 
         ; return (wrap <.> mkWpLet ev_binds, result) }
-	  -- The ev_binds returned by checkConstraints is very
-	  -- often empty, in which case mkWpLet is a no-op
+          -- The ev_binds returned by checkConstraints is very
+          -- often empty, in which case mkWpLet is a no-op
 
 checkConstraints :: SkolemInfo
-		 -> [TcTyVar]		-- Skolems
-		 -> [EvVar]             -- Given
-		 -> TcM result
-		 -> TcM (TcEvBinds, result)
+                 -> [TcTyVar]           -- Skolems
+                 -> [EvVar]             -- Given
+                 -> TcM result
+                 -> TcM (TcEvBinds, result)
 
 checkConstraints skol_info skol_tvs given thing_inside
   | null skol_tvs && null given
@@ -435,7 +429,7 @@ checkConstraints skol_info skol_tvs given thing_inside
   = newImplication skol_info skol_tvs given thing_inside
 
 newImplication :: SkolemInfo -> [TcTyVar]
-	       -> [EvVar] -> TcM result
+               -> [EvVar] -> TcM result
                -> TcM (TcEvBinds, result)
 newImplication skol_info skol_tvs given thing_inside
   = ASSERT2( all isTcTyVar skol_tvs, ppr skol_tvs )
@@ -446,24 +440,24 @@ newImplication skol_info skol_tvs given thing_inside
                                       thing_inside
 
        ; if isEmptyWC wanted && no_equalities
-       	    -- Optimisation : if there are no wanteds, and the givens
-       	    -- are sufficiently simple, don't generate an implication
-       	    -- at all.  Reason for the hasEqualities test:
-	    -- we don't want to lose the "inaccessible alternative"
-	    -- error check
+            -- Optimisation : if there are no wanteds, and the givens
+            -- are sufficiently simple, don't generate an implication
+            -- at all.  Reason for the hasEqualities test:
+            -- we don't want to lose the "inaccessible alternative"
+            -- error check
          then 
             return (emptyTcEvBinds, result)
          else do
        { ev_binds_var <- newTcEvBinds
        ; env <- getLclEnv
        ; emitImplication $ Implic { ic_untch = untch
-             		     	  , ic_skols = skol_tvs
+                                  , ic_skols = skol_tvs
                                   , ic_fsks  = []
-                             	  , ic_given = given
+                                  , ic_given = given
                                   , ic_wanted = wanted
                                   , ic_insol  = insolubleWC wanted
                                   , ic_binds = ev_binds_var
-             		     	  , ic_env = env
+                                  , ic_env = env
                                   , ic_info = skol_info }
 
        ; return (TcEvBinds ev_binds_var, result) } }
@@ -515,7 +509,7 @@ unifyTypeList (ty1:tys@(ty2:_)) = do { _ <- unifyType ty1 ty2
 
 %************************************************************************
 %*                                                                      *
-                 uType and friends									
+                 uType and friends                                                                      
 %*                                                                      *
 %************************************************************************
 
@@ -569,11 +563,11 @@ uType origin orig_ty1 orig_ty2
        ; return co }
   where
     go :: TcType -> TcType -> TcM TcCoercion
-	-- The arguments to 'go' are always semantically identical 
-	-- to orig_ty{1,2} except for looking through type synonyms
+        -- The arguments to 'go' are always semantically identical 
+        -- to orig_ty{1,2} except for looking through type synonyms
 
         -- Variables; go for uVar
-	-- Note that we pass in *original* (before synonym expansion), 
+        -- Note that we pass in *original* (before synonym expansion), 
         -- so that type variables tend to get filled in with 
         -- the most informative version of the type
     go (TyVarTy tv1) ty2 
@@ -588,17 +582,17 @@ uType origin orig_ty1 orig_ty2
                Unfilled ds2 -> uUnfilledVar origin IsSwapped tv2 ds2 ty1 }
 
         -- See Note [Expanding synonyms during unification]
-	--
-	-- Also NB that we recurse to 'go' so that we don't push a
-	-- new item on the origin stack. As a result if we have
-	--   type Foo = Int
-	-- and we try to unify  Foo ~ Bool
-	-- we'll end up saying "can't match Foo with Bool"
-	-- rather than "can't match "Int with Bool".  See Trac #4535.
+        --
+        -- Also NB that we recurse to 'go' so that we don't push a
+        -- new item on the origin stack. As a result if we have
+        --   type Foo = Int
+        -- and we try to unify  Foo ~ Bool
+        -- we'll end up saying "can't match Foo with Bool"
+        -- rather than "can't match "Int with Bool".  See Trac #4535.
     go ty1 ty2
       | Just ty1' <- tcView ty1 = go ty1' ty2
       | Just ty2' <- tcView ty2 = go ty1  ty2'
-      	     
+             
         -- Functions (or predicate functions) just check the two parts
     go (FunTy fun1 arg1) (FunTy fun2 arg2)
       = do { co_l <- uType origin fun1 fun2
@@ -606,7 +600,7 @@ uType origin orig_ty1 orig_ty2
            ; return $ mkTcFunCo co_l co_r }
 
         -- Always defer if a type synonym family (type function)
-      	-- is involved.  (Data families behave rigidly.)
+        -- is involved.  (Data families behave rigidly.)
     go ty1@(TyConApp tc1 _) ty2
       | isSynFamilyTyCon tc1 = uType_defer origin ty1 ty2   
     go ty1 ty2@(TyConApp tc2 _)
@@ -622,7 +616,7 @@ uType origin orig_ty1 orig_ty2
       | m == n
       = return $ mkTcReflCo ty
 
-	-- See Note [Care with type applications]
+        -- See Note [Care with type applications]
         -- Do not decompose FunTy against App; 
         -- it's often a type error, so leave it for the constraint solver
     go (AppTy s1 t1) (AppTy s2 t2)
@@ -662,7 +656,7 @@ unifySigmaTy origin ty1 ty2
        ; let tys      = mkTyVarTys skol_tvs
              phi1     = Type.substTy subst1                   body1
              phi2     = Type.substTy (zipTopTvSubst tvs2 tys) body2
-	     skol_info = UnifyForAllSkol skol_tvs phi1
+             skol_info = UnifyForAllSkol skol_tvs phi1
 
        ; (ev_binds, co) <- checkConstraints skol_info skol_tvs [] $
                            uType origin phi1 phi2
@@ -694,7 +688,7 @@ Note [Mismatched type lists and application decomposition]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 When we find two TyConApps, you might think that the argument lists 
 are guaranteed equal length.  But they aren't. Consider matching
-	w (T x) ~ Foo (T x y)
+        w (T x) ~ Foo (T x y)
 We do match (w ~ Foo) first, but in some circumstances we simply create
 a deferred constraint; and then go ahead and match (T x ~ T x y).
 This came up in Trac #3950.
@@ -761,7 +755,7 @@ back into @uTys@ if it turns out that the variable is already bound.
 uUnfilledVar :: CtOrigin
              -> SwapFlag
              -> TcTyVar -> TcTyVarDetails       -- Tyvar 1
-             -> TcTauType  			-- Type 2
+             -> TcTauType                       -- Type 2
              -> TcM TcCoercion
 -- "Unfilled" means that the variable is definitely not a filled-in meta tyvar
 --            It might be a skolem, or untouchable, or meta
@@ -790,12 +784,12 @@ uUnfilledVar origin swapped tv1 details1 non_var_ty2  -- ty2 is not a type varia
                                   ; defer }
               }
 
-      _other -> do { traceTc "Skolem defer" (ppr tv1); defer }	-- Skolems of all sorts
+      _other -> do { traceTc "Skolem defer" (ppr tv1); defer }  -- Skolems of all sorts
   where
     defer = unSwap swapped (uType_defer origin) (mkTyVarTy tv1) non_var_ty2
                -- Occurs check or an untouchable: just defer
-	       -- NB: occurs check isn't necessarily fatal: 
-	       --     eg tv1 occured in type family parameter
+               -- NB: occurs check isn't necessarily fatal: 
+               --     eg tv1 occured in type family parameter
 
 ----------------
 uUnfilledVars :: CtOrigin
@@ -821,7 +815,7 @@ uUnfilledVars origin swapped tv1 details1 tv2 details2
            -- k2 < k1, so update tv1
            (GT, MetaTv { mtv_ref = ref1 }, _) -> updateMeta tv1 ref1 ty2
 
-	   -- k1 = k2, so we are free to update either way
+           -- k1 = k2, so we are free to update either way
            (EQ, MetaTv { mtv_info = i1, mtv_ref = ref1 }, 
                 MetaTv { mtv_info = i2, mtv_ref = ref2 })
                 | nicer_to_update_tv1 i1 i2 -> updateMeta tv1 ref1 ty2
@@ -829,8 +823,8 @@ uUnfilledVars origin swapped tv1 details1 tv2 details2
            (EQ, MetaTv { mtv_ref = ref1 }, _) -> updateMeta tv1 ref1 ty2
            (EQ, _, MetaTv { mtv_ref = ref2 }) -> updateMeta tv2 ref2 ty1
 
-	   -- Can't do it in-place, so defer
-	   -- This happens for skolems of all sorts
+           -- Can't do it in-place, so defer
+           -- This happens for skolems of all sorts
            (_, _, _) -> unSwap swapped (uType_defer origin) ty1 ty2 } }
   where
     k1  = tyVarKind tv1
@@ -1018,8 +1012,8 @@ sharing, so there's no great harm in losing it -- and it's generally
 more efficient to do the unification up-front.
 
 \begin{code}
-data LookupTyVarResult	-- The result of a lookupTcTyVar call
-  = Unfilled TcTyVarDetails	-- SkolemTv or virgin MetaTv
+data LookupTyVarResult  -- The result of a lookupTcTyVar call
+  = Unfilled TcTyVarDetails     -- SkolemTv or virgin MetaTv
   | Filled   TcType
 
 lookupTcTyVar :: TcTyVar -> TcM LookupTyVarResult
diff --git a/compiler/types/Class.lhs b/compiler/types/Class.lhs
index 3fb1bac..0a50497 100644
--- a/compiler/types/Class.lhs
+++ b/compiler/types/Class.lhs
@@ -6,33 +6,27 @@
 The @Class@ datatype
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module Class (
-	Class,
+        Class,
         ClassOpItem, DefMeth (..),
         ClassATItem,
         ClassMinimalDef,
-	defMethSpecOfDefMeth,
+        defMethSpecOfDefMeth,
 
-	FunDep,	pprFundeps, pprFunDep,
+        FunDep, pprFundeps, pprFunDep,
 
-	mkClass, classTyVars, classArity, 
-	classKey, className, classATs, classATItems, classTyCon, classMethods,
-	classOpItems, classBigSig, classExtraBigSig, classTvsFds, classSCTheta,
+        mkClass, classTyVars, classArity, 
+        classKey, className, classATs, classATItems, classTyCon, classMethods,
+        classOpItems, classBigSig, classExtraBigSig, classTvsFds, classSCTheta,
         classAllSelIds, classSCSelId, classMinimalDef
     ) where
 
 #include "Typeable.h"
 #include "HsVersions.h"
 
-import {-# SOURCE #-} TyCon	( TyCon, tyConName, tyConUnique )
-import {-# SOURCE #-} TypeRep	( PredType )
+import {-# SOURCE #-} TyCon     ( TyCon, tyConName, tyConUnique )
+import {-# SOURCE #-} TypeRep   ( PredType )
 import CoAxiom
 import Var
 import Name
@@ -48,9 +42,9 @@ import qualified Data.Data as Data
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[Class-basic]{@Class@: basic definition}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 A @Class@ corresponds to a Greek kappa in the static semantics:
@@ -58,46 +52,46 @@ A @Class@ corresponds to a Greek kappa in the static semantics:
 \begin{code}
 data Class
   = Class {
-	classTyCon :: TyCon,	-- The data type constructor for
-				-- dictionaries of this class
+        classTyCon :: TyCon,    -- The data type constructor for
+                                -- dictionaries of this class
                                 -- See Note [ATyCon for classes] in TypeRep
 
-	className :: Name,              -- Just the cached name of the TyCon
-	classKey  :: Unique,		-- Cached unique of TyCon
-	
-	classTyVars  :: [TyVar],	-- The class kind and type variables;
-		     			-- identical to those of the TyCon
+        className :: Name,              -- Just the cached name of the TyCon
+        classKey  :: Unique,            -- Cached unique of TyCon
+        
+        classTyVars  :: [TyVar],        -- The class kind and type variables;
+                                        -- identical to those of the TyCon
 
-	classFunDeps :: [FunDep TyVar],	-- The functional dependencies
+        classFunDeps :: [FunDep TyVar], -- The functional dependencies
 
-	-- Superclasses: eg: (F a ~ b, F b ~ G a, Eq a, Show b)
+        -- Superclasses: eg: (F a ~ b, F b ~ G a, Eq a, Show b)
         -- We need value-level selectors for both the dictionary 
-	-- superclasses and the equality superclasses
-	classSCTheta :: [PredType],	-- Immediate superclasses, 
-	classSCSels  :: [Id],		-- Selector functions to extract the
-		     			--   superclasses from a 
-					--   dictionary of this class
-	-- Associated types
-        classATStuff :: [ClassATItem],	-- Associated type families
+        -- superclasses and the equality superclasses
+        classSCTheta :: [PredType],     -- Immediate superclasses, 
+        classSCSels  :: [Id],           -- Selector functions to extract the
+                                        --   superclasses from a 
+                                        --   dictionary of this class
+        -- Associated types
+        classATStuff :: [ClassATItem],  -- Associated type families
 
         -- Class operations (methods, not superclasses)
-	classOpStuff :: [ClassOpItem],	-- Ordered by tag
+        classOpStuff :: [ClassOpItem],  -- Ordered by tag
 
-	-- Minimal complete definition
-	classMinimalDef :: ClassMinimalDef
+        -- Minimal complete definition
+        classMinimalDef :: ClassMinimalDef
      }
   deriving Typeable
 
 type FunDep a = ([a],[a])  --  e.g. class C a b c | a b -> c, a c -> b where...
-			   --  Here fun-deps are [([a,b],[c]), ([a,c],[b])]
+                           --  Here fun-deps are [([a,b],[c]), ([a,c],[b])]
 
 type ClassOpItem = (Id, DefMeth)
         -- Selector function; contains unfolding
-	-- Default-method info
+        -- Default-method info
 
-data DefMeth = NoDefMeth 		-- No default method
-	     | DefMeth Name  		-- A polymorphic default method
-	     | GenDefMeth Name 		-- A generic default method
+data DefMeth = NoDefMeth                -- No default method
+             | DefMeth Name             -- A polymorphic default method
+             | GenDefMeth Name          -- A generic default method
              deriving Eq
 
 type ClassATItem = (TyCon,           -- See Note [Associated type tyvar names]
@@ -112,9 +106,9 @@ type ClassMinimalDef = BooleanFormula Name -- Required methods
 defMethSpecOfDefMeth :: DefMeth -> DefMethSpec
 defMethSpecOfDefMeth meth
  = case meth of
-	NoDefMeth	-> NoDM
-	DefMeth _	-> VanillaDM
-	GenDefMeth _	-> GenericDM
+        NoDefMeth       -> NoDM
+        DefMeth _       -> VanillaDM
+        GenDefMeth _    -> GenericDM
 
 \end{code}
 
@@ -164,9 +158,9 @@ Having the same variables for class and tycon is also used in checkValidRoles
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[Class-selectors]{@Class@: simple selectors}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 The rest of these functions are just simple selectors.
@@ -174,7 +168,7 @@ The rest of these functions are just simple selectors.
 \begin{code}
 classArity :: Class -> Arity
 classArity clas = length (classTyVars clas)
-	-- Could memoise this
+        -- Could memoise this
 
 classAllSelIds :: Class -> [Id]
 -- Both superclass-dictionary and method selectors
@@ -209,21 +203,21 @@ classTvsFds c
 
 classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
 classBigSig (Class {classTyVars = tyvars, classSCTheta = sc_theta, 
-	 	    classSCSels = sc_sels, classOpStuff = op_stuff})
+                    classSCSels = sc_sels, classOpStuff = op_stuff})
   = (tyvars, sc_theta, sc_sels, op_stuff)
 
 classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem])
 classExtraBigSig (Class {classTyVars = tyvars, classFunDeps = fundeps,
-			 classSCTheta = sc_theta, classSCSels = sc_sels,
-			 classATStuff = ats, classOpStuff = op_stuff})
+                         classSCTheta = sc_theta, classSCSels = sc_sels,
+                         classATStuff = ats, classOpStuff = op_stuff})
   = (tyvars, fundeps, sc_theta, sc_sels, ats, op_stuff)
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection[Class-instances]{Instance declarations for @Class@}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 We compare @Classes@ by their keys (which include @Uniques@).
diff --git a/compiler/types/Coercion.lhs b/compiler/types/Coercion.lhs
index 251ab65..d771568 100644
--- a/compiler/types/Coercion.lhs
+++ b/compiler/types/Coercion.lhs
@@ -3,12 +3,6 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- | Module for (a) type kinds and (b) type coercions, 
 -- as used in System FC. See 'CoreSyn.Expr' for
@@ -26,13 +20,13 @@ module Coercion (
         isReflCo_maybe, coercionRole,
         mkCoercionType,
 
-	-- ** Constructing coercions
+        -- ** Constructing coercions
         mkReflCo, mkCoVarCo, 
         mkAxInstCo, mkUnbranchedAxInstCo, mkAxInstLHS, mkAxInstRHS,
         mkUnbranchedAxInstRHS,
         mkPiCo, mkPiCos, mkCoCast,
         mkSymCo, mkTransCo, mkNthCo, mkNthCoRole, mkLRCo,
-	mkInstCo, mkAppCo, mkTyConAppCo, mkFunCo,
+        mkInstCo, mkAppCo, mkTyConAppCo, mkFunCo,
         mkForAllCo, mkUnsafeCo, mkUnivCo, mkSubCo, mkPhantomCo,
         mkNewTypeCo, maybeSubCo, maybeSubCo2,
         mkAxiomRuleCo,
@@ -46,25 +40,25 @@ module Coercion (
         splitForAllCo_maybe,
         nthRole, tyConRolesX,
 
-	-- ** Coercion variables
-	mkCoVar, isCoVar, isCoVarType, coVarName, setCoVarName, setCoVarUnique,
+        -- ** Coercion variables
+        mkCoVar, isCoVar, isCoVarType, coVarName, setCoVarName, setCoVarUnique,
 
         -- ** Free variables
         tyCoVarsOfCo, tyCoVarsOfCos, coVarsOfCo, coercionSize,
-	
+        
         -- ** Substitution
         CvSubstEnv, emptyCvSubstEnv, 
- 	CvSubst(..), emptyCvSubst, Coercion.lookupTyVar, lookupCoVar,
-	isEmptyCvSubst, zapCvSubstEnv, getCvInScope,
+        CvSubst(..), emptyCvSubst, Coercion.lookupTyVar, lookupCoVar,
+        isEmptyCvSubst, zapCvSubstEnv, getCvInScope,
         substCo, substCos, substCoVar, substCoVars,
         substCoWithTy, substCoWithTys, 
-	cvTvSubst, tvCvSubst, mkCvSubst, zipOpenCvSubst,
+        cvTvSubst, tvCvSubst, mkCvSubst, zipOpenCvSubst,
         substTy, extendTvSubst,
         extendCvSubstAndInScope, extendTvSubstAndInScope,
-	substTyVarBndr, substCoVarBndr,
+        substTyVarBndr, substCoVarBndr,
 
-	-- ** Lifting
-	liftCoMatch, liftCoSubstTyVar, liftCoSubstWith, 
+        -- ** Lifting
+        liftCoMatch, liftCoSubstTyVar, liftCoSubstWith, 
         
         -- ** Comparison
         coreEqCoercion, coreEqCoercion2,
@@ -85,7 +79,7 @@ module Coercion (
 
 #include "HsVersions.h"
 
-import Unify	( MatchEnv(..), matchList )
+import Unify    ( MatchEnv(..), matchList )
 import TypeRep
 import qualified Type
 import Type hiding( substTy, substTyVarBndr, extendTvSubst )
@@ -96,15 +90,15 @@ import VarEnv
 import VarSet
 import Binary
 import Maybes   ( orElse )
-import Name	( Name, NamedThing(..), nameUnique, nameModule, getSrcSpan )
-import OccName 	( parenSymOcc )
+import Name     ( Name, NamedThing(..), nameUnique, nameModule, getSrcSpan )
+import OccName  ( parenSymOcc )
 import Util
 import BasicTypes
 import Outputable
 import Unique
 import Pair
 import SrcLoc
-import PrelNames	( funTyConKey, eqPrimTyConKey, eqReprPrimTyConKey )
+import PrelNames        ( funTyConKey, eqPrimTyConKey, eqReprPrimTyConKey )
 import Control.Applicative
 import Data.Traversable (traverse, sequenceA)
 import FastString
@@ -113,9 +107,9 @@ import qualified Data.Data as Data hiding ( TyCon )
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
             Coercions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -153,9 +147,9 @@ data Coercion
   -- TyConAppCo :: "e" -> _ -> ?? -> e
   -- See Note [TyConAppCo roles]
   | TyConAppCo Role TyCon [Coercion]    -- lift TyConApp 
-    	       -- The TyCon is never a synonym; 
-	       -- we expand synonyms eagerly
-	       -- But it can be a type function
+               -- The TyCon is never a synonym; 
+               -- we expand synonyms eagerly
+               -- But it can be a type function
 
   | AppCo Coercion Coercion        -- lift AppTy
           -- AppCo :: e -> N -> e
@@ -491,9 +485,9 @@ necessary for soundness, but this choice removes ambiguity.
 The rules here also dictate what the parameters to mkTyConAppCo.
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{Coercion variables}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -510,7 +504,7 @@ isCoVar :: Var -> Bool
 isCoVar v = isCoVarType (varType v)
 
 isCoVarType :: Type -> Bool
-isCoVarType ty 	    -- Tests for t1 ~# t2, the unboxed equality
+isCoVarType ty      -- Tests for t1 ~# t2, the unboxed equality
   = case splitTyConApp_maybe ty of
       Just (tc,tys) -> (tc `hasKey` eqPrimTyConKey || tc `hasKey` eqReprPrimTyConKey)
                        && tys `lengthAtLeast` 2
@@ -578,9 +572,9 @@ coercionSize (AxiomRuleCo _ tys cos) = 1 + sum (map typeSize tys)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                             Tidying coercions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -619,7 +613,7 @@ tidyCos env = map (tidyCo env)
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Pretty-printing coercions
 %*                                                                      *
 %************************************************************************
@@ -749,9 +743,9 @@ pprCoAxBranchHdr ax@(CoAxiom { co_ax_tc = fam_tc, co_ax_name = name }) index
 \end{code}
 
 %************************************************************************
-%*									*
-	Functions over Kinds		
-%*									*
+%*                                                                      *
+        Functions over Kinds            
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -830,9 +824,9 @@ isReflCo_maybe _                 = Nothing
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
             Building coercions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -924,12 +918,12 @@ mkAppCos co1 cos = foldl mkAppCo co1 cos
 -- caller's responsibility to get the roles correct on argument coercions.
 mkTyConAppCo :: Role -> TyCon -> [Coercion] -> Coercion
 mkTyConAppCo r tc cos
-	       -- Expand type synonyms
+               -- Expand type synonyms
   | Just (tv_co_prs, rhs_ty, leftover_cos) <- tcExpandTyCon_maybe tc cos
   = mkAppCos (liftCoSubst r tv_co_prs rhs_ty) leftover_cos
 
   | Just tys <- traverse isReflCo_maybe cos 
-  = Refl r (mkTyConApp tc tys)	-- See Note [Refl invariant]
+  = Refl r (mkTyConApp tc tys)  -- See Note [Refl invariant]
 
   | otherwise = TyConAppCo r tc cos
 
@@ -1144,9 +1138,9 @@ mkCoCast c g
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
             Newtypes
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1202,7 +1196,7 @@ topNormaliseNewTypeX _ _ = Nothing
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Equality of coercions
 %*                                                                      *
 %************************************************************************
@@ -1259,7 +1253,7 @@ coreEqCoercion2 _ _ _ = False
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Substitution of coercions
 %*                                                                      *
 %************************************************************************
@@ -1272,17 +1266,17 @@ type CvSubstEnv = VarEnv Coercion
 emptyCvSubstEnv :: CvSubstEnv
 emptyCvSubstEnv = emptyVarEnv
 
-data CvSubst 		
-  = CvSubst InScopeSet 	-- The in-scope type variables
-	    TvSubstEnv	-- Substitution of types
+data CvSubst            
+  = CvSubst InScopeSet  -- The in-scope type variables
+            TvSubstEnv  -- Substitution of types
             CvSubstEnv  -- Substitution of coercions
 
 instance Outputable CvSubst where
   ppr (CvSubst ins tenv cenv)
     = brackets $ sep[ ptext (sLit "CvSubst"),
-		      nest 2 (ptext (sLit "In scope:") <+> ppr ins), 
-		      nest 2 (ptext (sLit "Type env:") <+> ppr tenv),
-		      nest 2 (ptext (sLit "Coercion env:") <+> ppr cenv) ]
+                      nest 2 (ptext (sLit "In scope:") <+> ppr ins), 
+                      nest 2 (ptext (sLit "Type env:") <+> ppr tenv),
+                      nest 2 (ptext (sLit "Coercion env:") <+> ppr cenv) ]
 
 emptyCvSubst :: CvSubst
 emptyCvSubst = CvSubst emptyInScopeSet emptyVarEnv emptyVarEnv
@@ -1335,8 +1329,8 @@ substCoVarBndr subst@(CvSubst in_scope tenv cenv) old_var
 
     new_var = uniqAway in_scope subst_old_var
     subst_old_var = mkCoVar (varName old_var) (substTy subst (varType old_var))
-		  -- It's important to do the substitution for coercions,
-		  -- because they can have free type variables
+                  -- It's important to do the substitution for coercions,
+                  -- because they can have free type variables
 
 substTyVarBndr :: CvSubst -> TyVar -> (CvSubst, TyVar)
 substTyVarBndr (CvSubst in_scope tenv cenv) old_var
@@ -1426,9 +1420,9 @@ lookupCoVar (CvSubst _ _ cenv) v = lookupVarEnv cenv v
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    "Lifting" substitution
-	   [(TyVar,Coercion)] -> Type -> Coercion
+           [(TyVar,Coercion)] -> Type -> Coercion
 %*                                                                      *
 %************************************************************************
 
@@ -1508,8 +1502,8 @@ ty_co_subst subst role ty
     go Phantom ty             = lift_phantom ty
     go role (TyVarTy tv)      = liftCoSubstTyVar subst role tv
                                 `orElse` Refl role (TyVarTy tv)
-       			     -- A type variable from a non-cloned forall
-			     -- won't be in the substitution
+                             -- A type variable from a non-cloned forall
+                             -- won't be in the substitution
     go role (AppTy ty1 ty2)   = mkAppCo (go role ty1) (go Nominal ty2)
     go role (TyConApp tc tys) = mkTyConAppCo role tc
                                            (zipWith go (tyConRolesX role tc) tys)
@@ -1556,10 +1550,10 @@ liftCoSubstTyVar (LCS _ cenv) r tv
 
 liftCoSubstTyVarBndr :: LiftCoSubst -> TyVar -> (LiftCoSubst, TyVar)
 liftCoSubstTyVarBndr subst@(LCS in_scope cenv) old_var
-  = (LCS (in_scope `extendInScopeSet` new_var) new_cenv, new_var)		
+  = (LCS (in_scope `extendInScopeSet` new_var) new_cenv, new_var)               
   where
     new_cenv | no_change = delVarEnv cenv old_var
-	     | otherwise = extendVarEnv cenv old_var (Refl Nominal (TyVarTy new_var))
+             | otherwise = extendVarEnv cenv old_var (Refl Nominal (TyVarTy new_var))
 
     no_change = no_kind_change && (new_var == old_var)
 
@@ -1643,7 +1637,7 @@ ty_co_match menv cenv (TyVarTy tv1) co
 
   | otherwise    -- tv1 is not a template ty var, so the only thing it
                  -- can match is a reflexivity coercion for itself.
-		 -- But that case is dealt with already
+                 -- But that case is dealt with already
   = Nothing
 
   where
@@ -1651,7 +1645,7 @@ ty_co_match menv cenv (TyVarTy tv1) co
     tv1' = rnOccL rn_env tv1
 
 ty_co_match menv subst (AppTy ty1 ty2) co
-  | Just (co1, co2) <- splitAppCo_maybe co	-- c.f. Unify.match on AppTy
+  | Just (co1, co2) <- splitAppCo_maybe co      -- c.f. Unify.match on AppTy
   = do { subst' <- ty_co_match menv subst ty1 co1 
        ; ty_co_match menv subst' ty2 co2 }
 
@@ -1685,9 +1679,9 @@ pushRefl _                          = Nothing
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
             Sequencing on coercions
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -1714,9 +1708,9 @@ seqCos (co:cos) = seqCo co `seq` seqCos cos
 
 
 %************************************************************************
-%*									*
-	     The kind of a type, and of a coercion
-%*									*
+%*                                                                      *
+             The kind of a type, and of a coercion
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
diff --git a/compiler/types/Kind.lhs b/compiler/types/Kind.lhs
index 793aa4a..0714625 100644
--- a/compiler/types/Kind.lhs
+++ b/compiler/types/Kind.lhs
@@ -3,19 +3,13 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module Kind (
         -- * Main data type
         SuperKind, Kind, typeKind,
 
-	-- Kinds
-	anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, constraintKind,
+        -- Kinds
+        anyKind, liftedTypeKind, unliftedTypeKind, openTypeKind, constraintKind,
         mkArrowKind, mkArrowKinds,
 
         -- Kind constructors...
@@ -23,9 +17,9 @@ module Kind (
         unliftedTypeKindTyCon, constraintKindTyCon,
 
         -- Super Kinds
-	superKind, superKindTyCon, 
+        superKind, superKindTyCon, 
         
-	pprKind, pprParendKind,
+        pprKind, pprParendKind,
 
         -- ** Deconstructing Kinds
         kindAppResult, synTyConResKind,
@@ -65,9 +59,9 @@ import Util
 \end{code}
 
 %************************************************************************
-%*									*
-	Functions over Kinds		
-%*									*
+%*                                                                      *
+        Functions over Kinds            
+%*                                                                      *
 %************************************************************************
 
 Note [Kind Constraint and kind *]
@@ -204,7 +198,7 @@ isSubOpenTypeKindKey uniq
   || uniq == constraintKindTyConKey  -- Needed for error (Num a) "blah"
                                      -- and so that (Ord a -> Eq a) is well-kinded
                                      -- and so that (# Eq a, Ord b #) is well-kinded
-                              	     -- See Note [Kind Constraint and kind *]
+                                     -- See Note [Kind Constraint and kind *]
 
 -- | Is this a kind (i.e. a type-of-types)?
 isKind :: Kind -> Bool
@@ -279,11 +273,11 @@ defaultKind_maybe :: Kind -> Maybe Kind
 -- simple (* or *->* etc).  So generic type variables (other than
 -- built-in constants like 'error') always have simple kinds.  This is important;
 -- consider
---	f x = True
+--      f x = True
 -- We want f to get type
---	f :: forall (a::*). a -> Bool
+--      f :: forall (a::*). a -> Bool
 -- Not 
---	f :: forall (a::ArgKind). a -> Bool
+--      f :: forall (a::ArgKind). a -> Bool
 -- because that would allow a call like (f 3#) as well as (f True),
 -- and the calling conventions differ.
 -- This defaulting is done in TcMType.zonkTcTyVarBndr.
diff --git a/compiler/types/OptCoercion.lhs b/compiler/types/OptCoercion.lhs
index ebc2cbe..5598575 100644
--- a/compiler/types/OptCoercion.lhs
+++ b/compiler/types/OptCoercion.lhs
@@ -3,12 +3,6 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module OptCoercion ( optCoercion, checkAxInstCo ) where 
 
@@ -23,7 +17,7 @@ import Var
 import VarSet
 import FamInstEnv   ( flattenTys )
 import VarEnv
-import StaticFlags	( opt_NoOptCoercion )
+import StaticFlags      ( opt_NoOptCoercion )
 import Outputable
 import Pair
 import Maybes
@@ -36,7 +30,7 @@ import InstEnv
 
 %************************************************************************
 %*                                                                      *
-                 Optimising coercions									
+                 Optimising coercions                                                                   
 %*                                                                      *
 %************************************************************************
 
@@ -75,11 +69,11 @@ type NormalCo = Coercion
 type NormalNonIdCo = NormalCo  -- Extra invariant: not the identity
 
 opt_co, opt_co' :: CvSubst
-       		-> Bool	       -- True <=> return (sym co)
+                -> Bool        -- True <=> return (sym co)
                 -> Maybe Role  -- Nothing <=> don't change; otherwise, change
                                -- INVARIANT: the change is always a *downgrade*
-       		-> Coercion
-       		-> NormalCo	
+                -> Coercion
+                -> NormalCo     
 opt_co = opt_co' 
 {-
 opt_co env sym co
@@ -424,7 +418,7 @@ opt_trans_rule is co1 co2
     co2_is_axiom_maybe = isAxiom_maybe co2
     role = coercionRole co1 -- should be the same as coercionRole co2!
 
-opt_trans_rule _ co1 co2	-- Identity rule
+opt_trans_rule _ co1 co2        -- Identity rule
   | Pair ty1 _ <- coercionKind co1
   , Pair _ ty2 <- coercionKind co2
   , ty1 `eqType` ty2
@@ -540,7 +534,7 @@ matchAxiom sym ax@(CoAxiom { co_ax_tc = tc }) ind co
 compatible_co :: Coercion -> Coercion -> Bool
 -- Check whether (co1 . co2) will be well-kinded
 compatible_co co1 co2
-  = x1 `eqType` x2		
+  = x1 `eqType` x2              
   where
     Pair _ x1 = coercionKind co1
     Pair x2 _ = coercionKind co2
diff --git a/compiler/types/TypeRep.lhs b/compiler/types/TypeRep.lhs
index 62c5a11..78ccfc5 100644
--- a/compiler/types/TypeRep.lhs
+++ b/compiler/types/TypeRep.lhs
@@ -15,19 +15,13 @@ Note [The Type-related module hierarchy]
   Coercion imports Type
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 -- We expose the relevant stuff from this module via the Type module
 {-# OPTIONS_HADDOCK hide #-}
 {-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable #-}
 module TypeRep (
-	TyThing(..),
-	Type(..),
+        TyThing(..),
+        Type(..),
         TyLit(..),
         KindOrType, Kind, SuperKind,
         PredType, ThetaType,      -- Synonyms
@@ -37,11 +31,11 @@ module TypeRep (
         isLiftedTypeKind, isSuperKind, isTypeVar, isKindVar,
         
         -- Pretty-printing
-	pprType, pprParendType, pprTypeApp, pprTvBndr, pprTvBndrs,
-	pprTyThing, pprTyThingCategory, pprSigmaType,
-	pprEqPred, pprTheta, pprForAll, pprThetaArrowTy, pprClassPred,
+        pprType, pprParendType, pprTypeApp, pprTvBndr, pprTvBndrs,
+        pprTyThing, pprTyThingCategory, pprSigmaType,
+        pprEqPred, pprTheta, pprForAll, pprThetaArrowTy, pprClassPred,
         pprKind, pprParendKind, pprTyLit, suppressKinds,
-	Prec(..), maybeParen, pprTcApp, 
+        Prec(..), maybeParen, pprTcApp, 
         pprPrefixApp, pprArrowChain, ppr_type,
 
         -- Free variables
@@ -91,9 +85,9 @@ import qualified Data.Data        as Data hiding ( TyCon )
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{The data type}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 
@@ -103,42 +97,42 @@ import qualified Data.Data        as Data hiding ( TyCon )
 -- If you edit this type, you may need to update the GHC formalism
 -- See Note [GHC Formalism] in coreSyn/CoreLint.lhs
 data Type
-  = TyVarTy Var	-- ^ Vanilla type or kind variable (*never* a coercion variable)
+  = TyVarTy Var -- ^ Vanilla type or kind variable (*never* a coercion variable)
 
   | AppTy         -- See Note [AppTy invariant]
-	Type
-	Type		-- ^ Type application to something other than a 'TyCon'. Parameters:
-	                --
+        Type
+        Type            -- ^ Type application to something other than a 'TyCon'. Parameters:
+                        --
                         --  1) Function: must /not/ be a 'TyConApp',
                         --     must be another 'AppTy', or 'TyVarTy'
-	                --
-	                --  2) Argument type
+                        --
+                        --  2) Argument type
 
   | TyConApp      -- See Note [AppTy invariant]
-	TyCon
-	[KindOrType]	-- ^ Application of a 'TyCon', including newtypes /and/ synonyms.
-	                -- Invariant: saturated appliations of 'FunTyCon' must
-	                -- use 'FunTy' and saturated synonyms must use their own
+        TyCon
+        [KindOrType]    -- ^ Application of a 'TyCon', including newtypes /and/ synonyms.
+                        -- Invariant: saturated appliations of 'FunTyCon' must
+                        -- use 'FunTy' and saturated synonyms must use their own
                         -- constructors. However, /unsaturated/ 'FunTyCon's
                         -- do appear as 'TyConApp's.
-	                -- Parameters:
-	                --
-	                -- 1) Type constructor being applied to.
-	                --
+                        -- Parameters:
+                        --
+                        -- 1) Type constructor being applied to.
+                        --
                         -- 2) Type arguments. Might not have enough type arguments
                         --    here to saturate the constructor.
                         --    Even type synonyms are not necessarily saturated;
                         --    for example unsaturated type synonyms
-	                --    can appear as the right hand side of a type synonym.
+                        --    can appear as the right hand side of a type synonym.
 
   | FunTy
-	Type		
-	Type		-- ^ Special case of 'TyConApp': @TyConApp FunTyCon [t1, t2]@
-			-- See Note [Equality-constrained types]
+        Type            
+        Type            -- ^ Special case of 'TyConApp': @TyConApp FunTyCon [t1, t2]@
+                        -- See Note [Equality-constrained types]
 
   | ForAllTy
-	Var         -- Type or kind variable
-	Type	        -- ^ A polymorphic type
+        Var         -- Type or kind variable
+        Type            -- ^ A polymorphic type
 
   | LitTy TyLit     -- ^ Type literals are similar to type constructors.
 
@@ -223,7 +217,7 @@ is encoded like this:
    blah
 
 -------------------------------------
- 		Note [PredTy]
+                Note [PredTy]
 
 \begin{code}
 -- | A type of the form @p@ of kind @Constraint@ represents a value whose type is
@@ -257,17 +251,17 @@ to expand to allow them.)
 
 A Haskell qualified type, such as that for f,g,h above, is
 represented using 
-	* a FunTy for the double arrow
-	* with a type of kind Constraint as the function argument
+        * a FunTy for the double arrow
+        * with a type of kind Constraint as the function argument
 
 The predicate really does turn into a real extra argument to the
 function.  If the argument has type (p :: Constraint) then the predicate p is
 represented by evidence of type p.
 
 %************************************************************************
-%*									*
+%*                                                                      *
             Simple constructors
-%*									*
+%*                                                                      *
 %************************************************************************
 
 These functions are here so that they can be used by TysPrim,
@@ -306,9 +300,9 @@ isKindVar v = isTKVar v && isSuperKind (varType v)
 
 
 %************************************************************************
-%*									*
-			Free variables of types and coercions
-%*									*
+%*                                                                      *
+                        Free variables of types and coercions
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -344,9 +338,9 @@ varSetElemsKvsFirst set
 \end{code}
 
 %************************************************************************
-%*									*
-			TyThing
-%*									*
+%*                                                                      *
+                        TyThing
+%*                                                                      *
 %************************************************************************
 
 Despite the fact that DataCon has to be imported via a hi-boot route, 
@@ -385,9 +379,9 @@ pprTyThingCategory (AnId   _)   = ptext (sLit "Identifier")
 pprTyThingCategory (ADataCon _) = ptext (sLit "Data constructor")
 
 
-instance NamedThing TyThing where	-- Can't put this with the type
-  getName (AnId id)     = getName id	-- decl, because the DataCon instance
-  getName (ATyCon tc)   = getName tc	-- isn't visible there
+instance NamedThing TyThing where       -- Can't put this with the type
+  getName (AnId id)     = getName id    -- decl, because the DataCon instance
+  getName (ATyCon tc)   = getName tc    -- isn't visible there
   getName (ACoAxiom cc) = getName cc
   getName (ADataCon dc) = dataConName dc
 
@@ -395,10 +389,10 @@ instance NamedThing TyThing where	-- Can't put this with the type
 
 
 %************************************************************************
-%*									*
-			Substitutions
+%*                                                                      *
+                        Substitutions
       Data type defined here to avoid unnecessary mutual recursion
-%*									*
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
@@ -415,37 +409,37 @@ instance NamedThing TyThing where	-- Can't put this with the type
 --
 -- 3. The substition is only applied ONCE! This is because
 -- in general such application will not reached a fixed point.
-data TvSubst 		
-  = TvSubst InScopeSet 	-- The in-scope type and kind variables
-	    TvSubstEnv  -- Substitutes both type and kind variables
-	-- See Note [Apply Once]
-	-- and Note [Extending the TvSubstEnv]
+data TvSubst            
+  = TvSubst InScopeSet  -- The in-scope type and kind variables
+            TvSubstEnv  -- Substitutes both type and kind variables
+        -- See Note [Apply Once]
+        -- and Note [Extending the TvSubstEnv]
 
 -- | A substitition of 'Type's for 'TyVar's
 --                 and 'Kind's for 'KindVar's
 type TvSubstEnv = TyVarEnv Type
-	-- A TvSubstEnv is used both inside a TvSubst (with the apply-once
-	-- invariant discussed in Note [Apply Once]), and also independently
-	-- in the middle of matching, and unification (see Types.Unify)
-	-- So you have to look at the context to know if it's idempotent or
-	-- apply-once or whatever
+        -- A TvSubstEnv is used both inside a TvSubst (with the apply-once
+        -- invariant discussed in Note [Apply Once]), and also independently
+        -- in the middle of matching, and unification (see Types.Unify)
+        -- So you have to look at the context to know if it's idempotent or
+        -- apply-once or whatever
 \end{code}
 
 Note [Apply Once]
 ~~~~~~~~~~~~~~~~~
 We use TvSubsts to instantiate things, and we might instantiate
-	forall a b. ty
+        forall a b. ty
 \with the types
-	[a, b], or [b, a].
+        [a, b], or [b, a].
 So the substition might go [a->b, b->a].  A similar situation arises in Core
 when we find a beta redex like
-	(/\ a /\ b -> e) b a
+        (/\ a /\ b -> e) b a
 Then we also end up with a substition that permutes type variables. Other
 variations happen to; for example [a -> (a, b)].  
 
-	***************************************************
-	*** So a TvSubst must be applied precisely once ***
-	***************************************************
+        ***************************************************
+        *** So a TvSubst must be applied precisely once ***
+        ***************************************************
 
 A TvSubst is not idempotent, but, unlike the non-idempotent substitution
 we use during unifications, it must not be repeatedly applied.
@@ -459,15 +453,15 @@ if the TvSubstEnv is empty --- i.e. (isEmptyTvSubt subst) holds ---
 then (substTy subst ty) does nothing.
 
 For example, consider:
-	(/\a. /\b:(a~Int). ...b..) Int
+        (/\a. /\b:(a~Int). ...b..) Int
 We substitute Int for 'a'.  The Unique of 'b' does not change, but
 nevertheless we add 'b' to the TvSubstEnv, because b's kind does change
 
 This invariant has several crucial consequences:
 
 * In substTyVarBndr, we need extend the TvSubstEnv 
-	- if the unique has changed
-	- or if the kind has changed
+        - if the unique has changed
+        - or if the kind has changed
 
 * In substTyVar, we do not need to consult the in-scope set;
   the TvSubstEnv is enough
@@ -478,7 +472,7 @@ This invariant has several crucial consequences:
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                    Pretty-printing types
 
        Defined very early because of debug printing in assertions
@@ -491,15 +485,15 @@ parens around the type, except for the atomic cases.  @pprParendType@
 works just by setting the initial context precedence very high.
 
 \begin{code}
-data Prec = TopPrec 	-- No parens
-	  | FunPrec 	-- Function args; no parens for tycon apps
-	  | TyConPrec 	-- Tycon args; no parens for atomic
-	  deriving( Eq, Ord )
+data Prec = TopPrec     -- No parens
+          | FunPrec     -- Function args; no parens for tycon apps
+          | TyConPrec   -- Tycon args; no parens for atomic
+          deriving( Eq, Ord )
 
 maybeParen :: Prec -> Prec -> SDoc -> SDoc
 maybeParen ctxt_prec inner_prec pretty
   | ctxt_prec < inner_prec = pretty
-  | otherwise		   = parens pretty
+  | otherwise              = parens pretty
 
 ------------------
 pprType, pprParendType :: Type -> SDoc
@@ -531,7 +525,7 @@ pprClassPred clas tys = pprTypeApp (classTyCon clas) tys
 
 ------------
 pprTheta :: ThetaType -> SDoc
--- pprTheta [pred] = pprPred pred	 -- I'm in two minds about this
+-- pprTheta [pred] = pprPred pred        -- I'm in two minds about this
 pprTheta theta  = parens (sep (punctuate comma (map (ppr_type TopPrec) theta)))
 
 pprThetaArrowTy :: ThetaType -> SDoc
@@ -570,10 +564,10 @@ instance Outputable TyLit where
    ppr = pprTyLit
 
 ------------------
-	-- OK, here's the main printer
+        -- OK, here's the main printer
 
 ppr_type :: Prec -> Type -> SDoc
-ppr_type _ (TyVarTy tv)	      = ppr_tvar tv
+ppr_type _ (TyVarTy tv)       = ppr_tvar tv
 
 ppr_type _ (TyConApp tc [LitTy (StrTyLit n),ty])
   | tc `hasKey` ipClassNameKey
@@ -585,7 +579,7 @@ ppr_type p (LitTy l)          = ppr_tylit p l
 ppr_type p ty@(ForAllTy {})   = ppr_forall_type p ty
 
 ppr_type p (AppTy t1 t2) = maybeParen p TyConPrec $
-			   pprType t1 <+> ppr_type TyConPrec t2
+                           pprType t1 <+> ppr_type TyConPrec t2
 
 ppr_type p fun_ty@(FunTy ty1 ty2)
   | isPredTy ty1
@@ -650,9 +644,9 @@ pprTvBndrs tvs = sep (map pprTvBndr tvs)
 pprTvBndr :: TyVar -> SDoc
 pprTvBndr tv 
   | isLiftedTypeKind kind = ppr_tvar tv
-  | otherwise	          = parens (ppr_tvar tv <+> dcolon <+> pprKind kind)
-	     where
-	       kind = tyVarKind tv
+  | otherwise             = parens (ppr_tvar tv <+> dcolon <+> pprKind kind)
+             where
+               kind = tyVarKind tv
 \end{code}
 
 Note [Infix type variables]
@@ -792,9 +786,9 @@ pprArrowChain p (arg:args) = maybeParen p FunPrec $
 \end{code}
 
 %************************************************************************
-%*									*
+%*                                                                      *
 \subsection{TidyType}
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Tidying is here because it has a special case for FlatSkol
@@ -811,7 +805,7 @@ tidyTyVarBndr :: TidyEnv -> TyVar -> (TidyEnv, TyVar)
 tidyTyVarBndr tidy_env@(occ_env, subst) tyvar
   = case tidyOccName occ_env occ1 of
       (tidy', occ') -> ((tidy', subst'), tyvar')
-	where
+        where
           subst' = extendVarEnv subst tyvar tyvar'
           tyvar' = setTyVarKind (setTyVarName tyvar name') kind'
           name'  = tidyNameOcc name occ'
@@ -844,15 +838,15 @@ tidyOpenTyVar :: TidyEnv -> TyVar -> (TidyEnv, TyVar)
 -- also 'tidyTyVarBndr'
 tidyOpenTyVar env@(_, subst) tyvar
   = case lookupVarEnv subst tyvar of
-	Just tyvar' -> (env, tyvar')		-- Already substituted
-	Nothing	    -> tidyTyVarBndr env tyvar	-- Treat it as a binder
+        Just tyvar' -> (env, tyvar')            -- Already substituted
+        Nothing     -> tidyTyVarBndr env tyvar  -- Treat it as a binder
 
 ---------------
 tidyTyVarOcc :: TidyEnv -> TyVar -> TyVar
 tidyTyVarOcc (_, subst) tv
   = case lookupVarEnv subst tv of
-	Nothing  -> tv
-	Just tv' -> tv'
+        Nothing  -> tv
+        Just tv' -> tv'
 
 ---------------
 tidyTypes :: TidyEnv -> [Type] -> [Type]
@@ -861,14 +855,14 @@ tidyTypes env tys = map (tidyType env) tys
 ---------------
 tidyType :: TidyEnv -> Type -> Type
 tidyType _   (LitTy n)            = LitTy n
-tidyType env (TyVarTy tv)	  = TyVarTy (tidyTyVarOcc env tv)
+tidyType env (TyVarTy tv)         = TyVarTy (tidyTyVarOcc env tv)
 tidyType env (TyConApp tycon tys) = let args = tidyTypes env tys
- 		                    in args `seqList` TyConApp tycon args
-tidyType env (AppTy fun arg)	  = (AppTy $! (tidyType env fun)) $! (tidyType env arg)
-tidyType env (FunTy fun arg)	  = (FunTy $! (tidyType env fun)) $! (tidyType env arg)
-tidyType env (ForAllTy tv ty)	  = ForAllTy tvp $! (tidyType envp ty)
-			          where
-			            (envp, tvp) = tidyTyVarBndr env tv
+                                    in args `seqList` TyConApp tycon args
+tidyType env (AppTy fun arg)      = (AppTy $! (tidyType env fun)) $! (tidyType env arg)
+tidyType env (FunTy fun arg)      = (FunTy $! (tidyType env fun)) $! (tidyType env arg)
+tidyType env (ForAllTy tv ty)     = ForAllTy tvp $! (tidyType envp ty)
+                                  where
+                                    (envp, tvp) = tidyTyVarBndr env tv
 
 ---------------
 -- | Grabs the free type variables, tidies them
diff --git a/compiler/types/Unify.lhs b/compiler/types/Unify.lhs
index 8d1beb6..767459c 100644
--- a/compiler/types/Unify.lhs
+++ b/compiler/types/Unify.lhs
@@ -3,23 +3,17 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module Unify ( 
-	-- Matching of types: 
-	--	the "tc" prefix indicates that matching always
-	--	respects newtypes (rather than looking through them)
-	tcMatchTy, tcMatchTys, tcMatchTyX, 
-	ruleMatchTyX, tcMatchPreds, 
+        -- Matching of types: 
+        --      the "tc" prefix indicates that matching always
+        --      respects newtypes (rather than looking through them)
+        tcMatchTy, tcMatchTys, tcMatchTyX, 
+        ruleMatchTyX, tcMatchPreds, 
 
-	MatchEnv(..), matchList, 
+        MatchEnv(..), matchList, 
 
-	typesCantMatch,
+        typesCantMatch,
 
         -- Side-effect free unification
         tcUnifyTys, BindFlag(..),
@@ -46,9 +40,9 @@ import Control.Applicative (Applicative(..))
 
 
 %************************************************************************
-%*									*
-		Matching
-%*									*
+%*                                                                      *
+                Matching
+%*                                                                      *
 %************************************************************************
 
 
@@ -58,7 +52,7 @@ Matching is much tricker than you might think.
    which are given to us explicitly.
 
 2. We want to match in the presence of foralls; 
-	e.g 	(forall a. t1) ~ (forall b. t2)
+        e.g     (forall a. t1) ~ (forall b. t2)
 
    That is what the RnEnv2 is for; it does the alpha-renaming
    that makes it as if a and b were the same variable.
@@ -68,7 +62,7 @@ Matching is much tricker than you might think.
 
 3. We must be careful not to bind a template type variable to a
    locally bound variable.  E.g.
-	(forall a. x) ~ (forall b. b)
+        (forall a. x) ~ (forall b. b)
    where x is the template type variable.  Then we do not want to
    bind x to a/b!  This is a kind of occurs check.
    The necessary locals accumulate in the RnEnv2.
@@ -76,61 +70,61 @@ Matching is much tricker than you might think.
 
 \begin{code}
 data MatchEnv
-  = ME	{ me_tmpls :: VarSet	-- Template variables
- 	, me_env   :: RnEnv2	-- Renaming envt for nested foralls
-	}			--   In-scope set includes template variables
+  = ME  { me_tmpls :: VarSet    -- Template variables
+        , me_env   :: RnEnv2    -- Renaming envt for nested foralls
+        }                       --   In-scope set includes template variables
     -- Nota Bene: MatchEnv isn't specific to Types.  It is used
     --            for matching terms and coercions as well as types
 
-tcMatchTy :: TyVarSet		-- Template tyvars
-	  -> Type		-- Template
-	  -> Type		-- Target
-	  -> Maybe TvSubst	-- One-shot; in principle the template
-				-- variables could be free in the target
+tcMatchTy :: TyVarSet           -- Template tyvars
+          -> Type               -- Template
+          -> Type               -- Target
+          -> Maybe TvSubst      -- One-shot; in principle the template
+                                -- variables could be free in the target
 
 tcMatchTy tmpls ty1 ty2
   = case match menv emptyTvSubstEnv ty1 ty2 of
-	Just subst_env -> Just (TvSubst in_scope subst_env)
-	Nothing	       -> Nothing
+        Just subst_env -> Just (TvSubst in_scope subst_env)
+        Nothing        -> Nothing
   where
     menv     = ME { me_tmpls = tmpls, me_env = mkRnEnv2 in_scope }
     in_scope = mkInScopeSet (tmpls `unionVarSet` tyVarsOfType ty2)
-	-- We're assuming that all the interesting 
-	-- tyvars in tys1 are in tmpls
+        -- We're assuming that all the interesting 
+        -- tyvars in tys1 are in tmpls
 
-tcMatchTys :: TyVarSet		-- Template tyvars
-	   -> [Type]		-- Template
-	   -> [Type]		-- Target
-	   -> Maybe TvSubst	-- One-shot; in principle the template
-				-- variables could be free in the target
+tcMatchTys :: TyVarSet          -- Template tyvars
+           -> [Type]            -- Template
+           -> [Type]            -- Target
+           -> Maybe TvSubst     -- One-shot; in principle the template
+                                -- variables could be free in the target
 
 tcMatchTys tmpls tys1 tys2
   = case match_tys menv emptyTvSubstEnv tys1 tys2 of
-	Just subst_env -> Just (TvSubst in_scope subst_env)
-	Nothing	       -> Nothing
+        Just subst_env -> Just (TvSubst in_scope subst_env)
+        Nothing        -> Nothing
   where
     menv     = ME { me_tmpls = tmpls, me_env = mkRnEnv2 in_scope }
     in_scope = mkInScopeSet (tmpls `unionVarSet` tyVarsOfTypes tys2)
-	-- We're assuming that all the interesting 
-	-- tyvars in tys1 are in tmpls
+        -- We're assuming that all the interesting 
+        -- tyvars in tys1 are in tmpls
 
 -- This is similar, but extends a substitution
-tcMatchTyX :: TyVarSet 		-- Template tyvars
-	   -> TvSubst		-- Substitution to extend
-	   -> Type		-- Template
-	   -> Type		-- Target
-	   -> Maybe TvSubst
+tcMatchTyX :: TyVarSet          -- Template tyvars
+           -> TvSubst           -- Substitution to extend
+           -> Type              -- Template
+           -> Type              -- Target
+           -> Maybe TvSubst
 tcMatchTyX tmpls (TvSubst in_scope subst_env) ty1 ty2
   = case match menv subst_env ty1 ty2 of
-	Just subst_env -> Just (TvSubst in_scope subst_env)
-	Nothing	       -> Nothing
+        Just subst_env -> Just (TvSubst in_scope subst_env)
+        Nothing        -> Nothing
   where
     menv = ME {me_tmpls = tmpls, me_env = mkRnEnv2 in_scope}
 
 tcMatchPreds
-	:: [TyVar]			-- Bind these
-	-> [PredType] -> [PredType]
-   	-> Maybe TvSubstEnv
+        :: [TyVar]                      -- Bind these
+        -> [PredType] -> [PredType]
+        -> Maybe TvSubstEnv
 tcMatchPreds tmpls ps1 ps2
   = matchList (match menv) emptyTvSubstEnv ps1 ps2
   where
@@ -139,46 +133,46 @@ tcMatchPreds tmpls ps1 ps2
 
 -- This one is called from the expression matcher, which already has a MatchEnv in hand
 ruleMatchTyX :: MatchEnv 
-	 -> TvSubstEnv		-- Substitution to extend
-	 -> Type		-- Template
-	 -> Type		-- Target
-	 -> Maybe TvSubstEnv
+         -> TvSubstEnv          -- Substitution to extend
+         -> Type                -- Template
+         -> Type                -- Target
+         -> Maybe TvSubstEnv
 
-ruleMatchTyX menv subst ty1 ty2 = match menv subst ty1 ty2	-- Rename for export
+ruleMatchTyX menv subst ty1 ty2 = match menv subst ty1 ty2      -- Rename for export
 \end{code}
 
 Now the internals of matching
 
 \begin{code}
-match :: MatchEnv	-- For the most part this is pushed downwards
-      -> TvSubstEnv 	-- Substitution so far:
-			--   Domain is subset of template tyvars
-			--   Free vars of range is subset of 
-			--	in-scope set of the RnEnv2
-      -> Type -> Type	-- Template and target respectively
+match :: MatchEnv       -- For the most part this is pushed downwards
+      -> TvSubstEnv     -- Substitution so far:
+                        --   Domain is subset of template tyvars
+                        --   Free vars of range is subset of 
+                        --      in-scope set of the RnEnv2
+      -> Type -> Type   -- Template and target respectively
       -> Maybe TvSubstEnv
 
 match menv subst ty1 ty2 | Just ty1' <- coreView ty1 = match menv subst ty1' ty2
-			 | Just ty2' <- coreView ty2 = match menv subst ty1 ty2'
+                         | Just ty2' <- coreView ty2 = match menv subst ty1 ty2'
 
 match menv subst (TyVarTy tv1) ty2
-  | Just ty1' <- lookupVarEnv subst tv1'	-- tv1' is already bound
+  | Just ty1' <- lookupVarEnv subst tv1'        -- tv1' is already bound
   = if eqTypeX (nukeRnEnvL rn_env) ty1' ty2
-	-- ty1 has no locally-bound variables, hence nukeRnEnvL
+        -- ty1 has no locally-bound variables, hence nukeRnEnvL
     then Just subst
-    else Nothing	-- ty2 doesn't match
+    else Nothing        -- ty2 doesn't match
 
   | tv1' `elemVarSet` me_tmpls menv
   = if any (inRnEnvR rn_env) (varSetElems (tyVarsOfType ty2))
-    then Nothing	-- Occurs check
+    then Nothing        -- Occurs check
     else do { subst1 <- match_kind menv subst (tyVarKind tv1) (typeKind ty2)
-			-- Note [Matching kinds]
-	    ; return (extendVarEnv subst1 tv1' ty2) }
+                        -- Note [Matching kinds]
+            ; return (extendVarEnv subst1 tv1' ty2) }
 
-   | otherwise	-- tv1 is not a template tyvar
+   | otherwise  -- tv1 is not a template tyvar
    = case ty2 of
-	TyVarTy tv2 | tv1' == rnOccR rn_env tv2 -> Just subst
-	_                                       -> Nothing
+        TyVarTy tv2 | tv1' == rnOccR rn_env tv2 -> Just subst
+        _                                       -> Nothing
   where
     rn_env = me_env menv
     tv1' = rnOccL rn_env tv1
@@ -186,7 +180,7 @@ match menv subst (TyVarTy tv1) ty2
 match menv subst (ForAllTy tv1 ty1) (ForAllTy tv2 ty2) 
   = do { subst' <- match_kind menv subst (tyVarKind tv1) (tyVarKind tv2)
        ; match menv' subst' ty1 ty2 }
-  where		-- Use the magic of rnBndr2 to go under the binders
+  where         -- Use the magic of rnBndr2 to go under the binders
     menv' = menv { me_env = rnBndr2 (me_env menv) tv1 tv2 }
 
 match menv subst (TyConApp tc1 tys1) (TyConApp tc2 tys2) 
@@ -196,7 +190,7 @@ match menv subst (FunTy ty1a ty1b) (FunTy ty2a ty2b)
        ; match menv subst' ty1b ty2b }
 match menv subst (AppTy ty1a ty1b) ty2
   | Just (ty2a, ty2b) <- repSplitAppTy_maybe ty2
-	-- 'repSplit' used because the tcView stuff is done above
+        -- 'repSplit' used because the tcView stuff is done above
   = do { subst' <- match menv subst ty1a ty2a
        ; match menv subst' ty1b ty2b }
 
@@ -236,51 +230,51 @@ match_tys menv subst tys1 tys2 = matchList (match menv) subst tys1 tys2
 
 --------------
 matchList :: (env -> a -> b -> Maybe env)
-	   -> env -> [a] -> [b] -> Maybe env
+           -> env -> [a] -> [b] -> Maybe env
 matchList _  subst []     []     = Just subst
 matchList fn subst (a:as) (b:bs) = do { subst' <- fn subst a b
-				      ; matchList fn subst' as bs }
+                                      ; matchList fn subst' as bs }
 matchList _  _     _      _      = Nothing
 \end{code}
 
 
 %************************************************************************
-%*									*
-		GADTs
-%*									*
+%*                                                                      *
+                GADTs
+%*                                                                      *
 %************************************************************************
 
 Note [Pruning dead case alternatives]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Consider	data T a where
-		   T1 :: T Int
-		   T2 :: T a
+Consider        data T a where
+                   T1 :: T Int
+                   T2 :: T a
 
-		newtype X = MkX Int
-		newtype Y = MkY Char
+                newtype X = MkX Int
+                newtype Y = MkY Char
 
-		type family F a
-		type instance F Bool = Int
+                type family F a
+                type instance F Bool = Int
 
-Now consider	case x of { T1 -> e1; T2 -> e2 }
+Now consider    case x of { T1 -> e1; T2 -> e2 }
 
 The question before the house is this: if I know something about the type
 of x, can I prune away the T1 alternative?
 
 Suppose x::T Char.  It's impossible to construct a (T Char) using T1, 
-	Answer = YES we can prune the T1 branch (clearly)
+        Answer = YES we can prune the T1 branch (clearly)
 
 Suppose x::T (F a), where 'a' is in scope.  Then 'a' might be instantiated
 to 'Bool', in which case x::T Int, so
-	ANSWER = NO (clearly)
+        ANSWER = NO (clearly)
 
 Suppose x::T X.  Then *in Haskell* it's impossible to construct a (non-bottom) 
 value of type (T X) using T1.  But *in FC* it's quite possible.  The newtype
 gives a coercion
-	CoX :: X ~ Int
+        CoX :: X ~ Int
 So (T CoX) :: T X ~ T Int; hence (T1 `cast` sym (T CoX)) is a non-bottom value
 of type (T X) constructed with T1.  Hence
-	ANSWER = NO we can't prune the T1 branch (surprisingly)
+        ANSWER = NO we can't prune the T1 branch (surprisingly)
 
 Furthermore, this can even happen; see Trac #1251.  GHC's newtype-deriving
 mechanism uses a cast, just as above, to move from one dictionary to another,
@@ -291,9 +285,9 @@ non-bottom value of type (T Y) using T1.  That's because we can get
 from Y to Char, but not to Int.
 
 
-Here's a related question.  	data Eq a b where EQ :: Eq a a
+Here's a related question.      data Eq a b where EQ :: Eq a a
 Consider
-	case x of { EQ -> ... }
+        case x of { EQ -> ... }
 
 Suppose x::Eq Int Char.  Is the alternative dead?  Clearly yes.
 
@@ -301,7 +295,7 @@ What about x::Eq Int a, in a context where we have evidence that a~Char.
 Then again the alternative is dead.   
 
 
-			Summary
+                        Summary
 
 We are really doing a test for unsatisfiability of the type
 constraints implied by the match. And that is clearly, in general, a
@@ -321,40 +315,40 @@ typesCantMatch prs = any (\(s,t) -> cant_match s t) prs
   where
     cant_match :: Type -> Type -> Bool
     cant_match t1 t2
-	| Just t1' <- coreView t1 = cant_match t1' t2
-	| Just t2' <- coreView t2 = cant_match t1 t2'
+        | Just t1' <- coreView t1 = cant_match t1' t2
+        | Just t2' <- coreView t2 = cant_match t1 t2'
 
     cant_match (FunTy a1 r1) (FunTy a2 r2)
-	= cant_match a1 a2 || cant_match r1 r2
+        = cant_match a1 a2 || cant_match r1 r2
 
     cant_match (TyConApp tc1 tys1) (TyConApp tc2 tys2)
-	| isDistinctTyCon tc1 && isDistinctTyCon tc2
-	= tc1 /= tc2 || typesCantMatch (zipEqual "typesCantMatch" tys1 tys2)
+        | isDistinctTyCon tc1 && isDistinctTyCon tc2
+        = tc1 /= tc2 || typesCantMatch (zipEqual "typesCantMatch" tys1 tys2)
 
     cant_match (FunTy {}) (TyConApp tc _) = isDistinctTyCon tc
     cant_match (TyConApp tc _) (FunTy {}) = isDistinctTyCon tc
-	-- tc can't be FunTyCon by invariant
+        -- tc can't be FunTyCon by invariant
 
     cant_match (AppTy f1 a1) ty2
-	| Just (f2, a2) <- repSplitAppTy_maybe ty2
-	= cant_match f1 f2 || cant_match a1 a2
+        | Just (f2, a2) <- repSplitAppTy_maybe ty2
+        = cant_match f1 f2 || cant_match a1 a2
     cant_match ty1 (AppTy f2 a2)
-	| Just (f1, a1) <- repSplitAppTy_maybe ty1
-	= cant_match f1 f2 || cant_match a1 a2
+        | Just (f1, a1) <- repSplitAppTy_maybe ty1
+        = cant_match f1 f2 || cant_match a1 a2
 
     cant_match (LitTy x) (LitTy y) = x /= y
 
     cant_match _ _ = False      -- Safe!
 
 -- Things we could add;
---	foralls
---	look through newtypes
---	take account of tyvar bindings (EQ example above)
+--      foralls
+--      look through newtypes
+--      take account of tyvar bindings (EQ example above)
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
              Unification
 %*                                                                      *
 %************************************************************************
@@ -418,8 +412,8 @@ in these cases.
 
 \begin{code}
 tcUnifyTys :: (TyVar -> BindFlag)
-	   -> [Type] -> [Type]
-	   -> Maybe TvSubst	-- A regular one-shot (idempotent) substitution
+           -> [Type] -> [Type]
+           -> Maybe TvSubst     -- A regular one-shot (idempotent) substitution
 -- The two types may have common type variables, and indeed do so in the
 -- second call to tcUnifyTys in FunDeps.checkClsFD
 --
@@ -446,15 +440,15 @@ tcUnifyTysFG bind_fn tys1 tys2
   = initUM bind_fn $
     do { subst <- unifyList emptyTvSubstEnv tys1 tys2
 
-	-- Find the fixed point of the resulting non-idempotent substitution
+        -- Find the fixed point of the resulting non-idempotent substitution
         ; return (niFixTvSubst subst) }
 \end{code}
 
 
 %************************************************************************
-%*									*
+%*                                                                      *
                 Non-idempotent substitution
-%*									*
+%*                                                                      *
 %************************************************************************
 
 Note [Non-idempotent substitution]
@@ -485,21 +479,21 @@ niSubstTvSet subst tvs
   = foldVarSet (unionVarSet . get) emptyVarSet tvs
   where
     get tv = case lookupVarEnv subst tv of
-	       Nothing -> unitVarSet tv
+               Nothing -> unitVarSet tv
                Just ty -> niSubstTvSet subst (tyVarsOfType ty)
 \end{code}
 
 %************************************************************************
-%*									*
-		The workhorse
-%*									*
+%*                                                                      *
+                The workhorse
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
-unify :: TvSubstEnv	-- An existing substitution to extend
-      -> Type -> Type 	-- Types to be unified, and witness of their equality
-      -> UM TvSubstEnv		-- Just the extended substitution, 
-				-- Nothing if unification failed
+unify :: TvSubstEnv     -- An existing substitution to extend
+      -> Type -> Type   -- Types to be unified, and witness of their equality
+      -> UM TvSubstEnv          -- Just the extended substitution, 
+                                -- Nothing if unification failed
 -- We do not require the incoming substitution to be idempotent,
 -- nor guarantee that the outgoing one is.  That's fixed up by
 -- the wrappers.
@@ -518,27 +512,27 @@ unify subst (TyConApp tyc1 tys1) (TyConApp tyc2 tys2)
   = unify_tys subst tys1 tys2
 
 unify subst (FunTy ty1a ty1b) (FunTy ty2a ty2b) 
-  = do	{ subst' <- unify subst ty1a ty2a
-	; unify subst' ty1b ty2b }
+  = do  { subst' <- unify subst ty1a ty2a
+        ; unify subst' ty1b ty2b }
 
-	-- Applications need a bit of care!
-	-- They can match FunTy and TyConApp, so use splitAppTy_maybe
-	-- NB: we've already dealt with type variables and Notes,
-	-- so if one type is an App the other one jolly well better be too
+        -- Applications need a bit of care!
+        -- They can match FunTy and TyConApp, so use splitAppTy_maybe
+        -- NB: we've already dealt with type variables and Notes,
+        -- so if one type is an App the other one jolly well better be too
 unify subst (AppTy ty1a ty1b) ty2
   | Just (ty2a, ty2b) <- repSplitAppTy_maybe ty2
-  = do	{ subst' <- unify subst ty1a ty2a
+  = do  { subst' <- unify subst ty1a ty2a
         ; unify subst' ty1b ty2b }
 
 unify subst ty1 (AppTy ty2a ty2b)
   | Just (ty1a, ty1b) <- repSplitAppTy_maybe ty1
-  = do	{ subst' <- unify subst ty1a ty2a
+  = do  { subst' <- unify subst ty1a ty2a
         ; unify subst' ty1b ty2b }
 
 unify subst (LitTy x) (LitTy y) | x == y = return subst
 
 unify _ _ _ = surelyApart
-	-- ForAlls??
+        -- ForAlls??
 
 ------------------------------
 unify_tys :: TvSubstEnv -> [Type] -> [Type] -> UM TvSubstEnv
@@ -550,11 +544,11 @@ unifyList subst orig_xs orig_ys
   where
     go subst []     []     = return subst
     go subst (x:xs) (y:ys) = do { subst' <- unify subst x y
-				; go subst' xs ys }
+                                ; go subst' xs ys }
     go _ _ _ = surelyApart
 
 ---------------------------------
-uVar :: TvSubstEnv	-- An existing substitution to extend
+uVar :: TvSubstEnv      -- An existing substitution to extend
      -> TyVar           -- Type variable to be unified
      -> Type            -- with this type
      -> UM TvSubstEnv
@@ -564,7 +558,7 @@ uVar subst tv1 ty
    case (lookupVarEnv subst tv1) of
      Just ty' -> unify subst ty' ty     -- Yes, call back into unify'
      Nothing  -> uUnrefined subst       -- No, continue
-			    tv1 ty ty
+                            tv1 ty ty
 
 uUnrefined :: TvSubstEnv          -- An existing substitution to extend
            -> TyVar               -- Type variable to be unified
@@ -576,13 +570,13 @@ uUnrefined :: TvSubstEnv          -- An existing substitution to extend
 
 uUnrefined subst tv1 ty2 ty2'
   | Just ty2'' <- tcView ty2'
-  = uUnrefined subst tv1 ty2 ty2''	-- Unwrap synonyms
-		-- This is essential, in case we have
-		--	type Foo a = a
-		-- and then unify a ~ Foo a
+  = uUnrefined subst tv1 ty2 ty2''      -- Unwrap synonyms
+                -- This is essential, in case we have
+                --      type Foo a = a
+                -- and then unify a ~ Foo a
 
 uUnrefined subst tv1 ty2 (TyVarTy tv2)
-  | tv1 == tv2		-- Same type variable
+  | tv1 == tv2          -- Same type variable
   = return subst
 
     -- Check to see whether tv2 is refined
@@ -596,8 +590,8 @@ uUnrefined subst tv1 ty2 (TyVarTy tv2)
 
            -- And then bind one or the other, 
            -- depending on which is bindable
-	   -- NB: unlike TcUnify we do not have an elaborate sub-kinding 
-	   --     story.  That is relevant only during type inference, and
+           -- NB: unlike TcUnify we do not have an elaborate sub-kinding 
+           --     story.  That is relevant only during type inference, and
            --     (I very much hope) is not relevant here.
        ; b1 <- tvBindFlag tv1
        ; b2 <- tvBindFlag tv2
@@ -607,50 +601,50 @@ uUnrefined subst tv1 ty2 (TyVarTy tv2)
            (BindMe, _)      -> return (extendVarEnv subst' tv1 ty2)
            (_, BindMe)      -> return (extendVarEnv subst' tv2 ty1) }
 
-uUnrefined subst tv1 ty2 ty2'	-- ty2 is not a type variable
+uUnrefined subst tv1 ty2 ty2'   -- ty2 is not a type variable
   | tv1 `elemVarSet` niSubstTvSet subst (tyVarsOfType ty2')
   = maybeApart subst                    -- Occurs check
                                         -- See Note [Fine-grained unification]
   | otherwise
   = do { subst' <- unify subst k1 k2
-       ; bindTv subst' tv1 ty2 }	-- Bind tyvar to the synonym if poss
+       ; bindTv subst' tv1 ty2 }        -- Bind tyvar to the synonym if poss
   where
     k1 = tyVarKind tv1
     k2 = typeKind ty2'
 
 bindTv :: TvSubstEnv -> TyVar -> Type -> UM TvSubstEnv
-bindTv subst tv ty	-- ty is not a type variable
+bindTv subst tv ty      -- ty is not a type variable
   = do  { b <- tvBindFlag tv
-	; case b of
-	    Skolem -> maybeApart subst -- See Note [Unification with skolems]
-	    BindMe -> return $ extendVarEnv subst tv ty
-	}
+        ; case b of
+            Skolem -> maybeApart subst -- See Note [Unification with skolems]
+            BindMe -> return $ extendVarEnv subst tv ty
+        }
 \end{code}
 
 %************************************************************************
-%*									*
-		Binding decisions
-%*									*
+%*                                                                      *
+                Binding decisions
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 data BindFlag 
-  = BindMe	-- A regular type variable
+  = BindMe      -- A regular type variable
 
-  | Skolem	-- This type variable is a skolem constant
-		-- Don't bind it; it only matches itself
+  | Skolem      -- This type variable is a skolem constant
+                -- Don't bind it; it only matches itself
 \end{code}
 
 
 %************************************************************************
-%*									*
-		Unification monad
-%*									*
+%*                                                                      *
+                Unification monad
+%*                                                                      *
 %************************************************************************
 
 \begin{code}
 newtype UM a = UM { unUM :: (TyVar -> BindFlag)
-		         -> UnifyResultM a }
+                         -> UnifyResultM a }
 
 instance Functor UM where
       fmap = liftM
@@ -663,7 +657,7 @@ instance Monad UM where
   return a = UM (\_tvs -> Unifiable a)
   fail _   = UM (\_tvs -> SurelyApart) -- failed pattern match
   m >>= k  = UM (\tvs -> case unUM m tvs of
-			   Unifiable v -> unUM (k v) tvs
+                           Unifiable v -> unUM (k v) tvs
                            MaybeApart v ->
                              case unUM (k v) tvs of
                                Unifiable v' -> MaybeApart v'
diff --git a/compiler/utils/BufWrite.hs b/compiler/utils/BufWrite.hs
index f85ea8e..f97d828 100644
--- a/compiler/utils/BufWrite.hs
+++ b/compiler/utils/BufWrite.hs
@@ -10,22 +10,16 @@
 --
 -----------------------------------------------------------------------------
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module BufWrite (
-	BufHandle(..),
-	newBufHandle,
-	bPutChar,
-	bPutStr,
-	bPutFS,
-	bPutFZS,
-	bPutLitString,
-	bFlush,
+        BufHandle(..),
+        newBufHandle,
+        bPutChar,
+        bPutStr,
+        bPutFS,
+        bPutFZS,
+        bPutLitString,
+        bFlush,
   ) where
 
 #include "HsVersions.h"
@@ -34,10 +28,10 @@ import FastString
 import FastTypes
 import FastMutInt
 
-import Control.Monad	( when )
+import Control.Monad    ( when )
 import Data.ByteString (ByteString)
 import qualified Data.ByteString.Unsafe as BS
-import Data.Char	( ord )
+import Data.Char        ( ord )
 import Foreign
 import Foreign.C.String
 import System.IO
@@ -45,8 +39,8 @@ import System.IO
 -- -----------------------------------------------------------------------------
 
 data BufHandle = BufHandle {-#UNPACK#-}!(Ptr Word8)
-			   {-#UNPACK#-}!FastMutInt
-			   Handle
+                           {-#UNPACK#-}!FastMutInt
+                           Handle
 
 newBufHandle :: Handle -> IO BufHandle
 newBufHandle hdl = do
@@ -66,11 +60,11 @@ STRICT2(bPutChar)
 bPutChar b@(BufHandle buf r hdl) c = do
   i <- readFastMutInt r
   if (i >= buf_size)
-	then do hPutBuf hdl buf buf_size
-		writeFastMutInt r 0
-		bPutChar b c
-	else do pokeElemOff buf i (fromIntegral (ord c) :: Word8)
-		writeFastMutInt r (i+1)
+        then do hPutBuf hdl buf buf_size
+                writeFastMutInt r 0
+                bPutChar b c
+        else do pokeElemOff buf i (fromIntegral (ord c) :: Word8)
+                writeFastMutInt r (i+1)
 
 bPutStr :: BufHandle -> String -> IO ()
 STRICT2(bPutStr)
@@ -78,14 +72,14 @@ bPutStr (BufHandle buf r hdl) str = do
   i <- readFastMutInt r
   loop str i
   where loop _ i | i `seq` False = undefined
-	loop "" i = do writeFastMutInt r i; return ()
-	loop (c:cs) i
-	   | i >= buf_size = do
-		hPutBuf hdl buf buf_size
-		loop (c:cs) 0
-	   | otherwise = do
-		pokeElemOff buf i (fromIntegral (ord c))
-		loop cs (i+1)
+        loop "" i = do writeFastMutInt r i; return ()
+        loop (c:cs) i
+           | i >= buf_size = do
+                hPutBuf hdl buf buf_size
+                loop (c:cs) 0
+           | otherwise = do
+                pokeElemOff buf i (fromIntegral (ord c))
+                loop cs (i+1)
   
 bPutFS :: BufHandle -> FastString -> IO ()
 bPutFS b fs = bPutBS b $ fastStringToByteString fs
@@ -114,14 +108,14 @@ bPutLitString b@(BufHandle buf r hdl) a len_ = a `seq` do
   let len = iBox len_
   i <- readFastMutInt r
   if (i+len) >= buf_size
-	then do hPutBuf hdl buf i
-		writeFastMutInt r 0
-		if (len >= buf_size) 
-		    then hPutBuf hdl a len
-		    else bPutLitString b a len_
-	else do
-		copyBytes (buf `plusPtr` i) a len
-		writeFastMutInt r (i+len)
+        then do hPutBuf hdl buf i
+                writeFastMutInt r 0
+                if (len >= buf_size) 
+                    then hPutBuf hdl a len
+                    else bPutLitString b a len_
+        else do
+                copyBytes (buf `plusPtr` i) a len
+                writeFastMutInt r (i+len)
 
 bFlush :: BufHandle -> IO ()
 bFlush (BufHandle buf r hdl) = do
diff --git a/compiler/utils/Digraph.lhs b/compiler/utils/Digraph.lhs
index cc68430..a834f1b 100644
--- a/compiler/utils/Digraph.lhs
+++ b/compiler/utils/Digraph.lhs
@@ -3,12 +3,6 @@
 %
 
 \begin{code}
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 {-# LANGUAGE ScopedTypeVariables #-}
 module Digraph(
@@ -78,10 +72,10 @@ Note [Nodes, keys, vertices]
  * A 'node' is a big blob of client-stuff
 
  * Each 'node' has a unique (client) 'key', but the latter 
-	is in Ord and has fast comparison
+        is in Ord and has fast comparison
 
  * Digraph then maps each 'key' to a Vertex (Int) which is
-  	arranged densely in 0.n
+        arranged densely in 0.n
 
 \begin{code}
 data Graph node = Graph { 
@@ -92,12 +86,12 @@ data Graph node = Graph {
 
 data Edge node = Edge node node
 
-type Node key payload = (payload, key, [key])	
+type Node key payload = (payload, key, [key])   
      -- The payload is user data, just carried around in this module
      -- The keys are ordered
      -- The [key] are the dependencies of the node; 
      --    it's ok to have extra keys in the dependencies that
-     --	   are not the key of any Node in the graph
+     --    are not the key of any Node in the graph
 
 emptyGraph :: Graph a
 emptyGraph = Graph (array (1, 0) []) (error "emptyGraph") (const Nothing)
@@ -168,18 +162,18 @@ reduceNodesIntoVertices nodes key_extractor = (bounds, (!) vertex_map, key_verte
 
 \begin{code}
 type WorkItem key payload
-  = (Node key payload,	-- Tip of the path
-     [payload])	  	-- Rest of the path; 
-     			--  [a,b,c] means c depends on b, b depends on a
+  = (Node key payload,  -- Tip of the path
+     [payload])         -- Rest of the path; 
+                        --  [a,b,c] means c depends on b, b depends on a
 
 -- | Find a reasonably short cycle a->b->c->a, in a strongly
 -- connected component.  The input nodes are presumed to be
 -- a SCC, so you can start anywhere.
 findCycle :: forall payload key. Ord key 
           => [Node key payload]     -- The nodes.  The dependencies can
-	     	     	  	    -- contain extra keys, which are ignored
-	  -> Maybe [payload]        -- A cycle, starting with node
-	     			    -- so each depends on the next
+                                    -- contain extra keys, which are ignored
+          -> Maybe [payload]        -- A cycle, starting with node
+                                    -- so each depends on the next
 findCycle graph
   = go Set.empty (new_work root_deps []) []
   where
@@ -195,14 +189,14 @@ findCycle graph
 
 
     -- 'go' implements Dijkstra's algorithm, more or less
-    go :: Set.Set key	-- Visited
-       -> [WorkItem key payload]	-- Work list, items length n
-       -> [WorkItem key payload]	-- Work list, items length n+1
-       -> Maybe [payload]		-- Returned cycle
+    go :: Set.Set key   -- Visited
+       -> [WorkItem key payload]        -- Work list, items length n
+       -> [WorkItem key payload]        -- Work list, items length n+1
+       -> Maybe [payload]               -- Returned cycle
        -- Invariant: in a call (go visited ps qs),
        --            visited = union (map tail (ps ++ qs))
 
-    go _       [] [] = Nothing	-- No cycles
+    go _       [] [] = Nothing  -- No cycles
     go visited [] qs = go visited qs []
     go visited (((payload,key,deps), path) : ps) qs 
        | key == root_key           = Just (root_payload : reverse path)
@@ -211,7 +205,7 @@ findCycle graph
        | otherwise                 = go (Set.insert key visited)
                                         ps (new_qs ++ qs)
        where
-	 new_qs = new_work deps (payload : path)
+         new_qs = new_work deps (payload : path)
 
     new_work :: [key] -> [payload] -> [WorkItem key payload]
     new_work deps path = [ (n, path) | Just n <- map (`Map.lookup` env) deps ]
diff --git a/compiler/utils/GraphBase.hs b/compiler/utils/GraphBase.hs
index 8cb3ace..de506e3 100644
--- a/compiler/utils/GraphBase.hs
+++ b/compiler/utils/GraphBase.hs
@@ -1,22 +1,16 @@
 
 -- | Types for the general graph colorer.
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module GraphBase (
-	Triv,
-	Graph (..),
-	initGraph,
-	graphMapModify,
+        Triv,
+        Graph (..),
+        initGraph,
+        graphMapModify,
 
-	Node  (..),	newNode,
+        Node  (..),     newNode,
 )
-	
+        
 
 where
 
@@ -25,92 +19,92 @@ import UniqFM
 
 
 -- | A fn to check if a node is trivially colorable
---	For graphs who's color classes are disjoint then a node is 'trivially colorable'
---	when it has less neighbors and exclusions than available colors for that node.
+--      For graphs who's color classes are disjoint then a node is 'trivially colorable'
+--      when it has less neighbors and exclusions than available colors for that node.
 --
---	For graph's who's color classes overlap, ie some colors alias other colors, then
---	this can be a bit more tricky. There is a general way to calculate this, but 
---	it's likely be too slow for use in the code. The coloring algorithm takes
---	a canned function which can be optimised by the user to be specific to the 
---	specific graph being colored.
+--      For graph's who's color classes overlap, ie some colors alias other colors, then
+--      this can be a bit more tricky. There is a general way to calculate this, but 
+--      it's likely be too slow for use in the code. The coloring algorithm takes
+--      a canned function which can be optimised by the user to be specific to the 
+--      specific graph being colored.
 --
---	for details, see  "A Generalised Algorithm for Graph-Coloring Register Allocation"
---				Smith, Ramsey, Holloway - PLDI 2004.
+--      for details, see  "A Generalised Algorithm for Graph-Coloring Register Allocation"
+--                              Smith, Ramsey, Holloway - PLDI 2004.
 --
 type Triv k cls color
-	=  cls 			-- the class of the node we're trying to color.
-	-> UniqSet k		-- the node's neighbors.
-	-> UniqSet color 	-- the node's exclusions.
-	-> Bool		
+        =  cls                  -- the class of the node we're trying to color.
+        -> UniqSet k            -- the node's neighbors.
+        -> UniqSet color        -- the node's exclusions.
+        -> Bool         
 
 
 -- | The Interference graph.
---	There used to be more fields, but they were turfed out in a previous revision.
---	maybe we'll want more later..
+--      There used to be more fields, but they were turfed out in a previous revision.
+--      maybe we'll want more later..
 --
 data Graph k cls color
-	= Graph { 
-	-- | All active nodes in the graph.
-	  graphMap		:: UniqFM (Node k cls color)  }
+        = Graph { 
+        -- | All active nodes in the graph.
+          graphMap              :: UniqFM (Node k cls color)  }
 
 
--- | An empty graph.	
+-- | An empty graph.    
 initGraph :: Graph k cls color
 initGraph
-	= Graph
-	{ graphMap		= emptyUFM }
+        = Graph
+        { graphMap              = emptyUFM }
 
 
 -- | Modify the finite map holding the nodes in the graph.
 graphMapModify 
-	:: (UniqFM (Node k cls color) -> UniqFM (Node k cls color))
-	-> Graph k cls color -> Graph k cls color
+        :: (UniqFM (Node k cls color) -> UniqFM (Node k cls color))
+        -> Graph k cls color -> Graph k cls color
 
 graphMapModify f graph
-	= graph { graphMap	= f (graphMap graph) }
-	
-		
+        = graph { graphMap      = f (graphMap graph) }
+        
+                
 
 -- | Graph nodes.
---	Represents a thing that can conflict with another thing.
---	For the register allocater the nodes represent registers.
+--      Represents a thing that can conflict with another thing.
+--      For the register allocater the nodes represent registers.
 --
 data Node k cls color
-	= Node { 	
-	-- | A unique identifier for this node.
-	  nodeId 		:: k
+        = Node {        
+        -- | A unique identifier for this node.
+          nodeId                :: k
 
-	-- | The class of this node,
-	--	determines the set of colors that can be used.
-	, nodeClass		:: cls
+        -- | The class of this node,
+        --      determines the set of colors that can be used.
+        , nodeClass             :: cls
 
-	-- | The color of this node, if any.
-	, nodeColor		:: Maybe color
+        -- | The color of this node, if any.
+        , nodeColor             :: Maybe color
 
-	-- | Neighbors which must be colored differently to this node.
-	, nodeConflicts		:: UniqSet k
+        -- | Neighbors which must be colored differently to this node.
+        , nodeConflicts         :: UniqSet k
 
-	-- | Colors that cannot be used by this node.
-	, nodeExclusions	:: UniqSet color
+        -- | Colors that cannot be used by this node.
+        , nodeExclusions        :: UniqSet color
 
-	-- | Colors that this node would prefer to be, in decending order.
-	, nodePreference	:: [color]  
+        -- | Colors that this node would prefer to be, in decending order.
+        , nodePreference        :: [color]  
 
-	-- | Neighbors that this node would like to be colored the same as.
-	, nodeCoalesce		:: UniqSet k }
+        -- | Neighbors that this node would like to be colored the same as.
+        , nodeCoalesce          :: UniqSet k }
 
 
 -- | An empty node.
 newNode :: k -> cls -> Node k cls color
 newNode k cls
-	= Node
-	{ nodeId		= k
-	, nodeClass		= cls
-	, nodeColor		= Nothing
-	, nodeConflicts		= emptyUniqSet
-	, nodeExclusions	= emptyUniqSet
-	, nodePreference	= [] 
-	, nodeCoalesce		= emptyUniqSet }
+        = Node
+        { nodeId                = k
+        , nodeClass             = cls
+        , nodeColor             = Nothing
+        , nodeConflicts         = emptyUniqSet
+        , nodeExclusions        = emptyUniqSet
+        , nodePreference        = [] 
+        , nodeCoalesce          = emptyUniqSet }
 
 
 
diff --git a/compiler/utils/GraphPpr.hs b/compiler/utils/GraphPpr.hs
index a896bbb..1ffbd39 100644
--- a/compiler/utils/GraphPpr.hs
+++ b/compiler/utils/GraphPpr.hs
@@ -1,16 +1,10 @@
 
 -- | Pretty printing of graphs.
 
-{-# 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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
 
 module GraphPpr (
-	dumpGraph,
-	dotGraph
+        dumpGraph,
+        dotGraph
 )
 where
 
@@ -27,150 +21,150 @@ import Data.Maybe
 
 -- | Pretty print a graph in a somewhat human readable format.
 dumpGraph 
-	:: (Outputable k, Outputable cls, Outputable color)
-	=> Graph k cls color -> SDoc
+        :: (Outputable k, Outputable cls, Outputable color)
+        => Graph k cls color -> SDoc
 
 dumpGraph graph
-	=  text "Graph"
-	$$ (vcat $ map dumpNode $ eltsUFM $ graphMap graph)
-	
+        =  text "Graph"
+        $$ (vcat $ map dumpNode $ eltsUFM $ graphMap graph)
+        
 dumpNode 
-	:: (Outputable k, Outputable cls, Outputable color)
-	=> Node k cls color -> SDoc
+        :: (Outputable k, Outputable cls, Outputable color)
+        => Node k cls color -> SDoc
 
 dumpNode node
- 	=  text "Node " <> ppr (nodeId node)
-	$$ text "conflicts " 
-		<> parens (int (sizeUniqSet $ nodeConflicts node)) 
-		<> text " = "
-		<> ppr (nodeConflicts node) 
+        =  text "Node " <> ppr (nodeId node)
+        $$ text "conflicts " 
+                <> parens (int (sizeUniqSet $ nodeConflicts node)) 
+                <> text " = "
+                <> ppr (nodeConflicts node) 
 
-	$$ text "exclusions "
-		<> parens (int (sizeUniqSet $ nodeExclusions node))
-		<> text " = " 
-		<> ppr (nodeExclusions node)
+        $$ text "exclusions "
+                <> parens (int (sizeUniqSet $ nodeExclusions node))
+                <> text " = " 
+                <> ppr (nodeExclusions node)
 
-	$$ text "coalesce "
-		<> parens (int (sizeUniqSet $ nodeCoalesce node))
-		<> text " = "
-		<> ppr (nodeCoalesce node)
-		
-	$$ space
+        $$ text "coalesce "
+                <> parens (int (sizeUniqSet $ nodeCoalesce node))
+                <> text " = "
+                <> ppr (nodeCoalesce node)
+                
+        $$ space
 
 
 
 -- | Pretty print a graph in graphviz .dot format.
---	Conflicts get solid edges.
---	Coalescences get dashed edges.
+--      Conflicts get solid edges.
+--      Coalescences get dashed edges.
 dotGraph 
-	:: ( Uniquable k
-	   , Outputable k, Outputable cls, Outputable color)
-	=> (color -> SDoc)  -- ^ What graphviz color to use for each node color
-			    --	It's usually safe to return X11 style colors here,
-			    --	ie "red", "green" etc or a hex triplet #aaff55 etc
-	-> Triv k cls color
-	-> Graph k cls color -> SDoc
+        :: ( Uniquable k
+           , Outputable k, Outputable cls, Outputable color)
+        => (color -> SDoc)  -- ^ What graphviz color to use for each node color
+                            --  It's usually safe to return X11 style colors here,
+                            --  ie "red", "green" etc or a hex triplet #aaff55 etc
+        -> Triv k cls color
+        -> Graph k cls color -> SDoc
 
 dotGraph colorMap triv graph
- = let	nodes	= eltsUFM $ graphMap graph
-   in	vcat 
-		(  [ text "graph G {" ]
-		++ map (dotNode colorMap triv) nodes
-		++ (catMaybes $ snd $ mapAccumL dotNodeEdges emptyUniqSet nodes)
-		++ [ text "}"
-		   , space ])
-	
+ = let  nodes   = eltsUFM $ graphMap graph
+   in   vcat 
+                (  [ text "graph G {" ]
+                ++ map (dotNode colorMap triv) nodes
+                ++ (catMaybes $ snd $ mapAccumL dotNodeEdges emptyUniqSet nodes)
+                ++ [ text "}"
+                   , space ])
+        
 
 dotNode :: ( Uniquable k
-	   , Outputable k, Outputable cls, Outputable color)
-	=> (color -> SDoc)
-	-> Triv k cls color
-	-> Node k cls color -> SDoc
-	
+           , Outputable k, Outputable cls, Outputable color)
+        => (color -> SDoc)
+        -> Triv k cls color
+        -> Node k cls color -> SDoc
+        
 dotNode colorMap triv node
- = let	name	= ppr $ nodeId node
-	cls	= ppr $ nodeClass node
-
-	excludes
-		= hcat $ punctuate space 
-		$ map (\n -> text "-" <> ppr n)
-		$ uniqSetToList $ nodeExclusions node
-		
-	preferences
-		= hcat $ punctuate space
-		$ map (\n -> text "+" <> ppr n)
-		$ nodePreference node
-	
-	expref	= if and [isEmptyUniqSet (nodeExclusions node), null (nodePreference node)]
-			then empty
-			else text "\\n" <> (excludes <+> preferences)
-
-	-- if the node has been colored then show that,
-	--	otherwise indicate whether it looks trivially colorable.
-	color
-		| Just c	<- nodeColor node 
-		= text "\\n(" <> ppr c <> text ")"
-
-		| triv (nodeClass node) (nodeConflicts node) (nodeExclusions node)
-		= text "\\n(" <> text "triv" <> text ")"
-
-		| otherwise
-		= text "\\n(" <> text "spill?" <> text ")"
-
-	label	=  name <> text " :: " <> cls
-		<> expref
-		<> color
-
-	pcolorC	= case nodeColor node of
-			Nothing	-> text "style=filled fillcolor=white"
-			Just c	-> text "style=filled fillcolor=" <> doubleQuotes (colorMap c)
-		
-
-	pout	= text "node [label=" <> doubleQuotes label <> space <> pcolorC <> text "]" 
-		<> space <> doubleQuotes name 
-		<> text ";"
-
- in	pout
+ = let  name    = ppr $ nodeId node
+        cls     = ppr $ nodeClass node
+
+        excludes
+                = hcat $ punctuate space 
+                $ map (\n -> text "-" <> ppr n)
+                $ uniqSetToList $ nodeExclusions node
+                
+        preferences
+                = hcat $ punctuate space
+                $ map (\n -> text "+" <> ppr n)
+                $ nodePreference node
+        
+        expref  = if and [isEmptyUniqSet (nodeExclusions node), null (nodePreference node)]
+                        then empty
+                        else text "\\n" <> (excludes <+> preferences)
+
+        -- if the node has been colored then show that,
+        --      otherwise indicate whether it looks trivially colorable.
+        color
+                | Just c        <- nodeColor node 
+                = text "\\n(" <> ppr c <> text ")"
+
+                | triv (nodeClass node) (nodeConflicts node) (nodeExclusions node)
+                = text "\\n(" <> text "triv" <> text ")"
+
+                | otherwise
+                = text "\\n(" <> text "spill?" <> text ")"
+
+        label   =  name <> text " :: " <> cls
+                <> expref
+                <> color
+
+        pcolorC = case nodeColor node of
+                        Nothing -> text "style=filled fillcolor=white"
+                        Just c  -> text "style=filled fillcolor=" <> doubleQuotes (colorMap c)
+                
+
+        pout    = text "node [label=" <> doubleQuotes label <> space <> pcolorC <> text "]" 
+                <> space <> doubleQuotes name 
+                <> text ";"
+
+ in     pout
 
 
 -- | Nodes in the graph are doubly linked, but we only want one edge for each
---	conflict if the graphviz graph. Traverse over the graph, but make sure
---	to only print the edges for each node once.
+--      conflict if the graphviz graph. Traverse over the graph, but make sure
+--      to only print the edges for each node once.
 
 dotNodeEdges 
-	:: ( Uniquable k
-	   , Outputable k, Outputable cls, Outputable color)
-	=> UniqSet k
-	-> Node k cls color
-	-> (UniqSet k, Maybe SDoc)
+        :: ( Uniquable k
+           , Outputable k, Outputable cls, Outputable color)
+        => UniqSet k
+        -> Node k cls color
+        -> (UniqSet k, Maybe SDoc)
 
 dotNodeEdges visited node
-	| elementOfUniqSet (nodeId node) visited
-	= ( visited
-	  , Nothing)
-	
-	| otherwise
-	= let	dconflicts
-			= map (dotEdgeConflict (nodeId node)) 
-			$ uniqSetToList
-			$ minusUniqSet (nodeConflicts node) visited
-				
-		dcoalesces
-			= map (dotEdgeCoalesce (nodeId node))
-			$ uniqSetToList
-			$ minusUniqSet (nodeCoalesce node) visited
-	
-		out	=  vcat dconflicts
-			$$ vcat dcoalesces
-
-	  in	( addOneToUniqSet visited (nodeId node)
-		, Just out)
-
-	where	dotEdgeConflict u1 u2
-			= doubleQuotes (ppr u1) <> text " -- " <> doubleQuotes (ppr u2) 
-			<> text ";"
-
-		dotEdgeCoalesce u1 u2
-			= doubleQuotes (ppr u1) <> text " -- " <> doubleQuotes (ppr u2) 
-			<> space <> text "[ style = dashed ];"
+        | elementOfUniqSet (nodeId node) visited
+        = ( visited
+          , Nothing)
+        
+        | otherwise
+        = let   dconflicts
+                        = map (dotEdgeConflict (nodeId node)) 
+                        $ uniqSetToList
+                        $ minusUniqSet (nodeConflicts node) visited
+                                
+                dcoalesces
+                        = map (dotEdgeCoalesce (nodeId node))
+                        $ uniqSetToList
+                        $ minusUniqSet (nodeCoalesce node) visited
+        
+                out     =  vcat dconflicts
+                        $$ vcat dcoalesces
+
+          in    ( addOneToUniqSet visited (nodeId node)
+                , Just out)
+
+        where   dotEdgeConflict u1 u2
+                        = doubleQuotes (ppr u1) <> text " -- " <> doubleQuotes (ppr u2) 
+                        <> text ";"
+
+                dotEdgeCoalesce u1 u2
+                        = doubleQuotes (ppr u1) <> text " -- " <> doubleQuotes (ppr u2) 
+                        <> space <> text "[ style = dashed ];"
 
diff --git a/utils/genprimopcode/Main.hs b/utils/genprimopcode/Main.hs
index 8b97ca1..35e4367 100644
--- a/utils/genprimopcode/Main.hs
+++ b/utils/genprimopcode/Main.hs
@@ -246,7 +246,7 @@ gen_hs_source (Info defaults entries) =
         ++ "-----------------------------------------------------------------------------\n"
         ++ "{-# LANGUAGE MultiParamTypeClasses #-}\n"
         ++ "module GHC.Prim (\n"
-        ++ unlines (map (("\t" ++) . hdr) entries')
+        ++ unlines (map (("        " ++) . hdr) entries')
         ++ ") where\n"
     ++ "\n"
     ++ "{-\n"
@@ -750,7 +750,7 @@ gen_primop_vector_tys_exports (Info _ entries)
 
     mkVecTypes :: Entry -> String
     mkVecTypes i =
-        "\t" ++ ty_id ++ ", " ++ tycon_id ++ ","
+        "        " ++ ty_id ++ ", " ++ tycon_id ++ ","
       where
         ty_id    = prefix i ++ "PrimTy"
         tycon_id = prefix i ++ "PrimTyCon"
-- 
1.8.1.2

