| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ghci.Server.Websockets.Message
Documentation
This module provides the Message data type, and various constructors for
it. It is intended to be used together with the 'html/index.html' file.
Usage
- Start a GHCi session and run
initialiseDef - Open
html/index.htmlin a browser (it's self-contained, no http server required) - Use
sendText,sendHtmlandsendPlotto show things in the browser window.
sendPlot :: [(Double, Double)] -> IO () Source #
Show a Plotly 2D line plot of the given points.
>>>sendPlot [(1, 2), (2, 5), (3, 4), (4, 3)]
>>>sendPlot $ fmap (\i -> let i' = (fromIntegral i / 10) in (i', sin i')) [1..100]
Constructors
| MsgText Text | A string |
| MsgHtml Text | An HTML fragment |
| MsgPlotly [Value] Value | The 'data' and |