packages feed

hint-server 1.0.0 → 1.1.0

raw patch · 2 files changed

+7/−15 lines, 2 filesdep ~eprocessPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: eprocess

API changes (from Hackage documentation)

Files

hint-server.cabal view
@@ -1,5 +1,5 @@ name: hint-server-version: 1.0.0+version: 1.1.0 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -28,7 +28,7 @@                    mtl >=1.1.0,                 mtl < 1.2,                    monad-loops >=0.3.0,         monad-loops < 0.4,                    hint >=0.3.1,                hint < 0.4,-                   eprocess >=1.0.0,            eprocess < 2+                   eprocess >=1.1.0,            eprocess < 2     exposed-modules: Language.Haskell.Interpreter.Server     hs-source-dirs: src     
src/Language/Haskell/Interpreter/Server.hs view
@@ -14,9 +14,7 @@  -- | The server handle.  It's returned on process creation and should be used -- afterwards to send messages to it-newtype ServerHandle = SH {handle :: Handle (Either Stop (InterpreterT IO ()))}--data Stop = Stop+newtype ServerHandle = SH {handle :: Handle (InterpreterT IO ())}  instance MonadInterpreter m => MonadInterpreter (ReceiverT r m) where     fromSession = lift . fromSession@@ -32,13 +30,7 @@     where interpreter =             do                 setImports ["Prelude"]-                iterateWhile id $ do-                                    v <- recv-                                    case v of-                                        Left Stop ->-                                            return False-                                        Right acc ->-                                            lift acc >> return True+                forever $ recv >>= lift  -- | Asynchronically runs an action and returns the /MVar/ that will be filled -- with the result when it's there. Usage:@@ -50,7 +42,7 @@             -> IO (MVar (Either InterpreterError a)) asyncRunIn server action = do                                 resVar <- liftIO newEmptyMVar-                                sendTo (handle server) $ Right $ try action >>= liftIO . putMVar resVar+                                sendTo (handle server) $ try action >>= liftIO . putMVar resVar                                 return resVar  -- | Runs the action. Usage:@@ -62,7 +54,7 @@        -> IO (Either InterpreterError a) runIn server action = runHere $ do                                     me <- self-                                    sendTo (handle server) $ Right $ try action >>= sendTo me+                                    sendTo (handle server) $ try action >>= sendTo me                                     recv  -- | Runs all the pending actions (those that where run using 'asyncRunIn'. Usage:@@ -81,4 +73,4 @@ --      stop serverhandle -- @ stop :: ServerHandle -> IO ()-stop server = sendTo (handle server) $ Left Stop+stop = kill . handle