JavaScript to Haskell

04: Practical Haskell


Listen Later

So, following the book is hard. I don’t really learn well that way. I have just enough knowledge that the first part feels boring and repetitive, but I don’t know what I don’t know, so where do I pick up, chapter 2 or maybe 3? So let’s take this from a real JS perspective.

Building an API
  • So we know how to get and return json with HTTP requests in Node, how do we do it in Haskell? Ok, now build on that.
  • Make it something relatable.
    1. stack new hs-webapi
    2. Go into /package.yaml and under dependencies add ‘scotty’ and ‘aeson’
    3. Then run stack build
    4. … then wait (forgotten the compile times :eye_roll:) also 67 dependencies. I mean it’s not 867!!!!
    5. ..still waiting.
    6. Resources
      • Building an API
      • scotty
      • Follow
        • JavaScript to Haskell
          • Twitter: @jstoHaskell()
          • Site: JSToHaskell
          • microblog: @jtomchak
          • Jesse Tomchak
            • Twitter: @jtomchak
            • ...more
              View all episodesView all episodes
              Download on the App Store

              JavaScript to HaskellBy Jesse Tomchak