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

travis latest

parent a5d48548
......@@ -65,7 +65,7 @@ script:
- |
if $DISPLAY; then
TOP=$(pwd)
for PACKAGE in $(ls --color=none ihaskell-display); do
for PACKAGE in ihaskell-display/*; do
cd "$TOP/$PACKAGE";
stack build --resolver=$RESOLVER;
cd "$TOP";
......
......@@ -30,7 +30,6 @@ import Data.List (findIndex, and, foldl1, nubBy)
import Text.Printf
import Data.Char as Char
import Data.Dynamic
import Data.Typeable.Internal
import Data.Typeable
import qualified Data.Serialize as Serialize
import System.Directory
......@@ -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
-- from inside the notebook environment.
extractValue :: Typeable a => String -> Interpreter a
extractValue expr = result
where
result = do
compiled <- dynCompileExpr expr
case fromDynamic compiled of
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)
extractValue expr = do
compiled <- dynCompileExpr expr
case fromDynamic compiled of
Nothing -> error "Error casting types (Evaluate.hs): multiple IHaskell copies installed?"
Just result -> return result
flushWidgetMessages :: KernelState
-> [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