janaipakos / ghibliapi

A simple API for Studio Ghibli resources. Unofficial/fan-made
https://ghibliapi.herokuapp.com
MIT License
310 stars 109 forks source link

More complete Haskell example? #7

Open Blaisorblade opened 7 years ago

Blaisorblade commented 7 years ago

Hey, this looks cool, and I like that it has a Haskell use case... but a more complete example would be cool—or a pointer to a tutorial to write it. But if you wrote it, compiled it, and still have it, the full thing would be cool ;-). Assuming it isn't complete already, and it doesn't seem to be.

And the full thing doesn't need to be in the website, just to be somewhere... From Aeson docs it seems you need to write GhibliCatResponse, GhibliCatResult and so on—or if they can be generated, the given code seems not enough. Also, T.pack seems not in scope (though here I can guess that's probably from Text)...

But in fairness: I don't need this to build something on it—it honestly just took me a while to figure out how the other code was generated (and to guess it wasn't, and I'm still not sure).