Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Giant list of missing/changed functions #24

Closed
64 of 82 tasks
RyanGlScott opened this issue Apr 24, 2015 · 4 comments
Closed
64 of 82 tasks

Giant list of missing/changed functions #24

RyanGlScott opened this issue Apr 24, 2015 · 4 comments

Comments

@RyanGlScott
Copy link
Member

RyanGlScott commented Apr 24, 2015

After scanning through the GHC and base changelogs, I made a list of functions that were introduced or changed in later versions of base that would be good candidates for base-compat. I intentionally skipped the GHC.-prefixed modules for now, since they tend to be rather volatile.

base-4.3.0.0: (Edit: these are no longer needed due to dropping support for base-4.2.0.0 and earlier)

  • mfilter added to Control.Monad
  • partitionEithers (in Data.Either) was made lazier
  • swap added to Data.Tuple
  • castCUCharToChar, castCharToCUChar, castCSCharToChar, and castCharToCSChar added to Foreign.C.String
  • unsafeLocalState added to Foreign.Marshal
  • hGetBufSome added to System.IO

base-4.4.0.0:

  • gcd 0 0 now returns 0
  • forkIOWithUnmask, forkOn, and forkOnWithUnmask, added to Control.Concurrent
  • allowInterrupt added to Control.Exception
  • Control.Monad.ST.Unsafe and Control.Monad.ST.Lazy.Unsafe modules added
  • inits, tails, intersperse, and intersectBy (in Data.List) are lazier
  • Foreign.ForeignPtr.Unsafe and Foreign.Marshal.Unsafe modules added
  • Data.String reexports String, lines, unlines, and unwords
  • maybeNew (in Foreign.Marshal.Utils) had its type generalized from (a -> IO (Ptr a)) -> Maybe a -> IO (Ptr a) to (a -> IO (Ptr b)) -> Maybe a -> IO (Ptr b). (Make sure to check this with typediff.)
  • catchIOError and tryIOError added to System.IO.Error
  • unsafeDupablePerformIO added to System.IO.Unsafe
  • peekFilePath, puts, and c_safe_open added to System.Posix.Internals
    • On non-Windows platforms, peekFilePathLen added to System.Posix.Internals

base-4.5.0.0:

  • fixIO (in System.IO) is now thread-safe
  • unsafeFixIO added to System.IO.Unsafe

base-4.5.1.0:

  • writeChan (in Control.Concurrent.Chan) fixed to avoid potential race condition
  • hGetBufSome (in System.IO) fixed to avoid blocking on Windows

base-4.6.0.0:

  • forkFinally added to Control.Concurrent
  • mkWeakMVar, modifyMVarMasked, and modifyMVarMasked_ added to Control.Concurrent.MVar
  • bitDefault, testBitDefault, and popCountDefault added to Data.Bits
  • modifyIORef' and atomicModifyIORef' added to Data.IORef
  • modifySTRef' added to Data.STRef
  • getExecutablePath added to System.Environment (requires peekFilePath, so this will need System.Posix.Internals.Compat to work)

base-4.7.0.0:

  • byteSwap16, byteSwap32, and byteSwap64 added to Data.Word. Their implementations require functions in ghc-prim not available to earlier versions of GHC, but it should be possible to define equivalent implementations without using ghc-prim.
  • eNOTSUP added to Foreign.C.Error (Edit: This is isn't possible to backport without involving a configure script, which isn't desirable.)
  • showFFloatAlt and showGFloatAlt added to Numeric

base-4.7.0.2:

  • inits (in Data.List) had a performance bug fixed
  • trace (in Debug.Trace) fixed to handle null bytes properly

base-4.8.0.0:

  • toIntegralSized added to Data.Bits (due to its use of bitSizeMaybe in its implementation, however, this can only be backported back to base-4.7.0.0)
  • nub and nubBy's implementations (in Data.List) were changed such that the arguments to == and eq, respectively, are swapped
  • fillBytes added to Foreign.Marshal.Utils

