packages feed

ghc-lib 9.0.1.20210205 → 9.0.1.20210207

raw patch · 2 files changed

+38/−5 lines, 2 filesdep ~basedep ~ghc-lib-parserdep ~ghc-primPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc-lib-parser, ghc-prim

API changes (from Hackage documentation)

Files

ghc-lib.cabal view
@@ -1,7 +1,7 @@ cabal-version: >=1.22 build-type: Simple name: ghc-lib-version: 9.0.1.20210205+version: 9.0.1.20210207 license: BSD3 license-file: LICENSE category: Development@@ -67,8 +67,8 @@     else         build-depends: Win32     build-depends:-        ghc-prim > 0.2 && < 0.7,-        base >= 4.12 && < 4.15,+        ghc-prim > 0.2 && < 0.8,+        base >= 4.12 && < 4.16,         containers >= 0.5 && < 0.7,         bytestring >= 0.9 && < 0.11,         binary == 0.8.*,@@ -82,7 +82,7 @@         process >= 1 && < 1.7,         hpc == 0.6.*,         exceptions == 0.10.*,-        ghc-lib-parser == 9.0.1.20210205+        ghc-lib-parser == 9.0.1.20210207     build-tools: alex >= 3.1, happy >= 1.19.4     other-extensions:         BangPatterns
libraries/ghci/GHCi/CreateBCO.hs view
@@ -5,6 +5,7 @@ {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE CPP #-}  -- --  (c) The University of Glasgow 2002-2006@@ -45,7 +46,12 @@                 , "mixed endianness setup is not supported!"                 ]) createBCO arr bco-   = do BCO bco# <- linkBCO' arr bco+   = +#if __GLASGOW_HASKELL__ >= 900+     do linked_bco <- linkBCO' arr bco+#else+     do BCO bco# <- linkBCO' arr bco+#endif         -- Note [Updatable CAF BCOs]         -- ~~~~~~~~~~~~~~~~~~~~~~~~~         -- Why do we need mkApUpd0 here?  Otherwise top-level@@ -62,8 +68,14 @@         --         -- See #17424.         if (resolvedBCOArity bco > 0)+           +#if __GLASGOW_HASKELL__ >= 900+           then return (HValue (unsafeCoerce linked_bco))+           else case mkApUpd0# linked_bco of { (# final_bco #) ->+#else            then return (HValue (unsafeCoerce# bco#))            else case mkApUpd0# bco# of { (# final_bco #) ->+#endif                   return (HValue final_bco) }  @@ -106,8 +118,14 @@     fill (ResolvedBCOStaticPtr r) i = do       writePtrsArrayPtr i (fromRemotePtr r)  marr     fill (ResolvedBCOPtrBCO bco) i = do+      +#if __GLASGOW_HASKELL__ >= 900+      bco <- linkBCO' arr bco+      writePtrsArrayBCO i bco marr+#else       BCO bco# <- linkBCO' arr bco       writePtrsArrayBCO i bco# marr+#endif     fill (ResolvedBCOPtrBreakArray r) i = do       BA mba <- localRef r       writePtrsArrayMBA i mba marr@@ -134,19 +152,34 @@ writeArrayAddr# :: MutableArray# s a -> Int# -> Addr# -> State# s -> State# s writeArrayAddr# marr i addr s = unsafeCoerce# writeArray# marr i addr s ++#if __GLASGOW_HASKELL__ >= 900+writePtrsArrayBCO :: Int -> BCO -> PtrsArr -> IO ()+#else writePtrsArrayBCO :: Int -> BCO# -> PtrsArr -> IO ()+#endif writePtrsArrayBCO (I# i) bco (PtrsArr arr) = IO $ \s ->   case (unsafeCoerce# writeArray#) arr i bco s of s' -> (# s', () #) ++#if __GLASGOW_HASKELL__ >= 900+writePtrsArrayMBA :: Int -> MutableByteArray# s -> PtrsArr -> IO ()+#else data BCO = BCO BCO# writePtrsArrayMBA :: Int -> MutableByteArray# s -> PtrsArr -> IO ()+#endif writePtrsArrayMBA (I# i) mba (PtrsArr arr) = IO $ \s ->   case (unsafeCoerce# writeArray#) arr i mba s of s' -> (# s', () #)  newBCO :: ByteArray# -> ByteArray# -> Array# a -> Int# -> ByteArray# -> IO BCO newBCO instrs lits ptrs arity bitmap = IO $ \s ->+  +#if __GLASGOW_HASKELL__ >= 900+  newBCO# instrs lits ptrs arity bitmap s+#else   case newBCO# instrs lits ptrs arity bitmap s of     (# s1, bco #) -> (# s1, BCO bco #)+#endif  {- Note [BCO empty array]    ~~~~~~~~~~~~~~~~~~~~~~