fatal :: (MonadState (Maybe e) m, Monoid e, MonadError e m) => e -> m a
fatal e = do
  report e
  get >>= maybe (impossible "fatal") ((put Nothing >>) . throwError)
fatal :: (MonadState (Maybe e) m, Monoid e, MonadError e m) => e -> m a
fatal e = do
  report e
  get >>= maybe (impossible "fatal") ((put Nothing >>) . throwError)
fatal e = do
  report e
  get >>= maybe (impossible "fatal") ((put Nothing >>) . throwError)