[commit: ghc] master: parser: detabify/dewhitespace Ctype (d2464b5)

git at git.haskell.org git at git.haskell.org
Sun Jul 20 21:56:45 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d2464b56a2d3ae56617e2d82391f4e180e1e1180/ghc

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

commit d2464b56a2d3ae56617e2d82391f4e180e1e1180
Author: Austin Seipp <austin at well-typed.com>
Date:   Fri Jul 18 22:08:56 2014 -0500

    parser: detabify/dewhitespace Ctype
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


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

d2464b56a2d3ae56617e2d82391f4e180e1e1180
 compiler/parser/Ctype.lhs | 47 ++++++++++++++++++++---------------------------
 1 file changed, 20 insertions(+), 27 deletions(-)

diff --git a/compiler/parser/Ctype.lhs b/compiler/parser/Ctype.lhs
index c024ebe..7233f50 100644
--- a/compiler/parser/Ctype.lhs
+++ b/compiler/parser/Ctype.lhs
@@ -2,32 +2,25 @@ Character classification
 
 \begin{code}
 {-# LANGUAGE CPP #-}
-{-# OPTIONS_GHC -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, is_bindigit
-	, 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, is_bindigit
+        , 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}
 
@@ -76,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'
@@ -112,7 +105,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)



More information about the ghc-commits mailing list