Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I just started to work with Haskell seriously, and after some trouble I discovered exactly the same development approach as DerpDerpDerp. However since I am not yet experienced I wish I had an "observer" to print debug messages (I know that there is a debugger in EclipseFP but I prefer Emacs for performance reasons). With observer I mean a compiler pragma that lets me print Haskell values without violating the functional nature of the code.

By the way, you don't need to live without static typing in Lisp. Shen provides a powerful type-safe layer on top of Lisp.

http://www.shenlanguage.org/learn-shen/types/types_functions...



If you want to be pure, you can add a strict WriterT to your monad stack, or something similar.

If you don't mind temporary impurity, Debug.Trace provides some helper functions, but they call unsafePerformIO, which can do unexpected things.


Sounds like you're looking for the Debug.Trace module


Thanks, I'll take a look at it.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: