Commit 3cca0604 authored by David Davó's avatar David Davó

Unified widget builders naming convention

parent e2e48624
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Bool.Valid ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Bool.Valid
( -- * The Valid Widget ( -- * The Valid Widget
ValidWidget ValidWidget
-- * Constructor -- * Constructor
, mkValidWidget , mkValid
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -32,8 +32,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -32,8 +32,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type ValidWidget = IPythonWidget 'ValidType type ValidWidget = IPythonWidget 'ValidType
-- | Create a new output widget -- | Create a new output widget
mkValidWidget :: IO ValidWidget mkValid :: IO ValidWidget
mkValidWidget = do mkValid = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Box.SelectionContainer.Tab ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Box.SelectionContainer.Tab
( -- * The Tab widget ( -- * The Tab widget
TabWidget TabWidget
-- * Constructor -- * Constructor
, mkTabWidget , mkTab
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -33,8 +33,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget ...@@ -33,8 +33,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget
type TabWidget = IPythonWidget 'TabType type TabWidget = IPythonWidget 'TabType
-- | Create a new box -- | Create a new box
mkTabWidget :: IO TabWidget mkTab :: IO TabWidget
mkTabWidget = do mkTab = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -148,7 +148,7 @@ liftToWidgets func rc initvals = do ...@@ -148,7 +148,7 @@ liftToWidgets func rc initvals = do
initializers = rmap extractInitializer rc initializers = rmap extractInitializer rc
bx <- mkBox bx <- mkBox
out <- mkOutputWidget out <- mkOutput
-- Create a list of widgets -- Create a list of widgets
widgets <- rtraverse createWidget constructors widgets <- rtraverse createWidget constructors
...@@ -214,7 +214,7 @@ instance FromWidget Text where ...@@ -214,7 +214,7 @@ instance FromWidget Text where
type SuitableField Text = 'S.StringValue type SuitableField Text = 'S.StringValue
data Argument Text = TextVal Text data Argument Text = TextVal Text
initializer w (TextVal txt) = setField w StringValue txt initializer w (TextVal txt) = setField w StringValue txt
wrapped = WrappedWidget mkTextWidget SubmitHandler StringValue wrapped = WrappedWidget mkText SubmitHandler StringValue
instance FromWidget Integer where instance FromWidget Integer where
type SuitableWidget Integer = 'IntSliderType type SuitableWidget Integer = 'IntSliderType
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Media.Audio ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Media.Audio
( -- * The Audio Widget ( -- * The Audio Widget
AudioWidget AudioWidget
-- * Constructor -- * Constructor
, mkAudioWidget , mkAudio
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -31,8 +31,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget ...@@ -31,8 +31,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget
type AudioWidget = IPythonWidget 'AudioType type AudioWidget = IPythonWidget 'AudioType
-- | Create a new audio widget -- | Create a new audio widget
mkAudioWidget :: IO AudioWidget mkAudio :: IO AudioWidget
mkAudioWidget = do mkAudio = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Media.Image ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Media.Image
( -- * The Image Widget ( -- * The Image Widget
ImageWidget ImageWidget
-- * Constructor -- * Constructor
, mkImageWidget , mkImage
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -31,8 +31,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget ...@@ -31,8 +31,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget
type ImageWidget = IPythonWidget 'ImageType type ImageWidget = IPythonWidget 'ImageType
-- | Create a new image widget -- | Create a new image widget
mkImageWidget :: IO ImageWidget mkImage :: IO ImageWidget
mkImageWidget = do mkImage = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Media.Video ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Media.Video
( -- * The Video Widget ( -- * The Video Widget
VideoWidget VideoWidget
-- * Constructor -- * Constructor
, mkVideoWidget , mkVideo
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -31,8 +31,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget ...@@ -31,8 +31,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget
type VideoWidget = IPythonWidget 'VideoType type VideoWidget = IPythonWidget 'VideoType
-- | Create a new video widget -- | Create a new video widget
mkVideoWidget :: IO VideoWidget mkVideo :: IO VideoWidget
mkVideoWidget = do mkVideo = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Output ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.Output
( -- * The Output Widget ( -- * The Output Widget
OutputWidget OutputWidget
-- * Constructor -- * Constructor
, mkOutputWidget , mkOutput
-- * Using the output widget -- * Using the output widget
, appendStdout , appendStdout
, appendStderr , appendStderr
...@@ -40,8 +40,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget ...@@ -40,8 +40,8 @@ import IHaskell.Display.Widgets.Layout.LayoutWidget
type OutputWidget = IPythonWidget 'OutputType type OutputWidget = IPythonWidget 'OutputType
-- | Create a new output widget -- | Create a new output widget
mkOutputWidget :: IO OutputWidget mkOutput :: IO OutputWidget
mkOutputWidget = do mkOutput = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Combobox ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Combobox
( -- * The Combobox Widget ( -- * The Combobox Widget
ComboboxWidget ComboboxWidget
-- * Constructor -- * Constructor
, mkComboboxWidget , mkCombobox
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -33,8 +33,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -33,8 +33,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type ComboboxWidget = IPythonWidget 'ComboboxType type ComboboxWidget = IPythonWidget 'ComboboxType
-- | Create a new Combobox widget -- | Create a new Combobox widget
mkComboboxWidget :: IO ComboboxWidget mkCombobox :: IO ComboboxWidget
mkComboboxWidget = do mkCombobox = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.HTML ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.HTML
( -- * The HTML Widget ( -- * The HTML Widget
HTMLWidget HTMLWidget
-- * Constructor -- * Constructor
, mkHTMLWidget , mkHTML
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -30,8 +30,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -30,8 +30,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type HTMLWidget = IPythonWidget 'HTMLType type HTMLWidget = IPythonWidget 'HTMLType
-- | Create a new HTML widget -- | Create a new HTML widget
mkHTMLWidget :: IO HTMLWidget mkHTML :: IO HTMLWidget
mkHTMLWidget = do mkHTML = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.HTMLMath ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.HTMLMath
( -- * The HTMLMath Widget ( -- * The HTMLMath Widget
HTMLMathWidget HTMLMathWidget
-- * Constructor -- * Constructor
, mkHTMLMathWidget , mkHTMLMath
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -30,8 +30,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -30,8 +30,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type HTMLMathWidget = IPythonWidget 'HTMLMathType type HTMLMathWidget = IPythonWidget 'HTMLMathType
-- | Create a new HTML widget -- | Create a new HTML widget
mkHTMLMathWidget :: IO HTMLMathWidget mkHTMLMath :: IO HTMLMathWidget
mkHTMLMathWidget = do mkHTMLMath = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Label ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Label
( -- * The Label Widget ( -- * The Label Widget
LabelWidget LabelWidget
-- * Constructor -- * Constructor
, mkLabelWidget , mkLabel
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -30,8 +30,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -30,8 +30,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type LabelWidget = IPythonWidget 'LabelType type LabelWidget = IPythonWidget 'LabelType
-- | Create a new Label widget -- | Create a new Label widget
mkLabelWidget :: IO LabelWidget mkLabel :: IO LabelWidget
mkLabelWidget = do mkLabel = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Password ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Password
( -- * The Password Widget ( -- * The Password Widget
PasswordWidget PasswordWidget
-- * Constructor -- * Constructor
, mkPasswordWidget , mkPassword
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -32,8 +32,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -32,8 +32,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type PasswordWidget = IPythonWidget 'PasswordType type PasswordWidget = IPythonWidget 'PasswordType
-- | Create a new Password widget -- | Create a new Password widget
mkPasswordWidget :: IO PasswordWidget mkPassword :: IO PasswordWidget
mkPasswordWidget = do mkPassword = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Text ...@@ -9,7 +9,7 @@ module IHaskell.Display.Widgets.String.Text
( -- * The Text Widget ( -- * The Text Widget
TextWidget TextWidget
-- * Constructor -- * Constructor
, mkTextWidget , mkText
) where ) where
-- To keep `cabal repl` happy when running from the ihaskell repo -- To keep `cabal repl` happy when running from the ihaskell repo
...@@ -32,8 +32,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle ...@@ -32,8 +32,8 @@ import IHaskell.Display.Widgets.Style.DescriptionStyle
type TextWidget = IPythonWidget 'TextType type TextWidget = IPythonWidget 'TextType
-- | Create a new Text widget -- | Create a new Text widget
mkTextWidget :: IO TextWidget mkText :: IO TextWidget
mkTextWidget = do mkText = do
-- Default properties, with a random uuid -- Default properties, with a random uuid
wid <- U.random wid <- U.random
layout <- mkLayout layout <- mkLayout
......
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