@@ -174,7 +174,7 @@ module Data.Text.Lazy
174174 ) where
175175
176176import Prelude (Char, Bool(..), Maybe(..), String,
177− Eq(..), Ord(..), Ordering, Read(..), Show(..),
177+ Eq(..), Ord(..), Ordering(..), Read(..), Show(..),
178178 (&&), (+), (-), (.), ($), (++),
179179 div, error, flip, fromIntegral, not, otherwise)
180180import qualified Prelude as P
@@ -335,7 +335,7 @@ uncons :: Text -> Maybe (Char, Text)
335335uncons Empty = Nothing
336336uncons (Chunk t ts) =
337337 Just (T.unsafeHead t,
338− if T.length t == 1 then ts else Chunk (T.unsafeTail t) ts)
338+ if T.compareLength t 1 == EQ then ts else Chunk (T.unsafeTail t) ts)
339339{-# INLINE uncons #-}
340340
341341-- | /O(1)/ Returns the first character of a 'Text', which must be