Something like:
type family Foo (x :: * -> *) :: * where Foo Int = Bool Foo Char = String foo1 :: forall x . Foo x => x -> Bool foo1 i = case cast i of { Int -> True ; _ -> False } — ^ This works because `Foo` has been declared as an instance of `Functor` foo2 :: forall x
https://t.co/bQPJYtfHZ7