Commit 648007a4 authored by Sumit Sahrawat's avatar Sumit Sahrawat

Remove displayWidget

It wasn't even working. The displays were being generated due to the
sendWidgetView call from display for Button.
parent de3d71e0
......@@ -841,11 +841,7 @@ evalCommand output (Expression expr) state = do
if canRunDisplay
then do
-- Use the display. As a result, `it` is set to the output.
out <- useDisplay displayExpr
if isWidget
then displayWidget out
else return out
useDisplay displayExpr
else do
-- Evaluate this expression as though it's just a statement. The output is bound to 'it', so we can
-- then use it.
......@@ -917,23 +913,6 @@ evalCommand output (Expression expr) state = do
then display :: Display
else removeSvg display
displayWidget :: EvalOut -> Ghc EvalOut
displayWidget evalOut =
case evalStatus evalOut of
Failure -> return evalOut
Success -> do
element <- dynCompileExpr "IHaskell.Display.Widget it"
case fromDynamic element of
Nothing -> error "Expecting widget"
Just (Widget widget) -> do
let oldComms = openComms state
uuid = getCommUUID widget
case Map.lookup uuid oldComms of
Nothing -> error "Unregistered widget"
Just _ -> do
liftIO $ widgetSendView widget
return evalOut
isIO expr = attempt $ exprType $ printf "((\\x -> x) :: IO a -> IO a) (%s)" expr
postprocessShowError :: EvalOut -> EvalOut
......
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