packages feed

hint-server 1.4.2 → 1.4.3

raw patch · 2 files changed

+10/−6 lines, 2 filesdep ~hint

Dependency ranges changed: hint

Files

hint-server.cabal view
@@ -1,5 +1,5 @@ name: hint-server-version: 1.4.2+version: 1.4.3 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -24,9 +24,8 @@     build-depends: base == 4.*,                    mtl >= 2.1 && < 2.3,                    monad-loops >= 0.3 && < 0.5,-                   hint == 0.4.*,+                   hint >= 0.6.0,                    eprocess == 1.7.*,                    exceptions >= 0.6 && < 0.9     exposed-modules: Language.Haskell.Interpreter.Server     hs-source-dirs: src-    
src/Language/Haskell/Interpreter/Server.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE ImpredicativeTypes #-}+{-# LANGUAGE CPP #-}  -- | This module provides a server process (implemented using eprocess) that can receive and run actions in the Interpreter monad. module Language.Haskell.Interpreter.Server (@@ -9,7 +10,11 @@     ) where  import Control.Concurrent.MVar+#if __GLASGOW_HASKELL__ >= 800+import Control.Monad.Except+#else import Control.Monad.Error+#endif import Control.Monad.Loops import Control.Monad.Catch (catch) import Control.Concurrent.Process@@ -21,7 +26,7 @@  instance MonadInterpreter m => MonadInterpreter (ReceiverT r m) where     fromSession = lift . fromSession-    modifySessionRef a = lift . (modifySessionRef a)+    modifySessionRef a = lift . modifySessionRef a     runGhc = lift . runGhc  -- | Starts the server. Usage:@@ -29,7 +34,7 @@ --      handle <- start -- @ start :: IO ServerHandle-start = (spawn $ makeProcess runInterpreter interpreter) >>= return . SH+start = fmap SH (spawn $ makeProcess runInterpreter interpreter)     where interpreter =             do                 setImports ["Prelude"]@@ -69,7 +74,7 @@ flush server = runIn server $ return ()  try :: InterpreterT IO b -> InterpreterT IO (Either InterpreterError b)-try a = (a >>= return . Right) `catch` (return . Left)+try a = fmap Right a `catch` (return . Left)  -- | Stops the server. Usage: -- @