RE: Unique invariants: GHC invocation vs scope?

2020-05-08 Thread Simon Peyton Jones via ghc-devs
Generally, there is no assumption that binders are unique, anywhere in GHC. The Simplifier does remove gratuitious shadowing (like (\x. \x. e)), but there is really no guarantee at any stage. Simon From: ghc-devs On Behalf Of Csaba Hruska Sent: 08 May 2020 14:03 To: GHC developers Subject:

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Ben Gamari
Henning Thielemann writes: > On Fri, 8 May 2020, Niklas Hambüchen wrote: > >> On 5/8/20 7:32 PM, Henning Thielemann wrote: >> >>> Can someone please give me examples where current state lacks >> >> * Currently stack traces are not printed, so users cannot forward them >> to the developer, even

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Ben Gamari
Henning Thielemann writes: > On Fri, 8 May 2020, Niklas Hambüchen wrote: > >> On 5/8/20 5:37 PM, Henning Thielemann wrote: >> >>> a callstack is not useful for a user. >> >> Call stacks have been very useful to me as a user of non-Haskell tools >> so far, because they are excellent for

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Niklas Hambüchen
On 5/8/20 7:52 PM, Henning Thielemann wrote: > We are talking about the HasCallStack stack traces, yes? > How is their emission addressed by extending exceptions with stack traces? The way I understand the proposal, we may be equally talking about DWARF or profiling cost-center based stack

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Henning Thielemann
On Fri, 8 May 2020, Niklas Hambüchen wrote: On 5/8/20 7:32 PM, Henning Thielemann wrote: Can someone please give me examples where current state lacks * Currently stack traces are not printed, so users cannot forward them to the developer, even if both the users and the developers would

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Niklas Hambüchen
On 5/8/20 7:32 PM, Henning Thielemann wrote: > This confirms that they are not for you, but you only forward them to the > developer. Yes, stack traces are in general for developers. > Can someone please give me examples where current state lacks * Currently stack traces are not printed, so

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Henning Thielemann
On Fri, 8 May 2020, Niklas Hambüchen wrote: On 5/8/20 5:37 PM, Henning Thielemann wrote: a callstack is not useful for a user. Call stacks have been very useful to me as a user of non-Haskell tools so far, because they are excellent for attaching to bug reports and usually led to

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Niklas Hambüchen
On 5/8/20 5:37 PM, Henning Thielemann wrote: > I can imagine that it would be helpful for the user to get a stacked > exception information like: >    Parse error on line 42, column 23 >    while reading file "foo/bar" >    while traversing directory "blabla" That seems to be rather specific use

Re: [Haskell-cafe] Decorating exceptions with backtrace information

2020-05-08 Thread Henning Thielemann
There seem to be multiple beginnings of the discussion. What is currently discussed? If someone says "exceptions" and "backtrace" in one sentence, I suspect like many times before, that again confusion of the concepts of exceptions and errors is ahead. Errors already support call stacks.

Re: Decorating exceptions with backtrace information

2020-05-08 Thread Carter Schonwald
On Fri, May 8, 2020 at 9:32 AM Carter Schonwald wrote: > ben, could you please email the libraries list with this too? This seems > like a core libraries / base change rather than a ghc-the-compiler change > > On Thu, May 7, 2020 at 6:57 PM Michael Sloan wrote: > >> Thanks so much for making a

Re: Decorating exceptions with backtrace information

2020-05-08 Thread Carter Schonwald
ben, could you please email the libraries list with this too? This seems like a core libraries / base change rather than a ghc-the-compiler change On Thu, May 7, 2020 at 6:57 PM Michael Sloan wrote: > Thanks so much for making a proposal for this, Ben!! It's great to see > progress here. > >

Unique invariants: GHC invocation vs scope?

2020-05-08 Thread Csaba Hruska
Hello, What are the intended invariants of Unique values? So far I thought that it is always gives a unique identity to things during a whole GHC invocation. However this is not true. I.e. eta expansion breaks this assumption. Here is a snippet from the STG IR of GHC.PrimopWrappers: extendInt8#