[Haskell-beginners] Getting debugging going in ghci -- is there no mercy?

Francesco Ariis fa-ml at ariis.it
Wed May 19 12:34:28 UTC 2021


Il 19 maggio 2021 alle 21:10 Michael Turner ha scritto:
> According to the Haskell wiki, "The trace function is located in the
> base package", which encouraged me to think it should just work by
> starting ghci. No such luck. So then I tried "stack gchi --package
> debug". No such luck. I added packages to stack.yaml as suggested. And
> here's where I am now.

    λ> :m +Debug.Trace
    λ> :t +d trace "prova" 234
    trace "prova" 234 :: Integer
    λ> trace "prova" 234
    prova
    234

`debug` is an — excellent! — debug package by Neil Mitchell, but
not related to `Debug.Trace`.



More information about the Beginners mailing list