What is a good way to debug haskell code?

前端 未结 4 886
野性不改
野性不改 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:15

    A good way to debug Haskell code is to write and test algebraic laws using QuickCheck and SmallCheck. There have been several Haskell debuggers including Hat, Hood, and Freya, but none of them have been perceived as sufficiently valuable to be worth maintaining for a long time.

    When it's Haskell, you have to think differently about how to do things. The ICFP paper on the QuickCheck page has some good examples to get you started. If you want a real-world example xmonad is extensively debugged using QuickCheck.

提交回复
热议问题