<div dir="auto">That's very exciting!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 28 Oct 2021, 3.08 Ben Gamari, <<a href="mailto:ben@well-typed.com">ben@well-typed.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ben Gamari <<a href="mailto:ben@well-typed.com" target="_blank" rel="noreferrer">ben@well-typed.com</a>> writes:<br>
<br>
> Hi all,<br>
><br>
> Today I verified that with Luite's recent work on the interpreter it is<br>
> now possible to run GHC entirely within GHCi (when bootstrapping from<br>
> GHC 9.2).<br>
> <br>
> ...<br>
><br>
I have fixed the break-array issue noted in the above message in !6848.<br>
It is now possible to use `:trace` on GHC itself:<br>
<br>
<br>
$ hadrian/ghci<br>
GHCi, version 9.2.1: <a href="https://www.haskell.org/ghc/" rel="noreferrer noreferrer" target="_blank">https://www.haskell.org/ghc/</a>  :? for help<br>
.<br>
.<br>
.<br>
λ> import Main<br>
λ> :set args -B/opt/exp/ghc/ghc-landing/_build/stage1/lib Hi.hs -v3 -fforce-recomp<br>
λ> :set -fbreak-on-error<br>
λ> :trace main<br>
Glasgow Haskell Compiler, Version 9.3.20211027, stage 1 booted by GHC version 9.2.1<br>
^CStopped in <exception thrown>, <unknown><br>
_exception :: e = _<br>
[<unknown>] λ> :hist<br>
-1  : fromException (/opt/exp/ghc/ghc-landing/compiler/GHC/Utils/Panic.hs:114:19-24)<br>
-2  : uniq (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:205:7-10)<br>
-3  : moduleNameFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:72:33-35)<br>
-4  : stableModuleNameCmp (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:62:64-78)<br>
-5  : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:252:18-25)<br>
-6  : uniq (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:205:7-10)<br>
-7  : moduleNameFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:72:33-35)<br>
-8  : stableModuleNameCmp (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:62:29-43)<br>
-9  : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:252:6-13)<br>
-10 : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:252:6-25)<br>
-11 : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:(252,3)-(253,54))<br>
-12 : stableModuleNameCmp (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:62:29-78)<br>
-13 : compare (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:42:23-49)<br>
-14 : fs_sbs (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:207:7-12)<br>
-15 : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:253:44-53)<br>
-16 : fs_sbs (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:207:7-12)<br>
-17 : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:253:31-40)<br>
-18 : lexicalCompareFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:253:3-54)<br>
-19 : uniq (/opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:205:7-10)<br>
-20 : moduleNameFS (/opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:72:33-35)<br>
...<br>
[<unknown>] λ> :back<br>
Logged breakpoint at /opt/exp/ghc/ghc-landing/compiler/GHC/Utils/Panic.hs:114:19-24<br>
_result :: Maybe GHC.Utils.Panic.Plain.PlainGhcException<br>
e :: SomeAsyncException<br>
[-1: /opt/exp/ghc/ghc-landing/compiler/GHC/Utils/Panic.hs:114:19-24] λ> :back<br>
Logged breakpoint at /opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:205:7-10<br>
_result :: Int<br>
uniq :: Int<br>
[-2: /opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:205:7-10] λ> uniq<br>
603980920<br>
[-2: /opt/exp/ghc/ghc-landing/compiler/GHC/Data/FastString.hs:205:7-10] λ> :back<br>
Logged breakpoint at /opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:72:33-35<br>
_result :: ModuleName<br>
mod :: ModuleName<br>
[-3: /opt/exp/ghc/ghc-landing/compiler/GHC/Unit/Module/Name.hs:72:33-35] λ> mod<br>
ModuleName "GHC.Tc.Solver.Canonical"<br>
<br>
et cetera<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank" rel="noreferrer">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>