witness-0.6.2: values that witness types
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Type.Witness.Specific.Some

Synopsis

Documentation

data SomeFor f w Source #

Any value with a witness to a parameter of its type.

Constructors

forall a. MkSomeFor (w a) (f a) 

Instances

Instances details
(TestEquality w, WitnessConstraint Eq w) => Eq (SomeOf w) Source # 
Instance details

Defined in Data.Type.Witness.Specific.Some

Methods

(==) :: SomeOf w -> SomeOf w -> Bool #

(/=) :: SomeOf w -> SomeOf w -> Bool #

AllConstraint Show w => Show (Some w) Source # 
Instance details

Defined in Data.Type.Witness.Specific.Some

Methods

showsPrec :: Int -> Some w -> ShowS #

show :: Some w -> String #

showList :: [Some w] -> ShowS #

(TestEquality w, FiniteWitness w) => Countable (Some w) Source # 
Instance details

Defined in Data.Type.Witness.General.Finite

Methods

countPrevious :: Some w -> Maybe (Some w) #

countMaybeNext :: Maybe (Some w) -> Maybe (Some w) #

(TestEquality w, FiniteWitness w) => Finite (Some w) Source # 
Instance details

Defined in Data.Type.Witness.General.Finite

Methods

allValues :: [Some w] #

assemble :: forall b f. Applicative f => (Some w -> f b) -> f (Some w -> b) #

(TestEquality w, FiniteWitness w) => Searchable (Some w) Source # 
Instance details

Defined in Data.Type.Witness.General.Finite

Methods

search :: (Some w -> Maybe b) -> Maybe b #

TestEquality w => Eq (Some w) Source # 
Instance details

Defined in Data.Type.Witness.Specific.Some

Methods

(==) :: Some w -> Some w -> Bool #

(/=) :: Some w -> Some w -> Bool #

TestOrder w => Ord (Some w) Source # 
Instance details

Defined in Data.Type.Witness.Specific.Some

Methods

compare :: Some w -> Some w -> Ordering #

(<) :: Some w -> Some w -> Bool #

(<=) :: Some w -> Some w -> Bool #

(>) :: Some w -> Some w -> Bool #

(>=) :: Some w -> Some w -> Bool #

max :: Some w -> Some w -> Some w #

min :: Some w -> Some w -> Some w #

mapSome :: forall k (g :: k -> Type) (w1 :: k -> Type) (w2 :: k -> Type). (forall t. w1 t -> w2 t) -> SomeFor g w1 -> SomeFor g w2 Source #

matchSomeFor :: TestEquality w => w a -> SomeFor f w -> Maybe (f a) Source #

pattern MkSomeOf :: w a -> a -> SomeOf w Source #

matchSomeOf :: forall (w :: Type -> Type) (a :: Type). TestEquality w => w a -> SomeOf w -> Maybe a Source #

type Some = SomeFor (Const ()) Source #

pattern MkSome :: w a -> Some w Source #

matchSome :: forall k (w :: k -> Type) (a :: k). TestEquality w => w a -> Some w -> Bool Source #

withSomeAllConstraint :: forall k (c :: Type -> Constraint) (w :: k -> Type) (r :: Type). AllConstraint c w => Some w -> (forall a. c (w a) => w a -> r) -> r Source #