freer-simple icon indicating copy to clipboard operation
freer-simple copied to clipboard

`runTrace` does not compose with other effects

Open re-xyr opened this issue 4 years ago • 0 comments

Current function signature of runTrace is

runTrace :: Eff '[Trace] a -> IO a

which is less composable than

runTrace :: LastMember IO es => Eff (Trace ': es) a -> Eff es a
runTrace = interpret \case
  Trace s -> sendM $ putStrLn s

Do you think it'll be better to change it to that?

re-xyr avatar Sep 25 '21 03:09 re-xyr