@@ -698,41 +698,3 @@ instance HasValue (Dropdown t k) where
698instance HasValue (Checkbox t) where
698instance HasValue (Checkbox t) where
699 type Value (Checkbox t) = Dynamic t Bool
699 type Value (Checkbox t) = Dynamic t Bool
700 value = _checkbox_value
700 value = _checkbox_value
703−type family Controller sm t a where
704− Controller Edit t a = (a, Event t a) -- Initial value and setter
705− Controller View t a = Dynamic t a -- Value (always)
707−type family Output sm t a where
708− Output Edit t a = Dynamic t a -- Value (always)
709− Output View t a = Event t a -- Requested changes
711−data CheckboxConfig sm t
712− = CheckboxConfig { _checkbox_input :: Controller sm t Bool
713− , _checkbox_attributes :: Attributes
716−instance Reflex t => Default (CheckboxConfig Edit t) where
717− def = CheckboxConfig (False, never) mempty
720− = Checkbox { _checkbox_output :: Output sm t Bool
723−data StateMode = Edit | View
725−--TODO: There must be a more generic way to get this witness and allow us to case on the type-level StateMode
726−data StateModeWitness (sm :: StateMode) where
727− EditWitness :: StateModeWitness Edit
728− ViewWitness :: StateModeWitness View
730−class HasStateModeWitness (sm :: StateMode) where
731− stateModeWitness :: StateModeWitness sm
733−instance HasStateModeWitness Edit where
734− stateModeWitness = EditWitness
736−instance HasStateModeWitness View where
737− stateModeWitness = ViewWitness