base-4.9.0.0

  • Data.Ratio.{denominator,numerator} have no Integral constraint anymore
  • Generalize Debug.Trace.{traceM, traceShowM} from Monad to Applicative
  • Generalise forever from Monad to Applicative
  • Generalise filterM, mapAndUnzipM, zipWithM, zipWithM_, replicateM, and replicateM_ from Monad to Applicative
  • Data.Functor.Const module added
  • errorWithoutStackTrace function added to Prelude (it's just the old behavior of error, I believe)
  • forkOSWithUnmask function added to Control.Concurrent

base-4.10.0.0

  • fromLeft and fromRight added to Data.Either
  • gcoerceWith added to Data.Type.Coercion
  • plusForeignPtr added to Foreign.ForeignPtr
  • asProxyTypeOf's type has been generalized in Data.Proxy
  • minimumBy/maximumBy are now implemented with foldl instead of foldr

base-4.11.0.0

  • Semigroup((<>)) added to the Prelude
  • (<&>) added to Data.Functor
  • iterate' added to Data.List
  • showHFloat to Numeric
  • Type.Reflection.withTypeable is now polymorphic in the RuntimeRep of its result

base-4.12.0.0

  • Data.Functor.Contravariant is now in base
  • $! and throw are levity polymorphic

base-4.13.0.0

  • MonadFail(..) added to the Prelude and Control.Monad (and Monad.fail removed)

base-4.14.0.0

  • isResourceVanishedError, resourceVanishedErrorType, and isResourceVanishedErrorType added to System.IO.Error

base-4.15.0.0

  • hGetContents', getContents', and readFile' added to System.IO
  • singleton added to Data.List and Data.List.NonEmpty

base-4.16.0.0

base-4.17.0.0

base-4.18.0.0

base-4.19.0.0

base-4.20.0.0

base-4.21.0.0 (moved to #97)

RyanGlScott added a commit that referenced this issue Jan 14, 2016
See the `CHANGES` file (or the `base-4.9.0.0` section of #24) for all of the changes made.
@bergmark
Copy link

bergmark commented Mar 1, 2017

What are your thoughts about the GHC modules? I'm missing for GHC.Stack.prettySrcLoc for example.

@RyanGlScott
Copy link
Member Author

I would happily accept patches that added functionality from the GHC.* namespace. I haven't set out to do it myself since:

  1. The GHC.* namespace is quite enormous.
  2. The API tends to be quite volatile, so I imagine lots of CPP would be required to support it.
  3. I personally don't have a need for it.

@sol
Copy link
Member

sol commented Mar 2, 2017

@bergmark if you want to deal with call stack in a backward compatible way, you may want to look at https://github.com/sol/call-stack.

RyanGlScott added a commit that referenced this issue Apr 27, 2019
checks off the `base-4.13.0.0` box in #24.
RyanGlScott added a commit that referenced this issue Apr 28, 2019
checks off the `base-4.13.0.0` box in #24.
RyanGlScott added a commit that referenced this issue May 11, 2019
checks off the `base-4.13.0.0` box in #24.
RyanGlScott added a commit that referenced this issue May 14, 2019
checks off the `base-4.13.0.0` box in #24.
RyanGlScott added a commit that referenced this issue May 21, 2019
checks off the `base-4.13.0.0` box in #24.
RyanGlScott added a commit that referenced this issue May 22, 2019
checks off the `base-4.13.0.0` box in #24.
RyanGlScott added a commit that referenced this issue Jan 25, 2020
Checks off the `base-4.14.0.0` box in #24.
RyanGlScott added a commit that referenced this issue Jan 25, 2020
Checks off the `base-4.14.0.0` box in #24.
RyanGlScott added a commit that referenced this issue Jan 27, 2020
Checks off the `base-4.14.0.0` box in #24.
RyanGlScott added a commit that referenced this issue Sep 30, 2020
Checks off the `base-4.15.0.0` boxes in #24.
RyanGlScott added a commit that referenced this issue Sep 30, 2020
Checks off the `base-4.15.0.0` boxes in #24.
RyanGlScott added a commit that referenced this issue Aug 23, 2021
Checks off the `base-4.16.0.0` boxes in #24.
RyanGlScott added a commit that referenced this issue Aug 24, 2021
Checks off the `base-4.16.0.0` boxes in #24.
RyanGlScott added a commit that referenced this issue May 9, 2022
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Aug 22, 2023
RyanGlScott added a commit that referenced this issue Aug 22, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Aug 22, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Aug 22, 2023
RyanGlScott added a commit that referenced this issue Aug 22, 2023
RyanGlScott added a commit that referenced this issue Aug 22, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Aug 22, 2023
RyanGlScott added a commit that referenced this issue Aug 22, 2023
RyanGlScott added a commit that referenced this issue Oct 10, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Oct 10, 2023
RyanGlScott added a commit that referenced this issue Oct 10, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Oct 10, 2023
RyanGlScott added a commit that referenced this issue Oct 10, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Oct 10, 2023
RyanGlScott added a commit that referenced this issue Oct 10, 2023
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Oct 10, 2023
RyanGlScott added a commit that referenced this issue Apr 23, 2024
Also bump the major version number to 0.14.0, per the version policy in the
`base-compat` `README`.

Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Apr 23, 2024
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Apr 23, 2024
RyanGlScott added a commit that referenced this issue Apr 23, 2024
RyanGlScott added a commit that referenced this issue Apr 30, 2024
Also bump the major version number to 0.14.0, per the version policy in the
`base-compat` `README`.

Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Apr 30, 2024
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Apr 30, 2024
RyanGlScott added a commit that referenced this issue Apr 30, 2024
Also bump the major version number to 0.14.0, per the version policy in the
`base-compat` `README`.

Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Apr 30, 2024
Addresses one check box in #24.
RyanGlScott added a commit that referenced this issue Apr 30, 2024
@RyanGlScott
Copy link
Member Author

Now that base-compat has dropped support for pre-8.0 versions of GHC (see #96), the only unresolved items on this issue involve pre-8.0 GHCs and the as-of-yet-unreleased GHC 9.12. Going forward, I think it would be better to open individual issues for specific GHC versions. I'll opt to close this and track the GHC 9.12–related tasks separately in #97.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants