[commit: ghc] master: Whitespace only in nativeGen/NCGMonad.hs (d7ca7af)

Ian Lynagh <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

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

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

commit d7ca7af27f32bf51f46783538fd2fb542636b7a4
Author: Ian Lynagh <[email protected]>
Date:   Thu Nov 1 01:29:00 2012 +0000

    Whitespace only in nativeGen/NCGMonad.hs

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

 compiler/nativeGen/NCGMonad.hs |  105 +++++++++++++++++++---------------------
 1 files changed, 49 insertions(+), 56 deletions(-)

diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs
index eb59d2b..619bf9a 100644
--- a/compiler/nativeGen/NCGMonad.hs
+++ b/compiler/nativeGen/NCGMonad.hs
@@ -6,30 +6,23 @@
 --
 -- -----------------------------------------------------------------------------
 
-{-# OPTIONS -fno-warn-tabs #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and
--- detab the module (please do the detabbing in a separate patch). See
---     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
 module NCGMonad (
-	NatM_State(..), mkNatM_State,
-
-	NatM, -- instance Monad
-	initNat, 
-	addImportNat, 
-	getUniqueNat,
-	mapAccumLNat, 
-	setDeltaNat, 
-	getDeltaNat,
-	getBlockIdNat, 
-	getNewLabelNat, 
-	getNewRegNat, 
-	getNewRegPairNat,
-	getPicBaseMaybeNat, 
-	getPicBaseNat, 
-	getDynFlags
+        NatM_State(..), mkNatM_State,
+
+        NatM, -- instance Monad
+        initNat,
+        addImportNat,
+        getUniqueNat,
+        mapAccumLNat,
+        setDeltaNat,
+        getDeltaNat,
+        getBlockIdNat,
+        getNewLabelNat,
+        getNewRegNat,
+        getNewRegPairNat,
+        getPicBaseMaybeNat,
+        getPicBaseNat,
+        getDynFlags
 ) 
  
 where
@@ -41,19 +34,19 @@ import Size
 import TargetReg
 
 import BlockId
-import CLabel		( CLabel, mkAsmTempLabel )
+import CLabel           ( CLabel, mkAsmTempLabel )
 import UniqSupply
-import Unique		( Unique )
+import Unique           ( Unique )
 import DynFlags
 
 data NatM_State 
-	= NatM_State {
-		natm_us      :: UniqSupply,
-		natm_delta   :: Int,
-		natm_imports :: [(CLabel)],
-		natm_pic     :: Maybe Reg,
-		natm_dflags  :: DynFlags
-	}
+        = NatM_State {
+                natm_us      :: UniqSupply,
+                natm_delta   :: Int,
+                natm_imports :: [(CLabel)],
+                natm_pic     :: Maybe Reg,
+                natm_dflags  :: DynFlags
+        }
 
 newtype NatM result = NatM (NatM_State -> (result, NatM_State))
 
@@ -62,11 +55,11 @@ unNat (NatM a) = a
 
 mkNatM_State :: UniqSupply -> Int -> DynFlags -> NatM_State
 mkNatM_State us delta dflags 
-	= NatM_State us delta [] Nothing dflags
+        = NatM_State us delta [] Nothing dflags
 
 initNat :: NatM_State -> NatM a -> (a, NatM_State)
 initNat init_st m 
-	= case unNat m init_st of { (r,st) -> (r,st) }
+        = case unNat m init_st of { (r,st) -> (r,st) }
 
 
 instance Monad NatM where
@@ -76,17 +69,17 @@ instance Monad NatM where
 
 thenNat :: NatM a -> (a -> NatM b) -> NatM b
 thenNat expr cont
-	= NatM $ \st -> case unNat expr st of
-			(result, st') -> unNat (cont result) st'
+        = NatM $ \st -> case unNat expr st of
+                        (result, st') -> unNat (cont result) st'
 
 returnNat :: a -> NatM a
 returnNat result 
-	= NatM $ \st ->  (result, st)
+        = NatM $ \st ->  (result, st)
 
 mapAccumLNat :: (acc -> x -> NatM (acc, y))
                 -> acc
-	        -> [x]
-	        -> NatM (acc, [y])
+                -> [x]
+                -> NatM (acc, [y])
 
 mapAccumLNat _ b []
   = return (b, [])
@@ -107,31 +100,31 @@ instance HasDynFlags NatM where
 
 getDeltaNat :: NatM Int
 getDeltaNat 
-	= NatM $ \ st -> (natm_delta st, st)
+        = NatM $ \ st -> (natm_delta st, st)
 
 
 setDeltaNat :: Int -> NatM ()
 setDeltaNat delta 
-	= NatM $ \ (NatM_State us _ imports pic dflags) ->
-		   ((), NatM_State us delta imports pic dflags)
+        = NatM $ \ (NatM_State us _ imports pic dflags) ->
+                   ((), NatM_State us delta imports pic dflags)
 
 
 addImportNat :: CLabel -> NatM ()
 addImportNat imp 
-	= NatM $ \ (NatM_State us delta imports pic dflags) ->
-		   ((), NatM_State us delta (imp:imports) pic dflags)
+        = NatM $ \ (NatM_State us delta imports pic dflags) ->
+                   ((), NatM_State us delta (imp:imports) pic dflags)
 
 
 getBlockIdNat :: NatM BlockId
 getBlockIdNat 
- = do	u <- getUniqueNat
- 	return (mkBlockId u)
+ = do   u <- getUniqueNat
+        return (mkBlockId u)
 
 
 getNewLabelNat :: NatM CLabel
 getNewLabelNat 
- = do 	u <- getUniqueNat
- 	return (mkAsmTempLabel u)
+ = do   u <- getUniqueNat
+        return (mkAsmTempLabel u)
 
 
 getNewRegNat :: Size -> NatM Reg
@@ -153,15 +146,15 @@ getNewRegPairNat rep
 
 getPicBaseMaybeNat :: NatM (Maybe Reg)
 getPicBaseMaybeNat 
-	= NatM (\state -> (natm_pic state, state))
+        = NatM (\state -> (natm_pic state, state))
 
 
 getPicBaseNat :: Size -> NatM Reg
 getPicBaseNat rep 
- = do	mbPicBase <- getPicBaseMaybeNat
-	case mbPicBase of
-	        Just picBase -> return picBase
-	        Nothing 
-		 -> do
-			reg <- getNewRegNat rep
-			NatM (\state -> (reg, state { natm_pic = Just reg }))
+ = do   mbPicBase <- getPicBaseMaybeNat
+        case mbPicBase of
+                Just picBase -> return picBase
+                Nothing
+                 -> do
+                        reg <- getNewRegNat rep
+                        NatM (\state -> (reg, state { natm_pic = Just reg }))
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.