Commits

Bryan O'Sullivan committed 30e01c2

Remove another unnecessary test

Comments (0)

Files changed (2)

Data/Text/Encoding/Utf16.hs

 {-# INLINE chr2 #-}
 
 validate1    :: Word16 -> Bool
-validate1 x1 = (x1 < 0xD800) || x1 > 0xDFFF
+validate1 x1 = x1 < 0xD800 || x1 > 0xDFFF
 {-# INLINE validate1 #-}
 
 validate2       ::  Word16 -> Word16 -> Bool

Data/Text/Encoding/Utf32.hs

 import Data.Word (Word32)
 
 validate    :: Word32 -> Bool
-validate x1 = (x1 >= 0x0 && x1 < 0xD800) || (x1 > 0xDFFF && x1 <= 0x10FFFF)
+validate x1 = x1 < 0xD800 || (x1 > 0xDFFF && x1 <= 0x10FFFF)
 {-# INLINE validate #-}