Commit bcc861ae authored by Sumit Sahrawat's avatar Sumit Sahrawat

Formatting fixes

parent 6a226ce3
...@@ -89,8 +89,8 @@ import qualified IHaskell.Display.Widgets.Singletons as S ...@@ -89,8 +89,8 @@ import qualified IHaskell.Display.Widgets.Singletons as S
import IHaskell.Display.Widgets.Common import IHaskell.Display.Widgets.Common
-- Classes from IPython's widget hierarchy. Defined as such to reduce code duplication. -- Classes from IPython's widget hierarchy. Defined as such to reduce code duplication.
type WidgetClass = '[S.ViewModule, S.ViewName, S.ModelModule, S.ModelName, S.MsgThrottle, S.Version, type WidgetClass = '[S.ViewModule, S.ViewName, S.ModelModule, S.ModelName,
S.DisplayHandler] S.MsgThrottle, S.Version, S.DisplayHandler]
type DOMWidgetClass = WidgetClass :++ '[S.Visible, S.CSS, S.DOMClasses, S.Width, S.Height, S.Padding, type DOMWidgetClass = WidgetClass :++ '[S.Visible, S.CSS, S.DOMClasses, S.Width, S.Height, S.Padding,
S.Margin, S.Color, S.BackgroundColor, S.BorderColor, S.BorderWidth, S.Margin, S.Color, S.BackgroundColor, S.BorderColor, S.BorderWidth,
...@@ -239,8 +239,9 @@ data WidgetType = ButtonType ...@@ -239,8 +239,9 @@ data WidgetType = ButtonType
| TextAreaType | TextAreaType
| CheckBoxType | CheckBoxType
| ToggleButtonType | ToggleButtonType
|
-- TODO: Add 'Valid' widget -- TODO: Add 'Valid' widget
| DropdownType DropdownType
| RadioButtonsType | RadioButtonsType
| SelectType | SelectType
| ToggleButtonsType | ToggleButtonsType
...@@ -255,8 +256,9 @@ data WidgetType = ButtonType ...@@ -255,8 +256,9 @@ data WidgetType = ButtonType
| FloatSliderType | FloatSliderType
| FloatProgressType | FloatProgressType
| FloatRangeSliderType | FloatRangeSliderType
|
-- TODO: Add Proxy and PlaceProxy -- TODO: Add Proxy and PlaceProxy
| BoxType BoxType
| FlexBoxType | FlexBoxType
| AccordionType | AccordionType
| TabType | TabType
...@@ -290,7 +292,8 @@ type family WidgetFields (w :: WidgetType) :: [Field] where ...@@ -290,7 +292,8 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
WidgetFields IntSliderType = WidgetFields IntSliderType =
BoundedIntClass :++ BoundedIntClass :++
'[S.Orientation, S.ShowRange, S.ReadOut, S.SliderColor] '[S.Orientation, S.ShowRange, S.ReadOut, S.SliderColor]
WidgetFields IntProgressType = BoundedIntClass :++ '[S.Orientation, S.BarStyle] WidgetFields IntProgressType =
BoundedIntClass :++ '[S.Orientation, S.BarStyle]
WidgetFields IntRangeSliderType = WidgetFields IntRangeSliderType =
BoundedIntRangeClass :++ BoundedIntRangeClass :++
'[S.Orientation, S.ShowRange, S.ReadOut, S.SliderColor] '[S.Orientation, S.ShowRange, S.ReadOut, S.SliderColor]
......
...@@ -97,7 +97,8 @@ instance ToJSON Message where ...@@ -97,7 +97,8 @@ instance ToJSON Message where
object ["prompt" .= prompt] object ["prompt" .= prompt]
toJSON req@CommOpen{} = toJSON req@CommOpen{} =
object [ "comm_id" .= commUuid req object
[ "comm_id" .= commUuid req
, "target_name" .= commTargetName req , "target_name" .= commTargetName req
, "target_module" .= commTargetModule req , "target_module" .= commTargetModule req
, "data" .= commData req , "data" .= commData req
......
...@@ -65,8 +65,8 @@ class IHaskellDisplay a where ...@@ -65,8 +65,8 @@ class IHaskellDisplay a where
-- | Display as an interactive widget. -- | Display as an interactive widget.
class IHaskellDisplay a => IHaskellWidget a where class IHaskellDisplay a => IHaskellWidget a where
-- | Target name for this widget. The actual input parameter should be ignored. By default -- | Target name for this widget. The actual input parameter should be ignored. By default evaluate
-- evaluate to "ipython.widget", which is used by IPython for its backbone widgets. -- to "ipython.widget", which is used by IPython for its backbone widgets.
targetName :: a -> String targetName :: a -> String
targetName _ = "ipython.widget" targetName _ = "ipython.widget"
......
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