Changes between Version 11 and Version 12 of Proposals/text

Show
Ignore:
Timestamp:
11/16/10 19:19:11 (4 years ago)
Author:
duncan (IP: 86.26.56.252)
Comment:

Document proposed API change in the contentious type/name matching issue

Legend:

Unmodified
Added
Removed
Modified
  • Proposals/text

    v11 v12  
    175175 
    176176 * One proposal on how to [http://www.haskell.org/pipermail/libraries/2010-October/014659.html fix the names], and the [http://www.haskell.org/pipermail/libraries/2010-October/014674.html author's response] 
     177 * A call for further discussion on the [http://www.haskell.org/pipermail/libraries/2010-November/014901.html name/type matching issue]. 
     178 
     179The package maintainer proposes an updated API. The substring functions are now named: 
     180{{{ 
     181breakOn    :: Text -> Text -> (Text, Text) 
     182breakOnEnd :: Text -> Text -> (Text, Text) 
     183 
     184breakOnAll :: Text -> Text -> [(Text, Text)] 
     185splitOn    :: Text -> Text -> [Text] 
     186}}} 
     187The character predicate functions now match the List names: 
     188{{{ 
     189break     :: (Char -> Bool) -> Text -> (Text, Text) 
     190span      :: (Char -> Bool) -> Text -> (Text, Text) 
     191partition :: (Char -> Bool) -> Text -> (Text, Text) 
     192find      :: (Char -> Bool) -> Text -> Maybe Char 
     193split     :: (Char -> Bool) -> Text -> [Text] 
     194}}} 
     195The `count` function remains unchanged, but there is the suggestion that the `bytestring` version of `count` could be generalised instead 
     196{{{ 
     197count :: Text -> Text -> Int 
     198}}} 
    177199 
    178200''History'': updated [http://www.haskell.org/pipermail/libraries/2010-October/014532.html Oct 4, by johan] and Nov 6 by dons