I want just
class Trivial t
instance Trivial t
This is of course useless in Haskell 98 since you can just omit the constraint; but with ConstraintKinds
we can have explicitly required arguments of kind * -> Constraint
. Ideally, I would like to just define this as an "anonymous type-level function" \type a -> ()
, but that's evidently not possible.
What should I do, use something predefined or just define that class locally right where I need it (as nobody will need to access it because the instance is universal, that seems quite ok as well)?
type (-->) = ConstrainedCategory (->) Trivial
. There, it is basically just needed to avoid a conflicting MPTC-FunDep of the non-endo–functor instance of the optionally-invertible function type, but I intend to make more general use of it. – Bestialize() :: Constraint
is the trivial constraint. – JehiahConstraint
, but type constraints are in fact of kind* -> Constraint
. Which can't be defined quite as easily as(\_ -> ()) :: a -> ()
. – Bestialize