Protocol.hs: base protocol typeclass