<div dir="auto">You might be able to do something with cloc and a shell script for a rough estimate.<div dir="auto"><br></div><div dir="auto">```</div><div dir="auto">$ cd ghc</div><div dir="auto">$ nix-shell -p clock --run "cloc ."</div><div dir="auto">```</div><div dir="auto"><br></div><div dir="auto">will output a detailed report of the loc and language breakdown of the top level ghc directory (it is comment-aware and aware of many languages). there might be a way to get cloc or a similar tool to output something more inspect able (eg json), and then use a shell script to gather everything from the appropriate directories/files. </div><div dir="auto"><br></div><div dir="auto">I suspect something could be hacked up in less than a day, but it would require a bit of research. Hopefully this is helpful and gets you going - I'd be happy to hear of better solutions.</div><div dir="auto"><br></div><div dir="auto">Thanks</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 10, 2022, 11:20 Simon Peyton Jones <<a href="mailto:simon.peytonjones@gmail.com">simon.peytonjones@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">Dear GHC devs<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Is it possible to get a "lines-of-code" summary of GHC these days? Like the one below, from 2011. <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">It needs more than `wc` because it's helpful to split lines of code from lines of comments and notes.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">We used to have `count_lines` but I'm not sure whether it is still extant. <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">I'm giving a talk at Zurihac on Sunday morning, about the internals of GHC. Any data before then, preferably in a form comparable to that below, would be terrific.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">But you have a lot else to do. This isn't do-or-die, just nice to have.<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Simon<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><img src="cid:ii_l48nkztb0" alt="image.png" width="525" height="542"><br><br></div></div>
_______________________________________________<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>