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

Add IsString instances #43

Closed
fizruk opened this issue Jan 22, 2016 · 0 comments
Closed

Add IsString instances #43

fizruk opened this issue Jan 22, 2016 · 0 comments

Comments

@fizruk
Copy link
Member

fizruk commented Jan 22, 2016

Risking to confuse typechecker even further, we can make some nice IsString instances.
E.g. compare:

at 404 ?~ Inline (mempty & description .~ "Not found")

vs

at 404 ?~ "Not found"

The following types I think can reasonably have IsString instances:

  • Host;
  • License;
  • Tag;
  • Param (not sure yet, but "param" would be equivallent to mempty & name .~ "param");
  • Response;
  • Referenced a (when a has IsString instance);
  • Reference (or maybe this newtype can be removed).

@jkarni, @dmjio: thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant