`Void` codec?
i-am-tom opened this issue · comments
Tom Harding commented
Hi!
We have some data types that vary according to some type family:
type family T x
data D x = C1 (T x) | C2 Int
type instance T 'ThisWay = String
type instance T 'ThatWay = Void
Ideally, it would be great to be able to write instance HasCodec (T x) => HasCodec (D x)
, and have everything work merrily. However, I think we'd need HasCodec Void
. Would you be against this? Would you be interested in a PR?
Thanks!
Tom
Tom Sydney Kerckhove commented
I'm not against HasCodec Void
per-se, I think?
I thought about it for a bit and I can't come up with anything that can break so go for it!