Unverified Commit e432009b authored by Vaibhav Sagar's avatar Vaibhav Sagar Committed by GitHub

Merge pull request #931 from erikd/topic/widget-tll-warnings

ihaskell-widgets: Fix more warnings
parents 87787ec7 b27867f6
...@@ -16,9 +16,6 @@ ...@@ -16,9 +16,6 @@
{-# LANGUAGE AutoDeriveTypeable #-} {-# LANGUAGE AutoDeriveTypeable #-}
{-# LANGUAGE CPP #-} {-# LANGUAGE CPP #-}
-- Can't make the compiler accept this file without this.
{-# OPTIONS_GHC -fno-warn-unticked-promoted-constructors #-}
-- | This module houses all the type-trickery needed to make widgets happen. -- | This module houses all the type-trickery needed to make widgets happen.
-- --
-- All widgets have a corresponding 'WidgetType', and some fields/attributes/properties as defined -- All widgets have a corresponding 'WidgetType', and some fields/attributes/properties as defined
...@@ -300,12 +297,17 @@ type family WidgetFields (w :: WidgetType) :: [Field] where ...@@ -300,12 +297,17 @@ type family WidgetFields (w :: WidgetType) :: [Field] where
WidgetFields 'LabelType = StringClass WidgetFields 'LabelType = StringClass
WidgetFields 'TextType = WidgetFields 'TextType =
StringClass :++ ['S.SubmitHandler, 'S.ChangeHandler] StringClass :++ ['S.SubmitHandler, 'S.ChangeHandler]
WidgetFields 'TextAreaType = StringClass :++ '[S.ChangeHandler]
-- Type level lists with a single element need both the list and the
-- constructor ticked, and a space between the open square bracket and
-- the first constructor. See https://ghc.haskell.org/trac/ghc/ticket/15601
WidgetFields 'TextAreaType = StringClass :++ '[ 'S.ChangeHandler]
WidgetFields 'CheckBoxType = BoolClass WidgetFields 'CheckBoxType = BoolClass
WidgetFields 'ToggleButtonType = WidgetFields 'ToggleButtonType =
BoolClass :++ ['S.Tooltip, 'S.Icon, 'S.ButtonStyle] BoolClass :++ ['S.Tooltip, 'S.Icon, 'S.ButtonStyle]
WidgetFields 'ValidType = BoolClass :++ '[S.ReadOutMsg] WidgetFields 'ValidType = BoolClass :++ '[ 'S.ReadOutMsg]
WidgetFields 'DropdownType = SelectionClass :++ '[S.ButtonStyle] WidgetFields 'DropdownType = SelectionClass :++ '[ 'S.ButtonStyle]
WidgetFields 'RadioButtonsType = SelectionClass WidgetFields 'RadioButtonsType = SelectionClass
WidgetFields 'SelectType = SelectionClass WidgetFields 'SelectType = SelectionClass
WidgetFields 'ToggleButtonsType = WidgetFields 'ToggleButtonsType =
......
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