Commit b2888da8 authored by Sumit Sahrawat's avatar Sumit Sahrawat

Update example notebooks

Found issues with the PlaceProxy implementation. (Unresolved)
parent c6e548f7
...@@ -22,13 +22,14 @@ ...@@ -22,13 +22,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"{-# LANGUAGE OverloadedStrings #-}\n", "{-# LANGUAGE OverloadedStrings #-}\n",
"{-# LANGUAGE FlexibleContexts #-}\n",
"import IHaskell.Display.Widgets\n", "import IHaskell.Display.Widgets\n",
"import Data.Text (pack, unpack)\n", "import Data.Text (pack, unpack)\n",
"import Text.Printf (printf)" "import Text.Printf (printf)"
...@@ -43,18 +44,20 @@ ...@@ -43,18 +44,20 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"-- Constructors\n", "-- Check box\n",
"chk <- mkCheckBox\n", "chk <- mkCheckBox\n",
"\n",
"-- Toggle button\n",
"tgb <- mkToggleButton\n", "tgb <- mkToggleButton\n",
"\n", "\n",
"-- For demonstration\n", "-- Valid widget: Displaying booleans conveniently\n",
"o <- mkHTMLWidget" "vld <- mkValidWidget"
] ]
}, },
{ {
...@@ -66,16 +69,16 @@ ...@@ -66,16 +69,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"-- Display\n", "-- Display the widgets\n",
"chk\n", "chk\n",
"tgb\n", "tgb\n",
"o" "vld"
] ]
}, },
{ {
...@@ -87,38 +90,23 @@ ...@@ -87,38 +90,23 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField chk Description \"Bool 1: \"\n", "setField chk Description \"Bool 1: \"\n",
"setField tgb Description \"Bool 2\"\n", "setField tgb Description \"Bool 2\"\n",
"\n", "\n",
"-- Helper function\n",
"refresh b =\n",
" let stat = if b then \"green\" else \"red\"\n",
" fmt = \"<div style=\\\"background:%s;color:#ffffff\\\"><b>%s</b></div>\"\n",
" in setField o StringValue $ pack $ printf fmt stat (show b)\n",
"\n",
" -- Cosmetic changes\n", " -- Cosmetic changes\n",
"setField o Description \"Bool 1 && Bool 2\"\n", "setField vld Description \"Bool 1 && Bool 2\"\n",
"setField o Padding 10\n",
"\n", "\n",
" -- And (&&) the two values, and send output to html widget\n", " -- And (&&) the two values, and send output to html widget\n",
"setHandler w = setField w ChangeHandler $ do\n", "setHandler w = setField w ChangeHandler $ do\n",
" b1 <- getField chk BoolValue\n", " b1 <- getField chk BoolValue\n",
" b2 <- getField tgb BoolValue\n", " b2 <- getField tgb BoolValue\n",
" refresh (b1 && b2)\n", " setField vld BoolValue (b1 && b2)\n",
"\n", "\n",
"setHandler chk\n", "setHandler chk\n",
"setHandler tgb" "setHandler tgb"
...@@ -142,7 +130,7 @@ ...@@ -142,7 +130,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -163,19 +151,11 @@ ...@@ -163,19 +151,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"sign <- mkCheckBox\n", "sign <- mkCheckBox\n",
"bits <- replicateM 7 mkToggleButton\n", "bits <- replicateM 7 mkToggleButton\n",
...@@ -195,19 +175,11 @@ ...@@ -195,19 +175,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"box <- mkFlexBox\n", "box <- mkFlexBox\n",
"out <- mkHTMLWidget\n", "out <- mkHTMLWidget\n",
...@@ -248,19 +220,11 @@ ...@@ -248,19 +220,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"import Control.Arrow (first, second)\n", "import Control.Arrow (first, second)\n",
"\n", "\n",
...@@ -295,6 +259,12 @@ ...@@ -295,6 +259,12 @@
"display_name": "Haskell", "display_name": "Haskell",
"language": "haskell", "language": "haskell",
"name": "haskell" "name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -104,6 +104,12 @@ ...@@ -104,6 +104,12 @@
"display_name": "Haskell", "display_name": "Haskell",
"language": "haskell", "language": "haskell",
"name": "haskell" "name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": false
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -77,19 +77,11 @@ ...@@ -77,19 +77,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField bit MaxInt 20\n", "setField bit MaxInt 20\n",
"setField bit MinInt 10\n", "setField bit MinInt 10\n",
...@@ -119,7 +111,7 @@ ...@@ -119,7 +111,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -131,7 +123,7 @@ ...@@ -131,7 +123,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -143,21 +135,11 @@ ...@@ -143,21 +135,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"(25,75)"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"getField irs IntPairValue" "getField irs IntPairValue"
] ]
...@@ -178,7 +160,7 @@ ...@@ -178,7 +160,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -190,19 +172,11 @@ ...@@ -190,19 +172,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField inp IntValue 42" "setField inp IntValue 42"
] ]
...@@ -213,6 +187,12 @@ ...@@ -213,6 +187,12 @@
"display_name": "Haskell", "display_name": "Haskell",
"language": "haskell", "language": "haskell",
"name": "haskell" "name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -13,13 +13,14 @@ ...@@ -13,13 +13,14 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"{-# LANGUAGE OverloadedStrings #-}\n", "{-# LANGUAGE OverloadedStrings #-}\n",
"{-# LANGUAGE FlexibleContexts #-}\n",
"import IHaskell.Display.Widgets" "import IHaskell.Display.Widgets"
] ]
}, },
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -83,19 +84,11 @@ ...@@ -83,19 +84,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"import Data.IORef\n", "import Data.IORef\n",
"import Graphics.Rendering.Chart.Easy hiding (tan)\n", "import Graphics.Rendering.Chart.Easy hiding (tan)\n",
...@@ -164,19 +157,11 @@ ...@@ -164,19 +157,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"divBox <- mkFlexBox\n", "divBox <- mkFlexBox\n",
"setField divBox Orientation HorizontalOrientation\n", "setField divBox Orientation HorizontalOrientation\n",
...@@ -204,20 +189,12 @@ ...@@ -204,20 +189,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false, "collapsed": false,
"scrolled": true "scrolled": true
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"slBox <- mkFlexBox\n", "slBox <- mkFlexBox\n",
"\n", "\n",
...@@ -244,19 +221,11 @@ ...@@ -244,19 +221,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"-- The four FlexBox widgets.\n", "-- The four FlexBox widgets.\n",
"import Control.Monad (replicateM, forM_)\n", "import Control.Monad (replicateM, forM_)\n",
...@@ -302,19 +271,11 @@ ...@@ -302,19 +271,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"-- A FlexBox with ToggleButtons\n", "-- A FlexBox with ToggleButtons\n",
"buttonBox <- mkFlexBox\n", "buttonBox <- mkFlexBox\n",
...@@ -339,19 +300,11 @@ ...@@ -339,19 +300,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"import Control.Arrow (first, second)\n", "import Control.Arrow (first, second)\n",
"\n", "\n",
...@@ -384,19 +337,11 @@ ...@@ -384,19 +337,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField tlBox Children $ map ChildWidget $ boxes ++ [buttonBox] ++ rangeBoxes" "setField tlBox Children $ map ChildWidget $ boxes ++ [buttonBox] ++ rangeBoxes"
] ]
...@@ -410,19 +355,11 @@ ...@@ -410,19 +355,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField tlBox Titles [\"Plot title\", \"X-Label\", \"Y-Label\", \"Grid\", \"X-range\", \"Y-range\"]" "setField tlBox Titles [\"Plot title\", \"X-Label\", \"Y-Label\", \"Grid\", \"X-range\", \"Y-range\"]"
] ]
...@@ -436,19 +373,11 @@ ...@@ -436,19 +373,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"let syncVal widget value fieldGetter = readIORef plotState >>= setField widget value . fieldGetter\n", "let syncVal widget value fieldGetter = readIORef plotState >>= setField widget value . fieldGetter\n",
" in do\n", " in do\n",
...@@ -478,7 +407,7 @@ ...@@ -478,7 +407,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -500,22 +429,11 @@ ...@@ -500,22 +429,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"-- Spurious update to display empty plot instead of empty image initially\n", "-- Spurious update to display empty plot instead of empty image initially\n",
"update return\n", "update return\n",
...@@ -532,7 +450,7 @@ ...@@ -532,7 +450,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -543,7 +461,7 @@ ...@@ -543,7 +461,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 15, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -554,7 +472,7 @@ ...@@ -554,7 +472,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 16, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -569,6 +487,12 @@ ...@@ -569,6 +487,12 @@
"display_name": "Haskell", "display_name": "Haskell",
"language": "haskell", "language": "haskell",
"name": "haskell" "name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -49,19 +49,11 @@ ...@@ -49,19 +49,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField msel Description \"Functions to show (One or more)\"\n", "setField msel Description \"Functions to show (One or more)\"\n",
"setField msel Options (OptionLabels [\"sin\", \"cos\"])\n", "setField msel Options (OptionLabels [\"sin\", \"cos\"])\n",
...@@ -79,20 +71,12 @@ ...@@ -79,20 +71,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false, "collapsed": false,
"scrolled": true "scrolled": true
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"import Graphics.Rendering.Chart.Easy hiding (tan)\n", "import Graphics.Rendering.Chart.Easy hiding (tan)\n",
"import Graphics.Rendering.Chart.Backend.Cairo\n", "import Graphics.Rendering.Chart.Backend.Cairo\n",
...@@ -140,92 +124,11 @@ ...@@ -140,92 +124,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
},
{
"data": {},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"-- Display the widgets\n", "-- Display the widgets\n",
"msel\n", "msel\n",
...@@ -246,6 +149,12 @@ ...@@ -246,6 +149,12 @@
"display_name": "Haskell", "display_name": "Haskell",
"language": "haskell", "language": "haskell",
"name": "haskell" "name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 3, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 5, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
...@@ -154,20 +154,12 @@ ...@@ -154,20 +154,12 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 8, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false, "collapsed": false,
"scrolled": true "scrolled": true
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"-- Some padding\n", "-- Some padding\n",
"setField text Padding 5" "setField text Padding 5"
...@@ -182,19 +174,11 @@ ...@@ -182,19 +174,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 9, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField text Placeholder \"Enter your text here...\"\n", "setField text Placeholder \"Enter your text here...\"\n",
"setField area Placeholder \"Parsed output will appear here...\"" "setField area Placeholder \"Parsed output will appear here...\""
...@@ -216,7 +200,7 @@ ...@@ -216,7 +200,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 10, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -239,7 +223,7 @@ ...@@ -239,7 +223,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 11, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -300,19 +284,11 @@ ...@@ -300,19 +284,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 12, "execution_count": null,
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"outputs": [ "outputs": [],
{
"data": {
"text/plain": []
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [ "source": [
"setField text ChangeHandler $ do\n", "setField text ChangeHandler $ do\n",
" input <- unpack <$> getField text StringValue\n", " input <- unpack <$> getField text StringValue\n",
...@@ -338,7 +314,7 @@ ...@@ -338,7 +314,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 13, "execution_count": null,
"metadata": { "metadata": {
"collapsed": true "collapsed": true
}, },
...@@ -354,6 +330,12 @@ ...@@ -354,6 +330,12 @@
"display_name": "Haskell", "display_name": "Haskell",
"language": "haskell", "language": "haskell",
"name": "haskell" "name": "haskell"
},
"language_info": {
"codemirror_mode": "ihaskell",
"file_extension": ".hs",
"name": "haskell",
"version": "7.10.2"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
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