I was working through LYAH and I wanted to extend on the Type-foo chapter. I came up with the following type:
data Frank a b = Frank {first :: a b, second :: b}
-- Frank :: (* -> *) -> * -> *
-- Frank :: a b -> b -> Frank a b
And I wanted to make it an instance of the Tofu class:
class Tofu t where -- Tofu :: ((* -> *) -> * -> *) -> Constraint
tofu :: a b -> t a b
Can anyone come up with a simple instance?