Commit 4f4b7be6 authored by Andrew Gibiansky's avatar Andrew Gibiansky

travis latest

parent a5d48548
...@@ -65,7 +65,7 @@ script: ...@@ -65,7 +65,7 @@ script:
- | - |
if $DISPLAY; then if $DISPLAY; then
TOP=$(pwd) TOP=$(pwd)
for PACKAGE in $(ls --color=none ihaskell-display); do for PACKAGE in ihaskell-display/*; do
cd "$TOP/$PACKAGE"; cd "$TOP/$PACKAGE";
stack build --resolver=$RESOLVER; stack build --resolver=$RESOLVER;
cd "$TOP"; cd "$TOP";
......
...@@ -30,7 +30,6 @@ import Data.List (findIndex, and, foldl1, nubBy) ...@@ -30,7 +30,6 @@ import Data.List (findIndex, and, foldl1, nubBy)
import Text.Printf import Text.Printf
import Data.Char as Char import Data.Char as Char
import Data.Dynamic import Data.Dynamic
import Data.Typeable.Internal
import Data.Typeable import Data.Typeable
import qualified Data.Serialize as Serialize import qualified Data.Serialize as Serialize
import System.Directory import System.Directory
...@@ -357,18 +356,11 @@ evaluate kernelState code output widgetHandler = do ...@@ -357,18 +356,11 @@ evaluate kernelState code output widgetHandler = do
-- | Compile a string and extract a value from it. Effectively extract the result of an expression -- | Compile a string and extract a value from it. Effectively extract the result of an expression
-- from inside the notebook environment. -- from inside the notebook environment.
extractValue :: Typeable a => String -> Interpreter a extractValue :: Typeable a => String -> Interpreter a
extractValue expr = result extractValue expr = do
where compiled <- dynCompileExpr expr
result = do case fromDynamic compiled of
compiled <- dynCompileExpr expr Nothing -> error "Error casting types (Evaluate.hs): multiple IHaskell copies installed?"
case fromDynamic compiled of Just result -> return result
Nothing -> error $
"Error casting types in Evaluate.hs: " ++
showRep (dynTypeRep compiled) ++
" -> " ++
showRep (typeRep result)
Just result -> return result
showRep rep = show $ map (tyConPackage .typeRepTyCon) $ concatMap typeRepArgs (typeRepArgs rep)
flushWidgetMessages :: KernelState flushWidgetMessages :: KernelState
-> [WidgetMsg] -> [WidgetMsg]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment