X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fparser%2FCtype.lhs;h=b9f44d679633c34963a495b097db631762299c1a;hb=08652e67c4d5d9a40687f93c286021a867c1bca0;hp=dbe4e9f1b07f27d6358bb4fe171f02b338f2de8a;hpb=0065d5ab628975892cea1ec7303f968c3338cbe1;p=ghc-hetmet.git diff --git a/compiler/parser/Ctype.lhs b/compiler/parser/Ctype.lhs index dbe4e9f..b9f44d6 100644 --- a/compiler/parser/Ctype.lhs +++ b/compiler/parser/Ctype.lhs @@ -1,6 +1,13 @@ Character classification \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module Ctype ( is_ident -- Char# -> Bool , is_symbol -- Char# -> Bool @@ -17,9 +24,9 @@ module Ctype #include "HsVersions.h" -import DATA_INT ( Int32 ) -import DATA_BITS ( Bits((.&.)) ) -import Char ( ord, chr ) +import Data.Int ( Int32 ) +import Data.Bits ( Bits((.&.)) ) +import Data.Char ( ord, chr ) \end{code} Bit masks @@ -91,11 +98,11 @@ charType c = case c of '\6' -> 0 -- \006 '\7' -> 0 -- \007 '\8' -> 0 -- \010 - '\9' -> cAny + cSpace -- \t - '\10' -> cSpace -- \n (not allowed in strings, so !cAny) - '\11' -> cAny + cSpace -- \v - '\12' -> cAny + cSpace -- \f - '\13' -> cAny + cSpace -- ^M + '\9' -> cSpace -- \t (not allowed in strings, so !cAny) + '\10' -> cSpace -- \n (ditto) + '\11' -> cSpace -- \v (ditto) + '\12' -> cSpace -- \f (ditto) + '\13' -> cSpace -- ^M (ditto) '\14' -> 0 -- \016 '\15' -> 0 -- \017 '\16' -> 0 -- \020