3 ms·
Awesome! What a great memorial :) Maybe consider making the api more strongly typed? Instead of: response <- findTopic "tide-pods" [("gender", "male")] c
by codygman 11y ago
Awesome! What a great memorial :)
Maybe consider making the api more strongly typed?
Instead of:
response <- findTopic "tide-pods" [("gender", "male")] config
You could have:
response <- findTopic "tide-pods" [(Gender, Male)] config
Maybe make the common operations available in a strongly typed api, but allow users to use strings like this as a fallback. Then you can better guarantee "correct if it compiles".
- codygman 11y agoActually using type classes and sum types, the Gender is superfluous if you define: data Gender = Male | Female Would type more, but on a tablet ATM. Not sure if this is a good idea or not, but interesting to think about.
- KennyCason 11y agoThanks for the input! I was considering using stronger types for the search parameters but wasn't familiar enough with Haskell's type system to make much progress. :) I'll keep exploring options!
- codygman 11y agoMaybe I can submit a pull request later :)