These are chat archives for YoEight/eventstore

4th
Jan 2017
Akii
@Akii
Jan 04 2017 14:13
so after looking at it again today, there is absolutely no need for getEvTypes like at all
that was just me prematurely implementing something without thinking
Akii
@Akii
Jan 04 2017 14:22
class MessagePayload a where
  getMsgNamespace :: a -> Text
  getMsgConstr :: a -> Text

  default getMsgConstr :: (Data a) => a -> Text
  getMsgConstr = pack . showConstr . toConstr

  getMsgType :: a -> Text
  getMsgType a = getMsgNamespace a <> "." <> getMsgConstr a
the only thing a given data type needs to provide now is the namespace