Commits

Bryan O'Sullivan committed 1551dd9

First of many CAFs to be NOINLINEd :-(

Comments (0)

Files changed (1)

Data/Text/Fusion/Common.hs

       loop_head !s = case next s of
                       Yield x _ -> x
                       Skip s'   -> loop_head s'
-                      Done      -> streamError "head" "Empty stream"
+                      Done      -> head_empty
 {-# INLINE [0] head #-}
 
+head_empty :: a
+head_empty = streamError "head" "Empty stream"
+{-# NOINLINE head_empty #-}
+
 -- | /O(1)/ Returns the first character and remainder of a 'Stream
 -- Char', or 'Nothing' if empty.  Subject to array fusion.
 uncons :: Stream Char -> Maybe (Char, Stream Char)