4 ms·
DataRank Haskell SDK
- KennyCason 11y agoI wasn't completely sure if I wanted to post this or not, I'm also not a Haskell Guru, just dabble as a hobby. But today to honor Paul Hudak, I decided to dabble some more. :) Haskell was my gateway functional programming language and for that I sincerely thank the creators.
- codygman 11y agoAwesome! 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 :)