Bryan O'Sullivan avatar Bryan O'Sullivan committed c3ad48e

Unexport lines' for now

Comments (0)

Files changed (2)

 
     -- ** Breaking into lines and words
     , lines
-    , lines'
+    --, lines'
     , words
     , unlines
     , unwords
 -- 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.
+{-
 lines' :: Text -> [Text]
 lines' ps | null ps   = []
           | otherwise = h : case uncons t of
                                   | c == '\r' -> case uncons t' of
                                                    Just ('\n',t'') -> lines t''
                                                    _               -> lines t'
-    where (h,t) = span notEOL ps
+    where (h,t)    = span notEOL ps
           notEOL c = c /= '\n' && c /= '\r'
 {-# INLINE lines' #-}
+-}
 
 -- | /O(n)/ Joins lines, after appending a terminating newline to
 -- each.

tests/Properties.hs

 
 prop_split_i c       = id `eq` (T.intercalate (T.singleton c) . T.split c)
 
-{-
 prop_splitWith p     = splitWith p `eqP` (map unpack . T.splitWith p)
 
 splitWith _ "" =  []
                        (unpack2 . T.breakSubstring (T.singleton c))
 
 prop_lines           = L.lines       `eqP` (map unpack . T.lines)
+{-
 prop_lines'          = lines'        `eqP` (map unpack . T.lines')
     where lines' "" =  []
           lines' s =  let (l, s') = break eol s
                                 ('\r':'\n':s'') -> lines' s''
                                 (_:s'') -> lines' s''
           eol c = c == '\r' || c == '\n'
+-}
 prop_words           = L.words       `eqP` (map unpack . T.words)
 prop_unlines         = L.unlines     `eq`  (unpack . T.unlines . map pack)
 prop_unwords         = L.unwords     `eq`  (unpack . T.unwords . map pack)
   ("prop_breakSubstring_isInfixOf", mytest prop_breakSubstring_isInfixOf),
 
   ("prop_lines", mytest prop_lines),
-  ("prop_lines'", mytest prop_lines'),
+--("prop_lines'", mytest prop_lines'),
   ("prop_words", mytest prop_words),
   ("prop_unlines", mytest prop_unlines),
   ("prop_unwords", mytest prop_unwords),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.