Re: Output language of typechecking pass?

2021-12-28 Thread Richard Eisenberg
Yes, GitLab supports such a permalink. The problem is that we frequently revise Notes as we understand problems better / improve the implementation. So a reader might link to a Note from the wiki only to study an old implementation that has been superseded. Richard > On Dec 28, 2021, at 3:52 P

Re: Output language of typechecking pass?

2021-12-28 Thread Alan & Kim Zimmerman
FYI, it is possible to make a "permalink" on github, which points to the code at a specific commit. Perhaps gitlab has something similar? Alan On Tue, 28 Dec 2021 at 19:28, Richard Eisenberg wrote: > We could always make a hyperlink to the source code as hosted on GitLab. > But I actually argue

Re: Output language of typechecking pass?

2021-12-28 Thread Richard Eisenberg
We could always make a hyperlink to the source code as hosted on GitLab. But I actually argue not to: such links would quickly become outdated, in one of two ways: either we make a permalink, in which case the linked Note text will become outdated; or we make a link to a particular file & line,

Re: Output language of typechecking pass?

2021-12-28 Thread Benjamin Redelings
I was thinking about the relationship between the wiki and the notes in the GHC source. Would it be possible to link directly to [compiler notes] in the GHC source from the wiki, using hyperlinks?  Right now, I'm seeing references that look like: (See |Note [Constraint flavours]|.) (I can se

What's the benefit of taking "do" blocks apart? Is there a way to turn that off?

2021-12-28 Thread Erdi, Gergo via ghc-devs
PUBLIC Hi, I'm seeing 'do' blocks getting taking apart into top-level definitions, so e.g. main = do some complicated expression 1 some complicated expression 2 is compiled into sat_sKv = some complicated expression 1 sat_sKw = \_ -> some complicated expression 2 main = bindIO sat_sKv sat_

Measuring thread cpu time (using bound threads)

2021-12-28 Thread Harendra Kumar
Hi GHC devs, I want to measure the CPU time spent in a particular Haskell thread across thread yield points. I am assuming Haskell threads do not keep track of per thread cpu time. Therefore, to measure it I have to use the thread cpu clock (CLOCK_THREAD_CPUTIME_ID) provided by the OS (Linux). But

RE: [External] Re: Source locations from Core

2021-12-28 Thread Erdi, Gergo via ghc-devs
PUBLIC Thank you, this looks exactly like what I'm looking for. Now I'll just have to try it on larger examples to see how approximate it is 😊 -Original Message- From: Matthew Pickering Sent: Tuesday, December 28, 2021 10:36 AM To: Erdi, Gergo Cc: GHC Subject: [External] Re: Source l

Re: Source locations from Core

2021-12-28 Thread Matthew Pickering
Hi Gergo, Source Notes are what you are looking for. Currently the only way to enable them is to either use `-g` or `-finfo-table-map`. The result will be core which contains nodes which attempt to describe where the core expression came from, it's not perfect though! See Section 5.4 - https://et

Source locations from Core

2021-12-28 Thread Erdi, Gergo via ghc-devs
PUBLIC Hi, I'm looking for ways to map Core fragments back to source locations. I see there is an annotated version of Core in `GHC/Core.hs` called `AnnExpr`, which I could see being useful for this if I set the annotation type to `SrcSpan`, but that's not what I get out of GHC's desugarer, si