For debugging you can use the Debug.Trace module.
import Debug.Trace pure :: Int -> Int pure x = trace "log" (x * x)
Please note that due to laziness, the output may in some cases be mixed with other output that you generate, therefore this is not recommended for registration in production code, but for simple debugging tasks this is usually normal.
source share