on master help sign in
Drop the uncons fusion rules

They *kill* performance :-( --HG-- extra : convert_revision : 28c9e56289c013be187a536b6fec378f897e4e4c

commit0c99e116afdaa2c6d7b7bb898be856fe965da998 authorBryan O'Sullivan <bos@serpentine.com> dateFri 8 Oct 2010, 19:05 (16 years ago) parentc4904a6
1 file changed−7
Data/Text.hs−7
Data/Text.hs−7
@@ -380,13 +380,6 @@ uncons t@(Text arr off len)
380380second :: (b -> c) -> (a,b) -> (a,c)
381381second f (a, b) = (a, f b)
382382
383−{-# RULES
384−"TEXT uncons -> fused" [~1] forall t.
385− uncons t = fmap (second unstream) (S.uncons (stream t))
386−"TEXT uncons -> unfused" [1] forall t.
387− fmap (second unstream) (S.uncons (stream t)) = uncons t
388− #-}
389−
390383-- | /O(1)/ Returns the last character of a 'Text', which must be
391384-- non-empty. Subject to fusion.
392385last :: Text -> Char