Morally, this class is for GADTs whose indices can be finitely
enumerated. An ArgDict c f instance allows us to do two things:
ConstraintsFor requests the set of constraints
c afor all possible typesathat could be applied tof.argDict selects a specific
c agiven a value of typef a.
Use deriveArgDict to derive instances of this class.
Associated types
type family ConstraintsFor (f :: k -> Type) (c :: k -> Constraint) :: ConstraintApply
cto each possible typeathat could appear in af a.ConstraintsFor Show Tag = (Show Int, Show Bool)
Methods
argDict :: ConstraintsFor f c => f a -> Dict (c a)Use an
f ato select a specific dictionary fromConstraintsFor f c.argDict I :: Dict (Show Int)