ekmett / free

free monads
http://hackage.haskell.org/package/free
Other
159 stars 65 forks source link

ComonadTraced instance for CofreeT #192

Open hololeap opened 4 years ago

hololeap commented 4 years ago

Is there any reason why there is no ComonadTraced instance for CofreeT? This seems like the obvious implementation, but I'm not sure if it would break the semantics for ComonadTraced:

instance (ComonadTraced m w, Functor f) => ComonadTraced m (CofreeT f w) where
    trace m = (\(a :< _) -> a) . trace m . runCofreeT

I also have similar questions about ComonadEnv and ComonadStore.