Using servant with ReaderT IO a

后端 未结 3 973
生来不讨喜
生来不讨喜 2021-02-09 00:02

I\'m using the servant library for my JSON API. I need some help to get a ServerT MyAPI (ReaderT a IO) monad stack working.

Here\'s an example

3条回答
  •  有刺的猬
    2021-02-09 00:23

    You were almost there, test should be:

    test :: ReaderT Int IO String
    test = giveMeAMessage
    

    As for your other questions, I don't have time to answer just now but us servant developers should probably make it easier or better documented.

    Could you please read through the source for whichever part confuses you, and then ask specific questions?

提交回复
热议问题