What is a good way to debug haskell code?

前端 未结 4 875
野性不改
野性不改 2021-02-01 03:02

I have used the ghci debugger but would really prefer if it was somewhat integrated with a text editor to simplify the process of setting breakpoints. It should probably not str

4条回答
  •  一向
    一向 (楼主)
    2021-02-01 03:37

    Yes, a frontend for the GHCi debugger would be a good thing. Maybe we'll get something done during the next Hackathon. However, in the mean time:

    • The Monad Reader, Issue 10 (PDF) has an article on using the debugger. Maybe that can give you a few more hints.

    Alternatively, Haskell lends itself nicely to bottom-up testing using QuickCheck. I.e., test your components individually, then put them together. If your code is pure this often Just Works.

提交回复
热议问题