packages feed

ghci 8.6.5 → 8.8.1

raw patch · 17 files changed

+72/−15 lines, 17 filesdep ~basedep ~ghc-bootdep ~ghc-boot-thsetup-changedPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, ghc-boot, ghc-boot-th, ghc-heap, template-haskell

API changes (from Hackage documentation)

+ GHCi.Message: [GetClosure] :: HValueRef -> Message (GenClosure HValueRef)
+ GHCi.Message: [Seq] :: HValueRef -> Message (EvalResult ())
+ GHCi.Message: instance Data.Binary.Class.Binary (GHC.Ptr.FunPtr a)
+ GHCi.Message: instance Data.Binary.Class.Binary (GHC.Ptr.Ptr a)
+ GHCi.Message: instance Data.Binary.Class.Binary GHC.Exts.Heap.ClosureTypes.ClosureType
+ GHCi.Message: instance Data.Binary.Class.Binary GHC.Exts.Heap.Closures.PrimType
+ GHCi.Message: instance Data.Binary.Class.Binary GHC.Exts.Heap.InfoTable.Types.StgInfoTable
+ GHCi.Message: instance Data.Binary.Class.Binary a => Data.Binary.Class.Binary (GHC.Exts.Heap.Closures.GenClosure a)

Files

GHCi/BinaryArray.hs view
@@ -5,6 +5,7 @@ -- module GHCi.BinaryArray(putArray, getArray) where +import Prelude import Foreign.Ptr import Data.Binary import Data.Binary.Put (putBuilder)
GHCi/BreakArray.hs view
@@ -30,6 +30,7 @@     ) where  #ifdef GHCI+import Prelude -- See note [Why do we import Prelude here?] import Control.Monad import Data.Word import GHC.Word
GHCi/CreateBCO.hs view
@@ -13,6 +13,7 @@ -- | Create real byte-code objects from 'ResolvedBCO's. module GHCi.CreateBCO (createBCOs) where +import Prelude -- See note [Why do we import Prelude here?] import GHCi.ResolvedBCO import GHCi.RemoteTypes import GHCi.BreakArray@@ -25,7 +26,7 @@ import GHC.Arr          ( Array(..) ) import GHC.Exts import GHC.IO-import Control.Exception (throwIO, ErrorCall(..))+import Control.Exception ( ErrorCall(..) )  createBCOs :: [ResolvedBCO] -> IO [HValueRef] createBCOs bcos = do
GHCi/FFI.hsc view
@@ -17,6 +17,7 @@   , freeForeignCallInfo   ) where +import Prelude -- See note [Why do we import Prelude here?] import Control.Exception import Data.Binary import GHC.Generics
GHCi/InfoTable.hsc view
@@ -15,6 +15,7 @@ #endif   ) where +import Prelude -- See note [Why do we import Prelude here?] #ifdef GHCI import Foreign import Foreign.C
GHCi/Message.hs view
@@ -22,6 +22,7 @@   , Pipe(..), remoteCall, remoteTHCall, readPipe, writePipe   ) where +import Prelude -- See note [Why do we import Prelude here?] import GHCi.RemoteTypes import GHCi.FFI import GHCi.TH.Binary ()@@ -43,6 +44,7 @@ import Data.Typeable (TypeRep) import Data.IORef import Data.Map (Map)+import Foreign import GHC.Generics import GHC.Stack.CCS import qualified Language.Haskell.TH        as TH@@ -202,6 +204,18 @@                    -> [RemoteRef (TH.Q ())]                    -> Message (QResult ()) +  -- | Remote interface to GHC.Exts.Heap.getClosureData. This is used by+  -- the GHCi debugger to inspect values in the heap for :print and+  -- type reconstruction.+  GetClosure+    :: HValueRef+    -> Message (GenClosure HValueRef)++  -- | Evaluate something. This is used to support :force in GHCi.+  Seq+    :: HValueRef+    -> Message (EvalResult ())+ deriving instance Show (Message a)  @@ -413,6 +427,22 @@   } instance Show QState where show _ = "<QState>" +-- Orphan instances of Binary for Ptr / FunPtr by conversion to Word64.+-- This is to support Binary StgInfoTable which includes these.+instance Binary (Ptr a) where+  put p = put (fromIntegral (ptrToWordPtr p) :: Word64)+  get = (wordPtrToPtr . fromIntegral) <$> (get :: Get Word64)++instance Binary (FunPtr a) where+  put = put . castFunPtrToPtr+  get = castPtrToFunPtr <$> get++-- Binary instances to support the GetClosure message+instance Binary StgInfoTable+instance Binary ClosureType+instance Binary PrimType+instance Binary a => Binary (GenClosure a)+ data Msg = forall a . (Binary a, Show a) => Msg (Message a)  getMessage :: Get Msg@@ -453,7 +483,9 @@       31 -> Msg <$> return StartTH       32 -> Msg <$> (RunModFinalizers <$> get <*> get)       33 -> Msg <$> (AddSptEntry <$> get <*> get)-      _  -> Msg <$> (RunTH <$> get <*> get <*> get <*> get)+      34 -> Msg <$> (RunTH <$> get <*> get <*> get <*> get)+      35 -> Msg <$> (GetClosure <$> get)+      _  -> Msg <$> (Seq <$> get)  putMessage :: Message a -> Put putMessage m = case m of@@ -492,6 +524,8 @@   RunModFinalizers a b        -> putWord8 32 >> put a >> put b   AddSptEntry a b             -> putWord8 33 >> put a >> put b   RunTH st q loc ty           -> putWord8 34 >> put st >> put q >> put loc >> put ty+  GetClosure a                -> putWord8 35 >> put a+  Seq a                       -> putWord8 36 >> put a  -- ----------------------------------------------------------------------------- -- Reading/writing messages
GHCi/ObjLink.hs view
@@ -25,6 +25,7 @@   , findSystemLibrary   )  where +import Prelude -- See note [Why do we import Prelude here?] import GHCi.RemoteTypes import Control.Exception (throwIO, ErrorCall(..)) import Control.Monad    ( when )
GHCi/RemoteTypes.hs view
@@ -17,6 +17,7 @@   , unsafeForeignRefToRemoteRef, finalizeForeignRef   ) where +import Prelude -- See note [Why do we import Prelude here?] import Control.DeepSeq import Data.Word import Foreign hiding (newForeignPtr)
GHCi/ResolvedBCO.hs view
@@ -6,6 +6,7 @@   , isLittleEndian   ) where +import Prelude -- See note [Why do we import Prelude here?] import SizedSeq import GHCi.RemoteTypes import GHCi.BreakArray
GHCi/Run.hs view
@@ -12,6 +12,7 @@   ( run, redirectInterrupts   ) where +import Prelude -- See note [Why do we import Prelude here?] import GHCi.CreateBCO import GHCi.InfoTable import GHCi.FFI@@ -31,8 +32,9 @@ import Data.ByteString (ByteString) import qualified Data.ByteString.Unsafe as B import GHC.Exts+import GHC.Exts.Heap import GHC.Stack-import Foreign+import Foreign hiding (void) import Foreign.C import GHC.Conc.Sync import GHC.IO hiding ( bracket )@@ -86,6 +88,10 @@   MkConInfoTable ptrs nptrs tag ptrtag desc ->     toRemotePtr <$> mkConInfoTable ptrs nptrs tag ptrtag desc   StartTH -> startTH+  GetClosure ref -> do+    clos <- getClosureData =<< localRef ref+    mapM (\(Box x) -> mkRemoteRef (HValue x)) clos+  Seq ref -> tryEval (void $ evaluate =<< localRef ref)   _other -> error "GHCi.Run.run"  evalStmt :: EvalOpts -> EvalExpr HValueRef -> IO (EvalStatus [HValueRef])
GHCi/Signals.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} module GHCi.Signals (installSignalHandlers) where +import Prelude -- See note [Why do we import Prelude here?] import Control.Concurrent import Control.Exception import System.Mem.Weak  ( deRefWeak )
GHCi/StaticPtrTable.hs view
@@ -3,6 +3,7 @@  module GHCi.StaticPtrTable ( sptAddEntry ) where +import Prelude -- See note [Why do we import Prelude here?] import Data.Word import Foreign import GHC.Fingerprint
GHCi/TH.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE ScopedTypeVariables, StandaloneDeriving, DeriveGeneric,-    TupleSections, RecordWildCards, InstanceSigs #-}+    TupleSections, RecordWildCards, InstanceSigs, CPP #-} {-# OPTIONS_GHC -fno-warn-name-shadowing #-}  -- |@@ -91,6 +91,7 @@     compiler/typecheck/TcSplice.hs -} +import Prelude -- See note [Why do we import Prelude here?] import GHCi.Message import GHCi.RemoteTypes import GHC.Serialized@@ -143,7 +144,9 @@     do (m', s')  <- runGHCiQ m s        (a,  s'') <- runGHCiQ (f m') s'        return (a, s'')+#if !MIN_VERSION_base(4,13,0)   fail = Fail.fail+#endif  instance Fail.MonadFail GHCiQ where   fail err  = GHCiQ $ \s -> throwIO (GHCiQException s err)
GHCi/TH/Binary.hs view
@@ -7,6 +7,7 @@ -- This module is full of orphans, unfortunately module GHCi.TH.Binary () where +import Prelude -- See note [Why do we import Prelude here?] import Data.Binary import qualified Data.ByteString as B import GHC.Serialized
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
SizedSeq.hs view
@@ -8,6 +8,7 @@   , sizeSS   ) where +import Prelude -- See note [Why do we import Prelude here?] import Control.DeepSeq import Data.Binary import Data.List
ghci.cabal view
@@ -1,16 +1,17 @@+cabal-version:  >=1.10 name:           ghci-version:        8.6.5+version:        8.8.1+ license:        BSD3 license-file:   LICENSE category:       GHC maintainer:     ghc-devs@haskell.org-bug-reports:    https://ghc.haskell.org/trac/ghc/newticket+bug-reports:    https://gitlab.haskell.org/ghc/ghc/issues/new synopsis:       The library supporting GHC's interactive interpreter description:             This library offers interfaces which mediate interactions between the             @ghci@ interactive shell and @iserv@, GHC's out-of-process interpreter             backend.-cabal-version:  >=1.10 build-type:     Simple extra-source-files: changelog.md @@ -21,11 +22,12 @@  source-repository head     type:     git-    location: http://git.haskell.org/ghc.git+    location: https://gitlab.haskell.org/ghc/ghc.git     subdir:   libraries/ghci  library     default-language: Haskell2010+    default-extensions: NoImplicitPrelude     other-extensions:         BangPatterns         CPP@@ -52,6 +54,8 @@             GHCi.Signals             GHCi.TH +    include-dirs: +     exposed-modules:         GHCi.BreakArray         GHCi.BinaryArray@@ -66,16 +70,16 @@      Build-Depends:         array            == 0.5.*,-        base             >= 4.8 && < 4.13,+        base             >= 4.8 && < 4.14,         binary           == 0.8.*,         bytestring       == 0.10.*,         containers       >= 0.5 && < 0.7,         deepseq          == 1.4.*,         filepath         == 1.4.*,-        ghc-boot         == 8.6.5,-        ghc-boot-th      == 8.6.5,-        ghc-heap         == 8.6.5,-        template-haskell == 2.14.*,+        ghc-boot         == 8.8.1,+        ghc-boot-th      == 8.8.1,+        ghc-heap         == 8.8.1,+        template-haskell == 2.15.*,         transformers     == 0.5.*      if !os(windows)