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

ids should be represented by different types #26

Closed
swizzard opened this issue May 21, 2018 · 1 comment
Closed

ids should be represented by different types #26

swizzard opened this issue May 21, 2018 · 1 comment

Comments

@swizzard
Copy link
Contributor

currently, HastodonId represents status ids, account ids, and media ids. it would be more informative to have separate types for each of these. additional type-safety could be guaranteed by having these be newtypes.

the downside of this would be a little more noise in the API functions that use replace, but we could avoid this by using a custom function IsString a => a -> a -> a -> a and deriving IsString for our newtypes.

@syucream
Copy link
Owner

syucream commented Jul 2, 2018

It might be fixed by #27

@syucream syucream closed this as completed Jul 2, 2018
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

2 participants