where (h,t) = spanBy (/= '\n') ps
-- | /O(n)/ Portably breaks a 'Text' up into a list of 'Text's at line
-- return immediately followed by a line feed, or a carriage return.
-- This accounts for both Unix and Windows line ending conventions,
-- and for the old convention used on Mac OS 9 and earlier.
| otherwise = h : case uncons t of