How to put constraints on type variable of kind `Constraint`?
问题 I'm playing around with the ConstraintKinds extension of GHC. I have the following data type, which is just a box for things fulfilling some one parameter constraint c : data Some (c :: * -> Constraint) where Some :: forall a. c a => a -> Some c For example, I could construct a box with some kind of number (arguably not very useful). x :: Some Num x = Some (1 :: Int) Now, as long as c includes the constraint Show , I could provide an instance of Show (Some c) . instance ??? => Show (Some c)