Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Pick
- = One
- | AtleastOne
- | Many
- type family Selected (p :: Pick) (a :: Type) :: Type where ...
- data Choice (p :: Pick) a = Choice {}
- class DemotePick (p :: Pick) where
- demotePick :: Pick
- class SetLike f where
- class (forall v. Eq v => Eq (f v), forall w. Show w => Show (f w), forall x. Ord x => Ord (f x), forall y. (Ord y, Semigroup y) => Semigroup (f y), forall z. (Ord z, Arbitrary z) => Arbitrary (f z)) => Propable1Set f
- newtype ApplyOrd f a = ApplyOrd {
- unApplyOrd :: f a
- setLikeLaws :: (SetLike f, forall c. Eq c => Eq (f c), forall d. Show d => Show (f d), forall e. (Arbitrary e, Ord e) => Arbitrary (f e)) => proxy f -> Laws
- setFunctorComposition :: forall proxy f. (SetLike f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Property
- setFunctorIdentity :: forall proxy f. (SetLike f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Property
- setFunctorConst :: forall proxy f. (SetLike f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Property
- class (Propable1Ord (f p), Propable0 (Selected p Integer), DemotePick p, PickToSet p, Selection f p) => PropableChoice f p
- selectionLaws :: forall proxy f (p :: Pick). (Selection f p, PickToSet p, Propable1Ord (f p), Propable0 (Selected p Integer)) => proxy (f p) -> Laws
- selectionIsAnOption :: forall proxy f (p :: Pick). (Selection f p, PickToSet p, Propable1Ord (f p)) => proxy (f p) -> Property
- selectedAndUnselectedAreExclusive :: forall proxy f (p :: Pick). (Selection f p, PickToSet p, Propable1Ord (f p)) => proxy (f p) -> Property
- selectIsAnOption :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property
- selectIdempotence :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property
- selectIsNotUnselected :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property
- selectSelectedIdentity :: forall proxy f (p :: Pick). (Selection f p, Propable0 (Selected p Integer)) => proxy (f p) -> Property
- unSelectedWithOptionsIdentity :: forall proxy f (p :: Pick). (Selection f p, Propable0 (Selected p Integer)) => proxy (f p) -> Property
- retainPreserves :: forall proxy f (p :: Pick). (Selection f p, PickToSet p) => proxy (f p) -> Property
- retainSets :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property
- ftoSet :: (Ord a, Foldable g) => g a -> Set a
- class PickToSet (p :: Pick) where
- class PickToSelected (p :: Pick) where
- pickToSelected' :: Ord a => Proxy p -> a -> Selected p a
- pickToSelected :: forall (p :: Pick) a. (Ord a, PickToSelected p) => a -> Selected p a
- class (SetLike (f p), PickToSelected p) => Selection f (p :: Pick) where
- select' :: forall f (p :: Pick) a. (Selection f p, Ord a) => f p a -> a -> f p a
- withOptions' :: forall f (p :: Pick) a g. (Selection f p, Ord a, Foldable g) => a -> g a -> f p a
- retain' :: (Ord a, Deselection f p, Foldable g) => f p a -> g a -> f p a
- type family ToS (p :: Pick) :: Type -> Type where ...
- class Selection f p => Deselection f (p :: Pick) where
- noselection :: (Foldable g, Ord a) => g a -> f p a
- deselect :: Ord a => f p a -> f p a
- class (Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Monoid (Selected p (Sum Int)), DemotePick p, PickToSet p, Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p), Selection f p) => PropableChoiceDe f p
- deselectionLaws :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Monoid (Selected p (Sum Int)), Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p), DemotePick p) => proxy (f p) -> Laws
- idempotenceSelect :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p)) => proxy (f p) -> Property
- deselectFullSet :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p)) => proxy (f p) -> Property
- dselectSelectSelectedIdentity :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int))) => proxy (f p) -> Property
- selectedDeselectAnnihliation :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Monoid (Selected p (Sum Int))) => proxy (f p) -> Property
- deselectKeeps :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p)) => proxy (f p) -> Property
- unselectedPasses :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p)) => proxy (f p) -> Property
- next :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a
- nextLoop :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a
- prev :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a
- prevLoop :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a
- selectAll :: Choice Many a -> Choice Many a
- unsafeSelectFirst :: (Selection f p, Ord a) => f p a -> f p a
- unsafeSelectLast :: (Selection f p, Ord a) => f p a -> f p a
- selectFirst :: (Selection f p, Ord a) => f p a -> Maybe (f p a)
- selectLast :: (Selection f p, Ord a) => f p a -> Maybe (f p a)
- fullset :: (Bounded a, Enum a) => Set a
- fullOptions :: (Deselection f p, Bounded a, Enum a, Ord a) => f p a
- fullOptionsMin :: (Selection f p, Bounded a, Enum a, Ord a) => f p a
- fullOptionsMax :: (Selection f p, Bounded a, Enum a, Ord a) => f p a
- fromNonEmpty :: (Selection f p, Ord a) => NonEmpty a -> f p a
- selectWhen :: (SetLike g, Selection f Many, Ord a) => (a -> Bool) -> g a -> Maybe (f Many a)
- selectFirstWhen :: (SetLike g, Deselection f p, Ord a) => (a -> Bool) -> g a -> Maybe (f p a)
- selectLastWhen :: (SetLike g, Deselection f p, Ord a) => (a -> Bool) -> g a -> Maybe (f p a)
- toList :: (SetLike f, Ord a) => f a -> [a]
- singleton :: (Selection f p, Ord a) => a -> f p a
- before :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> Set a
- unsafeSelectAt :: (SetLike g, Selection f AtleastOne, Ord a) => Int -> g a -> f AtleastOne a
- getIndex :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> Int
- after :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> Set a
- size :: (SetLike g, Ord a) => g a -> Int
- insert :: (Selection f p, Ord a) => a -> f p a -> f p a
- delete :: (Compactable (f p), Ord a) => a -> f p a -> f p a
- addSelection :: (Selection f Many, Ord a) => a -> f Many a -> f Many a
- deselectMany :: (Compactable (f p), Ord a) => Set a -> f p a -> f p a
Documentation
Instances
data Choice (p :: Pick) a Source #
Instances
class DemotePick (p :: Pick) where Source #
demotePick :: Pick Source #
Instances
DemotePick One Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice demotePick :: Pick Source # | |
DemotePick AtleastOne Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice demotePick :: Pick Source # | |
DemotePick Many Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice demotePick :: Pick Source # |
class SetLike f where Source #
Laws:
a == b ==> toSet a == toSet b -- toSet is injective
toSet (smap f s) == fmap f (toSet s)
if valid s then Set.valid (toSet s)
Instances
SetLike Maybe Source # | |
SetLike Set Source # | |
SetLike (Choice One) Source # | |
SetLike (Choice AtleastOne) Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice | |
SetLike (Choice Many) Source # | |
(Considered p ~ Maybe, SetLike (Choice p)) => SetLike (ConsideredChoice p) Source # | |
Defined in Shpadoinkle.Widgets.Types.ConsideredChoice toSet :: Ord a => ConsideredChoice p a -> Set a Source # smap :: Ord b => (a -> b) -> ConsideredChoice p a -> ConsideredChoice p b Source # | |
SetLike (ConsideredChoice Many) Source # | |
Defined in Shpadoinkle.Widgets.Types.ConsideredChoice | |
SetLike (ConsideredChoice p) => SetLike (Dropdown p) Source # | |
Legal SetLike Source # | |
type Justice SetLike (f :: Type -> Type) Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice |
class (forall v. Eq v => Eq (f v), forall w. Show w => Show (f w), forall x. Ord x => Ord (f x), forall y. (Ord y, Semigroup y) => Semigroup (f y), forall z. (Ord z, Arbitrary z) => Arbitrary (f z)) => Propable1Set f Source #
ApplyOrd | |
|
setLikeLaws :: (SetLike f, forall c. Eq c => Eq (f c), forall d. Show d => Show (f d), forall e. (Arbitrary e, Ord e) => Arbitrary (f e)) => proxy f -> Laws Source #
setFunctorComposition :: forall proxy f. (SetLike f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Property Source #
setFunctorIdentity :: forall proxy f. (SetLike f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Property Source #
setFunctorConst :: forall proxy f. (SetLike f, forall a. Eq a => Eq (f a), forall a. Show a => Show (f a), forall a. (Arbitrary a, Ord a) => Arbitrary (f a)) => proxy f -> Property Source #
class (Propable1Ord (f p), Propable0 (Selected p Integer), DemotePick p, PickToSet p, Selection f p) => PropableChoice f p Source #
Instances
(Propable1Ord (f p), Propable0 (Selected p Integer), DemotePick p, PickToSet p, Selection f p) => PropableChoice f p Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice |
selectionLaws :: forall proxy f (p :: Pick). (Selection f p, PickToSet p, Propable1Ord (f p), Propable0 (Selected p Integer)) => proxy (f p) -> Laws Source #
selectionIsAnOption :: forall proxy f (p :: Pick). (Selection f p, PickToSet p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
selectedAndUnselectedAreExclusive :: forall proxy f (p :: Pick). (Selection f p, PickToSet p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
selectIsAnOption :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
selectIdempotence :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
selectIsNotUnselected :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
selectSelectedIdentity :: forall proxy f (p :: Pick). (Selection f p, Propable0 (Selected p Integer)) => proxy (f p) -> Property Source #
unSelectedWithOptionsIdentity :: forall proxy f (p :: Pick). (Selection f p, Propable0 (Selected p Integer)) => proxy (f p) -> Property Source #
retainPreserves :: forall proxy f (p :: Pick). (Selection f p, PickToSet p) => proxy (f p) -> Property Source #
retainSets :: forall proxy f (p :: Pick). (Selection f p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
class PickToSelected (p :: Pick) where Source #
Instances
PickToSelected One Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice | |
PickToSelected AtleastOne Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice pickToSelected' :: Ord a => Proxy AtleastOne -> a -> Selected AtleastOne a Source # | |
PickToSelected Many Source # | |
Defined in Shpadoinkle.Widgets.Types.Choice |
pickToSelected :: forall (p :: Pick) a. (Ord a, PickToSelected p) => a -> Selected p a Source #
class (SetLike (f p), PickToSelected p) => Selection f (p :: Pick) where Source #
select :: Ord a => f p a -> Selected p a -> f p a Source #
unselected :: Ord a => f p a -> Set a Source #
selected :: Ord a => f p a -> Selected p a Source #
withOptions :: (Foldable g, Ord a) => Selected p a -> g a -> f p a Source #
Instances
withOptions' :: forall f (p :: Pick) a g. (Selection f p, Ord a, Foldable g) => a -> g a -> f p a Source #
class Selection f p => Deselection f (p :: Pick) where Source #
noselection :: (Foldable g, Ord a) => g a -> f p a Source #
Instances
class (Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Monoid (Selected p (Sum Int)), DemotePick p, PickToSet p, Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p), Selection f p) => PropableChoiceDe f p Source #
deselectionLaws :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Monoid (Selected p (Sum Int)), Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p), DemotePick p) => proxy (f p) -> Laws Source #
idempotenceSelect :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
deselectFullSet :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p)) => proxy (f p) -> Property Source #
dselectSelectSelectedIdentity :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int))) => proxy (f p) -> Property Source #
selectedDeselectAnnihliation :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Monoid (Selected p (Sum Int))) => proxy (f p) -> Property Source #
deselectKeeps :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p)) => proxy (f p) -> Property Source #
unselectedPasses :: forall proxy f (p :: Pick). (Deselection f p, Propable1Ord (f p), Propable0 (Selected p (Sum Int)), Selected p (Sum Int) ~ ToS p (Sum Int), SetLike (ToS p)) => proxy (f p) -> Property Source #
next :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a Source #
nextLoop :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a Source #
prev :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a Source #
prevLoop :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> f AtleastOne a Source #
unsafeSelectFirst :: (Selection f p, Ord a) => f p a -> f p a Source #
unsafeSelectLast :: (Selection f p, Ord a) => f p a -> f p a Source #
fullOptions :: (Deselection f p, Bounded a, Enum a, Ord a) => f p a Source #
selectWhen :: (SetLike g, Selection f Many, Ord a) => (a -> Bool) -> g a -> Maybe (f Many a) Source #
selectFirstWhen :: (SetLike g, Deselection f p, Ord a) => (a -> Bool) -> g a -> Maybe (f p a) Source #
selectLastWhen :: (SetLike g, Deselection f p, Ord a) => (a -> Bool) -> g a -> Maybe (f p a) Source #
before :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> Set a Source #
unsafeSelectAt :: (SetLike g, Selection f AtleastOne, Ord a) => Int -> g a -> f AtleastOne a Source #
getIndex :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> Int Source #
after :: (Selection f AtleastOne, Ord a) => f AtleastOne a -> Set a Source #
delete :: (Compactable (f p), Ord a) => a -> f p a -> f p a Source #
deselectMany :: (Compactable (f p), Ord a) => Set a -> f p a -> f p a Source #