wiki:MinorLibraryChanges

Version 9 (modified by ross@…, 8 years ago) (diff)

--

This should be a list of minor (mostly) backwards compatable changes to the standard libraries. Proposed new libraries should go on NewLibraryCandidates

  • signatures of when and unless generalized
  • move 'join' and 'ap' into the Monad class
  • remove exports of functions from libraries that are also exported by the prelude (to make overriding prelude functions easier)
  • lookup,elemIndex,find,findIndex to be generalized to return result in monad instead of forced to be a maybe
  • remove catch from the Prelude
  • behavior of array on repeated indices (H98: bottom, GHC: last value)
  • read of octal and hex Int constants (email message)

new simple functions

replicateM, replicateM_, repeatM, repeatM_

-- | the generalization of readIO. readIO can be deprecated if wished if this is included.
readM :: (Read a, Monad m) => String -> m a
readM = ...