Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. GHCi Debugging (A. Mc.)
2. Re: GHCi Debugging (Francesco Ariis)
----------------------------------------------------------------------
Message: 1
Date: Thu, 28 Jan 2021 22:04:10 -0800
From: "A. Mc." <[email protected]>
To: [email protected]
Subject: [Haskell-beginners] GHCi Debugging
Message-ID:
<caosti3nmu3_dbpwzxyysevkvmc+gzu0hiu349ekxtmhte0m...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20210128/024128a2/attachment-0001.html>
------------------------------
Message: 2
Date: Fri, 29 Jan 2021 07:19:46 +0100
From: Francesco Ariis <[email protected]>
To: [email protected]
Subject: Re: [Haskell-beginners] GHCi Debugging
Message-ID: <20210129061946.GA7871@extensa>
Content-Type: text/plain; charset=us-ascii
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
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 150, Issue 17
******************************************