runDockerTrace
    :: forall r a.
      (Member Trace r, Member (Exception DockerEx) r)
    => Eff (Docker ': r) a
    -> Eff r a
runDockerTrace = handleRelay return handle
  where
    handle :: Handler Docker r a
    handle (RemoveImage img imgs) k = traceRemoveImage (img:imgs) >>= k
    handle (BuildImage path img)  k = traceBuildImage path img >>= k
    handle (TagImage img tag)     k = traceTagImage img tag >>= k
    handle (PushImage img)        k = tracePushImage img >>= k
    handle (PullImage img)        k = tracePullImage img >>= k
runDockerTrace
    :: forall r a.
      (Member Trace r, Member (Exception DockerEx) r)
    => Eff (Docker ': r) a
    -> Eff r a
runDockerTrace = handleRelay return handle
  where
    handle :: Handler Docker r a
    handle (RemoveImage img imgs) k = traceRemoveImage (img:imgs) >>= k
    handle (BuildImage path img)  k = traceBuildImage path img >>= k
    handle (TagImage img tag)     k = traceTagImage img tag >>= k
    handle (PushImage img)        k = tracePushImage img >>= k
    handle (PullImage img)        k = tracePullImage img >>= k
runDockerTrace = handleRelay return handle
  where
    handle :: Handler Docker r a
    handle (RemoveImage img imgs) k = traceRemoveImage (img:imgs) >>= k
    handle (BuildImage path img)  k = traceBuildImage path img >>= k
    handle (TagImage img tag)     k = traceTagImage img tag >>= k
    handle (PushImage img)        k = tracePushImage img >>= k
    handle (PullImage img)        k = tracePullImage img >>= k