
Hello, I suspect that the function recursion composition I have used is not working very well, so I'm trying to learn how to use the debugger to understand what is going on, except I don't really understand the output of the GHCi debugger or what is going on very well. I have a main function called 'Analysis' in a library that analyzes a string. I've used :break Analysis and then called :trace and then repeatedly typed :continue, but there are a number of steps between one continue and the next return-and-call of output that I'm not sure I understand. Suggestions on better debugging methods, or even how to fully understand this output, would be very helpful. Thanks in advance. _result :: Bool = _ key :: Int = -18 message :: [Char] = _ [Lib.hs:17:8-69] *Main> :continue Stopped in Main.Analysis, Lib.hs:18:8-84 _result :: Bool = _ key :: Int = -18 message :: [Char] = _ [Lib.hs:18:8-84] *Main> :continue Stopped in Main.Analysis, Lib.hs:19:8-65 _result :: Bool = _ key :: Int = -18 message :: [Char] = "esleespmwfpdvjtdgpcjmwfpzgpcespcp" [Lib.hs:19:8-65] *Main> :continue Stopped in Main.Analysis, Lib.hs:19:70-127 _result :: (Int, Text) = _ key :: Int = -18 message :: [Char] = "esleespmwfpdvjtdgpcjmwfpzgpcespcp" [Lib.hs:19:70-127] *Main> :continue Stopped in Main.Analysis, Lib.hs:15:8-14 _result :: Bool = _ key :: Int = _ [Lib.hs:15:8-14] *Main> :continue Stopped in Main.Analysis, Lib.hs:16:8-70

Il 28 gennaio 2021 alle 22:04 A. Mc. ha scritto:
I suspect that the function recursion composition I have used is not working very well, so I'm trying to learn how to use the debugger to understand what is going on, except I don't really understand the output of the GHCi debugger or what is going on very well. I have a main function called 'Analysis' in a library that analyzes a string. I've used :break Analysis and then called :trace and then repeatedly typed :continue, but there are a number of steps between one continue and the next return-and-call of output that I'm not sure I understand. Suggestions on better debugging methods, or even how to fully understand this output, would be very helpful. Thanks in advance.
For pure functions, debug [1] is Godsent. [1] https://hackage.haskell.org/package/debug
participants (2)
-
A. Mc.
-
Francesco Ariis