Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gargantext-ihaskell
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
gargantext-ihaskell
Commits
bcc861ae
Commit
bcc861ae
authored
Sep 12, 2015
by
Sumit Sahrawat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Formatting fixes
parent
6a226ce3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
+20
-16
Singletons.hs
...askell-widgets/src/IHaskell/Display/Widgets/Singletons.hs
+1
-1
Types.hs
...ay/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
+11
-8
Writer.hs
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
+6
-5
Types.hs
src/IHaskell/Types.hs
+2
-2
No files found.
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Singletons.hs
View file @
bcc861ae
...
...
@@ -13,7 +13,7 @@ import Data.Singletons.TH
-- Widget properties
singletons
[
d
|
data Field = ViewModule
| ViewName
| ModelModule
...
...
ihaskell-display/ihaskell-widgets/src/IHaskell/Display/Widgets/Types.hs
View file @
bcc861ae
...
...
@@ -89,8 +89,8 @@ import qualified IHaskell.Display.Widgets.Singletons as S
import
IHaskell.Display.Widgets.Common
-- 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
,
S
.
DisplayHandler
]
type
WidgetClass
=
'[
S
.
ViewModule
,
S
.
ViewName
,
S
.
ModelModule
,
S
.
ModelName
,
S
.
MsgThrottle
,
S
.
Version
,
S
.
DisplayHandler
]
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
,
...
...
@@ -128,7 +128,7 @@ type BoxClass = DOMWidgetClass :++ '[S.Children, S.OverflowX, S.OverflowY, S.Box
type
SelectionContainerClass
=
BoxClass
:++
'[
S
.
Titles
,
S
.
SelectedIndex
,
S
.
ChangeHandler
]
-- Types associated with Fields.
type
family
FieldType
(
f
::
Field
)
::
*
where
FieldType
S
.
ViewModule
=
Text
FieldType
S
.
ViewName
=
Text
...
...
@@ -239,8 +239,9 @@ data WidgetType = ButtonType
|
TextAreaType
|
CheckBoxType
|
ToggleButtonType
-- TODO: Add 'Valid' widget
|
DropdownType
|
-- TODO: Add 'Valid' widget
DropdownType
|
RadioButtonsType
|
SelectType
|
ToggleButtonsType
...
...
@@ -255,8 +256,9 @@ data WidgetType = ButtonType
|
FloatSliderType
|
FloatProgressType
|
FloatRangeSliderType
-- TODO: Add Proxy and PlaceProxy
|
BoxType
|
-- TODO: Add Proxy and PlaceProxy
BoxType
|
FlexBoxType
|
AccordionType
|
TabType
...
...
@@ -290,7 +292,8 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
WidgetFields
IntSliderType
=
BoundedIntClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
WidgetFields
IntProgressType
=
BoundedIntClass
:++
'[
S
.
Orientation
,
S
.
BarStyle
]
WidgetFields
IntProgressType
=
BoundedIntClass
:++
'[
S
.
Orientation
,
S
.
BarStyle
]
WidgetFields
IntRangeSliderType
=
BoundedIntRangeClass
:++
'[
S
.
Orientation
,
S
.
ShowRange
,
S
.
ReadOut
,
S
.
SliderColor
]
...
...
ipython-kernel/src/IHaskell/IPython/Message/Writer.hs
View file @
bcc861ae
...
...
@@ -97,11 +97,12 @@ instance ToJSON Message where
object
[
"prompt"
.=
prompt
]
toJSON
req
@
CommOpen
{}
=
object
[
"comm_id"
.=
commUuid
req
,
"target_name"
.=
commTargetName
req
,
"target_module"
.=
commTargetModule
req
,
"data"
.=
commData
req
]
object
[
"comm_id"
.=
commUuid
req
,
"target_name"
.=
commTargetName
req
,
"target_module"
.=
commTargetModule
req
,
"data"
.=
commData
req
]
toJSON
req
@
CommData
{}
=
object
[
"comm_id"
.=
commUuid
req
,
"data"
.=
commData
req
]
...
...
src/IHaskell/Types.hs
View file @
bcc861ae
...
...
@@ -65,8 +65,8 @@ class IHaskellDisplay a where
-- | Display as an interactive widget.
class
IHaskellDisplay
a
=>
IHaskellWidget
a
where
-- | Target name for this widget. The actual input parameter should be ignored. By default
--
evaluate
to "ipython.widget", which is used by IPython for its backbone widgets.
-- | Target name for this widget. The actual input parameter should be ignored. By default
evaluate
-- to "ipython.widget", which is used by IPython for its backbone widgets.
targetName
::
a
->
String
targetName
_
=
"ipython.widget"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment