packages feed

phoityne-vscode 0.0.11.0 → 0.0.12.0

raw patch · 6 files changed

+44/−39 lines, 6 files

Files

Changelog.md view
@@ -1,4 +1,13 @@ +20170205 phoityne-vscode-0.0.12.0+  * [FIX] [8](https://github.com/phoityne/phoityne-vscode/issues/8) : Unterminated process after leaving GHCi +++20161218 phoityne-vscode-0.0.11.0+  * [ADD] Hit count break conditionに対応した。+  * [FIX] エラー終了時にterminate eventを送信するように修正した。 ++ 20161009 phoityne-vscode-0.0.10.0   * [MODIFY] REPL結果をイベントで返すように変更した。EvaluateResponseで返した場合は、複数行表示ができないため。    * [MODIFY] REPLにおいて、複数行の入力に対応した。 
README.md view
@@ -2,16 +2,16 @@  # Phoityne VSCode -[Phoityne](https://sites.google.com/site/phoityne/vscode) is a ghci debug viewer for Visual Studio Code.+Phoityne is a ghci debug viewer for Visual Studio Code.   ## Information -* [2016/12/18] phoityne-vscode released.  -  * Marketplace [phoityne-vscode-0.0.9](https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode)-  * hackage [phoityne-vscode-0.0.11.0](https://hackage.haskell.org/package/phoityne-vscode)  +* [2017/02/05] phoityne-vscode released.  +  * Marketplace [phoityne-vscode-0.0.10](https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode)+  * hackage [phoityne-vscode-0.0.12.0](https://hackage.haskell.org/package/phoityne-vscode)   * Release Summary-  * Support "Hit count break condition". And some bug fixes.+  * FIX [8](https://github.com/phoityne/phoityne-vscode/issues/8) : Unterminated process after leaving GHCi   ![01_debug.gif](https://raw.githubusercontent.com/phoityne/phoityne-vscode/master/docs/01_debug.gif)@@ -137,6 +137,10 @@   ## Version history++* [2016/12/18] phoityne-vscode released.  +  * Marketplace [phoityne-vscode-0.0.9](https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode)+  * hackage [phoityne-vscode-0.0.11.0](https://hackage.haskell.org/package/phoityne-vscode)    * [2016/10/09] phoityne-vscode released.     * Marketplace [phoityne-vscode-0.0.8](https://marketplace.visualstudio.com/items?itemName=phoityne.phoityne-vscode)
app/Phoityne/VSCode/IO/Core.hs view
@@ -23,6 +23,7 @@ import Data.Char import Safe import System.IO+import System.Exit import System.FilePath import System.Directory import System.Log.Logger@@ -369,7 +370,16 @@       terminatedEvtStr = J.encode terminatedEvt   sendEvent mvarDat terminatedEvtStr +-- |+--+sendRestartEvent :: MVar DebugContextData -> IO ()+sendRestartEvent mvarCtx = do+  resSeq <- getIncreasedResponseSequence mvarCtx+  let terminatedEvt    = J.defaultTerminatedEvent resSeq+      terminatedEvtStr = J.encode terminatedEvt{J.bodyTerminatedEvent = J.TerminatedEventBody True}+  sendEvent mvarCtx terminatedEvtStr + -- |===================================================================== --  Handlers @@ -630,18 +640,12 @@ -- | -- disconnectRequestHandler :: MVar DebugContextData -> J.DisconnectRequest -> IO ()-disconnectRequestHandler mvarCtx req = flip E.catches handlers $ do+disconnectRequestHandler mvarCtx req = do   logRequest $ show req   ghciProcessDebugContextData <$> (readMVar mvarCtx) >>= withProcess+  exitSuccess    where-    handlers = [ E.Handler someExcept ]-    someExcept (e :: E.SomeException) = do-      let msg = L.intercalate " " ["disconnect request error.", show req, show e]-      sendErrorEvent mvarCtx msg-      resSeq <- getIncreasedResponseSequence mvarCtx-      sendResponse mvarCtx $ J.encode $ J.defaultDisconnectResponse resSeq req-     withProcess Nothing = do       sendErrorEvent mvarCtx "[disconnectRequestHandler] ghci not started."       resSeq <- getIncreasedResponseSequence mvarCtx@@ -1444,12 +1448,7 @@       ctx <- readMVar mvarCtx       withDebugStarted event $ debugStartedDebugContextData ctx -    withDebugStarted _ True = do-      resSeq <- getIncreasedResponseSequence mvarCtx-      let terminatedEvt    = J.defaultTerminatedEvent resSeq-          terminatedEvtStr = J.encode terminatedEvt{J.bodyTerminatedEvent = J.TerminatedEventBody True}-      sendEvent mvarCtx terminatedEvtStr-+    withDebugStarted _ True = sendRestartEvent mvarCtx     withDebugStarted event False = do       ctx <- takeMVar mvarCtx       putMVar mvarCtx ctx{modifiedDebugContextData = True}@@ -1496,12 +1495,9 @@     proceed _ Nothing = sendErrorEvent mvarCtx "[proceedDebug] ghci not started."     proceed True (Just ghciProc) = G.trace ghciProc outHdl >>= \case       Left err  -> do-        -- end of debugging+        -- end of debugging successfully.         debugM _LOG_NAME $ show err-        resSeq <- getIncreasedResponseSequence mvarCtx-        let terminatedEvt    = J.defaultTerminatedEvent resSeq-            terminatedEvtStr = J.encode terminatedEvt-        sendEvent mvarCtx terminatedEvtStr+        sendTerminateEvent mvarCtx        Right pos -> breakOrContinue pos @@ -1511,20 +1507,12 @@      -- |     ---    withModified True _ = do-      resSeq <- getIncreasedResponseSequence mvarCtx-      let terminatedEvt    = J.defaultTerminatedEvent resSeq-          terminatedEvtStr = J.encode terminatedEvt{J.bodyTerminatedEvent = J.TerminatedEventBody True}-      sendEvent mvarCtx terminatedEvtStr-  +    withModified True _ = sendRestartEvent mvarCtx       withModified False ghciProc = G.traceMain ghciProc outHdl >>= \case       Left err  -> do-        -- end of debugging+        -- end of debugging successfully.         debugM _LOG_NAME $ show err-        resSeq <- getIncreasedResponseSequence mvarCtx-        let terminatedEvt    = J.defaultTerminatedEvent resSeq-            terminatedEvtStr = J.encode terminatedEvt-        sendEvent mvarCtx terminatedEvtStr+        sendTerminateEvent mvarCtx        Right pos -> do         ctx <- takeMVar mvarCtx
app/Phoityne/VSCode/IO/Main.hs view
@@ -9,6 +9,7 @@  -- システム import Data.Either.Utils+import System.Exit import qualified Control.Exception as E import qualified Data.ConfigFile as C import qualified System.Console.CmdArgs as CMD@@ -33,11 +34,14 @@    where     handlers = [ E.Handler helpExcept+               , E.Handler exitExcept                , E.Handler ioExcept                , E.Handler someExcept                ]     finalProc = L.removeAllHandlers -    helpExcept (_ :: A.HelpExitException) = return 0+    helpExcept (_ :: A.HelpExitException) = return 0 +    exitExcept ExitSuccess                = return 0+    exitExcept (ExitFailure c)            = return c     ioExcept   (e :: E.IOException)       = print e >> return 1     someExcept (e :: E.SomeException)     = print e >> return 1 
app/Phoityne/VSCode/Utility.hs view
@@ -63,12 +63,12 @@ -- | --   -- -pushWithLimit :: (Eq a, Ord a) => [a] -> a -> Int -> [a]+pushWithLimit :: [a] -> a -> Int -> [a] pushWithLimit [] item _ = [item] pushWithLimit buf item maxSize = if length buf > maxSize then item : L.init buf else item : buf  -- | ---rdrop :: Eq a => Int -> [a] -> [a]+rdrop :: Int -> [a] -> [a] rdrop cnt = reverse . drop cnt . reverse 
phoityne-vscode.cabal view
@@ -1,5 +1,5 @@ name:                  phoityne-vscode-version:               0.0.11.0+version:               0.0.12.0 synopsis:              ghci debug viewer on Visual Studio Code description:           Please see README.md license:               BSD3