ihaskell 0.7.0.1 → 0.7.0.2
raw patch · 3 files changed
+20/−17 lines, 3 filesdep ~ipython-kernelsetup-changed
Dependency ranges changed: ipython-kernel
Files
- Setup.hs +2/−1
- ihaskell.cabal +4/−4
- src/IHaskell/Eval/Evaluate.hs +14/−12
Setup.hs view
@@ -1,2 +1,3 @@-import Distribution.Simple+import Distribution.Simple+ main = defaultMain
ihaskell.cabal view
@@ -7,7 +7,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.7.0.1+version: 0.7.0.2 -- A short (one-line) description of the package. synopsis: A Haskell backend kernel for the IPython project.@@ -89,7 +89,7 @@ utf8-string -any, uuid >=1.3, vector -any,- ipython-kernel >=0.6.1+ ipython-kernel >=0.7 if flag(binPkgDb) build-depends: bin-package-db @@ -149,7 +149,7 @@ strict >=0.3, unix >= 2.6, directory -any,- ipython-kernel >=0.6.1+ ipython-kernel >=0.7 if flag(binPkgDb) build-depends: bin-package-db@@ -204,7 +204,7 @@ uuid >=1.3, vector -any, setenv ==0.1.*,- ipython-kernel >= 0.6.1+ ipython-kernel >= 0.7 if flag(binPkgDb) build-depends: bin-package-db
src/IHaskell/Eval/Evaluate.hs view
@@ -136,6 +136,7 @@ , "import qualified System.IO as IHaskellSysIO" , "import qualified Language.Haskell.TH as IHaskellTH" ]+ ihaskellGlobalImports :: [String] ihaskellGlobalImports = [ "import IHaskell.Display()"@@ -146,7 +147,8 @@ -- | Run an interpreting action. This is effectively runGhc with initialization and importing. First -- argument indicates whether `stdin` is handled specially, which cannot be done in a testing--- environment. The argument passed to the action indicates whether Haskell support libraries are available.+-- environment. The argument passed to the action indicates whether Haskell support libraries are+-- available. interpret :: String -> Bool -> (Bool -> Interpreter a) -> IO a interpret libdir allowedStdin action = runGhc (Just libdir) $ do -- If we're in a sandbox, add the relevant package database@@ -177,8 +179,8 @@ #else packageIdString' dflags = packageIdString #endif--- | Initialize our GHC session with imports and a value for 'it'.--- Return whether the IHaskell support libraries are available.+-- | Initialize our GHC session with imports and a value for 'it'. Return whether the IHaskell+-- support libraries are available. initializeImports :: Interpreter Bool initializeImports = do -- Load packages that start with ihaskell-*, aren't just IHaskell, and depend directly on the right@@ -202,9 +204,9 @@ guard (iHaskellPkgName `isPrefixOf` idString) displayPkgs = [pkgName | pkgName <- packageNames- , Just (x:_) <- [stripPrefix initStr pkgName]- , pkgName `notElem` broken- , isAlpha x]+ , Just (x:_) <- [stripPrefix initStr pkgName]+ , pkgName `notElem` broken+ , isAlpha x] hasIHaskellPackage = not $ null $ filter (== iHaskellPkgName) packageNames @@ -228,8 +230,8 @@ -- Import modules. imports <- mapM parseImportDecl $ requiredGlobalImports ++ if hasIHaskellPackage- then ihaskellGlobalImports ++ displayImports- else []+ then ihaskellGlobalImports ++ displayImports+ else [] setContext $ map IIDecl $ implicitPrelude : imports -- Set -fcontext-stack to 100 (default in ghc-7.10). ghc-7.8 uses 20, which is too small.@@ -318,8 +320,8 @@ -- Get displayed channel outputs. Merge them with normal display outputs. dispsMay <- if supportLibrariesAvailable state- then extractValue "IHaskell.Display.displayFromChan" >>= liftIO- else return Nothing+ then extractValue "IHaskell.Display.displayFromChan" >>= liftIO+ else return Nothing let result = case dispsMay of Nothing -> evalResult evalOut@@ -336,8 +338,8 @@ -- Handle the widget messages newState <- if supportLibrariesAvailable state- then flushWidgetMessages tempState tempMsgs widgetHandler - else return tempState+ then flushWidgetMessages tempState tempMsgs widgetHandler+ else return tempState case evalStatus evalOut of Success -> runUntilFailure newState rest