1109 Commits

Author SHA1 Message Date
Sumit Sahrawat
876ddccc73 Implement on_submit handler for TextWidget
- All four string widgets complete.
- Switch to using 'Text' everywhere. How'd String crop up?
2015-06-19 08:39:02 +05:30
Sumit Sahrawat
45457f677a Working string widgets
- All four widgets work. TextWidget still missing `on_submit`.
- Still a lot of errors in the webconsole. Don't cause trouble though.
2015-06-19 06:11:13 +05:30
Sumit Sahrawat
4b5ccc89f0 Adding 3/4 string widget
- HTMLWidget and LatexWidget work fine.
- TextWidget still doesn't work.
- TextareaWidget not implemented yet.

* All widgets raise a lot of errors in the webconsole.
2015-06-18 20:56:08 +05:30
Sumit Sahrawat
2332a7903e Remove redundant work when handling widget updates
It is not required to re-update the widget inside the kernel state every
now and then, as it contains IORefs, which stay up-to-date.
2015-06-15 00:05:45 +05:30
Sumit Sahrawat
16a4fcad57 More minor fixes
- Make hlint happy.
- Reformat using hindent.
- Add explanatory comments in some places.
- Use Control.Monad.foldM for IHaskell.Eval.Widgets.widgetHandler
2015-06-12 23:49:22 +05:30
Sumit Sahrawat
6a1e912028 Minor changes
- Return of the newlines: Add all newlines once again
- Provide better comments
- Remove `sender`
- Consistently use set and get prefixed functions
2015-06-11 11:43:10 +05:30
Sumit Sahrawat
73bdfb0114 Reformat everything using hindent 2015-06-10 16:13:18 +05:30
Sumit Sahrawat
094150d4bf Make tests compile cleanly 2015-06-10 15:15:35 +05:30
Sumit Sahrawat
6bf253353f Prevent kernel crash due to click handlers
Catch SomeException in IHaskell.Eval.Evaluate.capturedIO
Click handlers can now use error and undefined.
All exceptions are caught, which might also cause problems.
2015-06-10 14:56:25 +05:30
Sumit Sahrawat
a8bba358f8 Finalize IHaskell.Display.Widgets.Button
* Add explicit export list
* Provide direct access to click handlers
* Rename getButtonText to getButtonLabel
2015-06-10 13:41:10 +05:30
Sumit Sahrawat
8c2b9a4e68 Send status updates for comm replies 2015-06-10 02:17:16 +05:30
Sumit Sahrawat
c76feb6fc5 Seamless outputs from buttons
It just works.
2015-06-10 01:55:27 +05:30
Sumit Sahrawat
e253c8481f Separate out publish to a module
Separate out publish to IHaskell.Publish
Replace publish with publishResult, which also requires more arguments.
2015-06-09 14:02:59 +05:30
Sumit Sahrawat
b1efbc1c39 Fix kernel death on opening notebooks with widgets
Previously, the kernel would die when opening a notebook with widgets
as there is no widget stored in the kernel when it starts.
2015-06-05 14:19:57 +05:30
Sumit Sahrawat
648007a4f3 Remove displayWidget
It wasn't even working. The displays were being generated due to the
sendWidgetView call from display for Button.
2015-06-05 14:05:58 +05:30
Sumit Sahrawat
de3d71e095 Reorder arguments
All functions now accept a Button as their first argument.
2015-06-05 13:38:05 +05:30
Sumit Sahrawat
ba05744db4 Seamless click handling
Evaluate accumulated widget messages in the Ghc Monad, after a comm_msg
recieved from the frontend is handled.
2015-06-05 12:24:17 +05:30
Sumit Sahrawat
37e4c2a634 Move some functions around
- Move dupHeader to IHaskell.Types
- Move handleMessage and widgetHandler to IHaskell.Eval.Widgets
- Make handleMessage and widgetHandler more flexible
2015-06-05 11:15:09 +05:30
Sumit Sahrawat
83919dc624 Let there be buttons
Buttons were seen in the notebook. It seems that an empty label was the
culprit, even though IPython somehow manages to accept empty strings.
2015-06-05 00:53:32 +05:30
Sumit Sahrawat
42907a5bb4 Conform to the messaging spec
Still no visible outputs.
2015-06-04 12:39:16 +05:30
Sumit Sahrawat
67406e3031 Add Typeable instance for WidgetMsg
Fix build issue with ghc <7.10
2015-06-03 08:53:53 +05:30
Sumit Sahrawat
9bd90e8e3a Fix IHaskell.Eval.Widgets not in scope 2015-06-02 14:30:23 +05:30
Sumit Sahrawat
48c3a6a545 Flesh out the button implementation 2015-06-02 13:05:46 +05:30
Sumit Sahrawat
d9a5d4b3b1 Minimal implementation of Buttons 2015-06-02 12:38:51 +05:30
Sumit Sahrawat
1ab66f3535 Basic framework for widgets 2015-06-02 12:38:51 +05:30
Andrew Gibiansky
388d819e16 Updating README with info about cabal exec for sandboxes 2015-05-31 17:04:58 +02:00
Andrew Gibiansky
a7f5e80d95 Merge pull request #507 from gibiansky/remove-dependencies
Remove dependencies
2015-05-29 16:38:18 +02:00
Andrew Gibiansky
397f5656d3 Remove MissingH from test suite 2015-05-29 15:42:02 +02:00
Andrew Gibiansky
0b6185ee8f Specify a type to deal with FTP 2015-05-29 13:55:30 +02:00
Andrew Gibiansky
7cb8a2cafc Fixing formatting 2015-05-29 13:20:45 +02:00
Andrew Gibiansky
e86272af10 Removing MissingH 2015-05-29 13:14:49 +02:00
Andrew Gibiansky
17582024bc Merge pull request #506 from gibiansky/limit-dependencies
Get rid of system-filepath
2015-05-29 12:27:33 +02:00
Andrew Gibiansky
0996bef82f Fix formatting 2015-05-29 11:21:49 +02:00
Andrew Gibiansky
33dcfcc973 Make test suite not use system-filepath 2015-05-27 23:45:28 +02:00
Andrew Gibiansky
36de4c2b99 Get rid of system-filepath 2015-05-27 20:45:49 +02:00
Andrew Gibiansky
e75e44636f Remove debugging code (the Typeable printer) 2015-05-27 20:44:54 +02:00
Andrew Gibiansky
1e18f31ba8 Fixing formatting issues, again 2015-05-27 19:20:22 +02:00
Andrew Gibiansky
6df3ee72bb Fixing kernel death, closes #505 2015-05-27 18:31:37 +02:00
Andrew Gibiansky
f42f8645b8 More debug info 2015-05-27 10:59:19 +02:00
Andrew Gibiansky
fad19c4ea5 Merge pull request #503 from gibiansky/no-classy-prelude
No more classy prelude
2015-05-26 18:54:15 +02:00
Andrew Gibiansky
4a4f7c8c0e Merge pull request #504 from sumitsahrawat/no-classy-prelude
Fix formatting in IHaskell/Eval/Evaluate.hs
2015-05-26 18:54:01 +02:00
Sumit Sahrawat
4b501a2dae Fix formatting in IHaskell/Eval/Evaluate.hs 2015-05-26 21:26:40 +05:30
Andrew Gibiansky
b7b0613249 Fix liftio in completion.hs 2015-05-26 10:59:36 +02:00
Andrew Gibiansky
543005c9a2 More ghc 76 fixes 2015-05-26 10:35:21 +02:00
Andrew Gibiansky
2412d4b127 Fix build: dont import liftIO in ghc 7.6 from ghcmonad 2015-05-26 10:17:42 +02:00
Andrew Gibiansky
154054456d Removing some FTP exports from IH prelude 2015-05-25 23:44:22 +02:00
Andrew Gibiansky
6d3f28ae42 Reformatting code to match hindent 2015-05-25 23:42:34 +02:00
Andrew Gibiansky
831bf1bedb Fix some build issues 2015-05-25 22:50:23 +02:00
Andrew Gibiansky
9be2157984 Removing classy-prelude from ihaskell-displays 2015-05-25 21:46:16 +02:00
Andrew Gibiansky
ea3839933c Removing ihaskell widgets 2015-05-25 21:46:03 +02:00