Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] Research ways to support tagged effects #16

Open
chshersh opened this issue Sep 24, 2019 · 0 comments
Open

[RFC] Research ways to support tagged effects #16

chshersh opened this issue Sep 24, 2019 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@chshersh
Copy link
Contributor

Sometimes we want to reuse the same effect implementation but for different environment settings. Examples:

  1. Different JWT tokens for different applications.
  2. Different DB settings for different databases.
  3. Support measuring with either EKG or Prometheus.

So it looks like some effects should be tagged (it's not tagless final anymore).

Initial idea: instead of

class MonadJwt m where

have

class MonadJwt (tag :: k) m where

So in constraints this will look like this:

foo :: (MonadJwt "app1" m, MonadJwt "app2" m) => ...

What do you think?

@chshersh chshersh added help wanted Extra attention is needed question Further information is requested labels Sep 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant