Re: magicDict

2021-04-26 Thread Edward Kmett
2021 21:34 > To: Simon Peyton Jones > Cc: Krzysztof Gogolewski ; Spiwack, Arnaud > ; GHC developers ; Ryan Scott > > Subject: Re: magicDict > > I like withDict a lot. It is direct, easy to chain/use, avoids fighting about > direction completely, and even matches the arg

RE: magicDict

2021-04-26 Thread Simon Peyton Jones via ghc-devs
You mean you like 'withDict' with that name, as well as the argument order K suggests? i.e. not reifyDict? Simon From: Edward Kmett Sent: 26 April 2021 21:34 To: Simon Peyton Jones Cc: Krzysztof Gogolewski ; Spiwack, Arnaud ; GHC developers ; Ryan Scott Subject: Re: magicDi

Re: magicDict

2021-04-26 Thread Edward Kmett
t: 26 April 2021 15:35 > | To: Simon Peyton Jones > | Cc: Spiwack, Arnaud ; Edward Kmett > | ; GHC developers > | Subject: Re: magicDict > | > | I would like to propose one more option: > | > | withDict :: dt -> (ct => a) -> a > | > | 1. This is less symm

RE: magicDict

2021-04-26 Thread Simon Peyton Jones via ghc-devs
ril 2021 15:35 | To: Simon Peyton Jones | Cc: Spiwack, Arnaud ; Edward Kmett | ; GHC developers | Subject: Re: magicDict | | I would like to propose one more option: | | withDict :: dt -> (ct => a) -> a | | 1. This is less symmetric than '(ct => a) -> dt ->

Re: magicDict

2021-04-26 Thread Krzysztof Gogolewski
> > > > From: Spiwack, Arnaud > Sent: 26 April 2021 08:10 > To: Edward Kmett > Cc: Simon Peyton Jones ; GHC developers > > Subject: Re: magicDict > > > > > > > > On Sun, Apr 25, 2021 at 2:20 AM Edward Kmett wrote: > > I speak to much this sa

RE: magicDict

2021-04-26 Thread Simon Peyton Jones via ghc-devs
tter than 'magicDict'. So: reifyDict it is? Simon From: Spiwack, Arnaud Sent: 26 April 2021 08:10 To: Edward Kmett Cc: Simon Peyton Jones ; GHC developers Subject: Re: magicDict On Sun, Apr 25, 2021 at 2:20 AM Edward Kmett mailto:ekm...@gmail.com>> wrote: I speak to mu

Re: magicDict

2021-04-26 Thread Spiwack, Arnaud
On Sun, Apr 25, 2021 at 2:20 AM Edward Kmett wrote: > I speak to much this same point in this old stack overflow response, > though to exactly the opposite conclusion, and to exactly the opposite pet > peeve. > > https://stackoverflow.com/a/5316014/34707 > :-) I do not feel that I chose the voc

Re: magicDict

2021-04-24 Thread Edward Kmett
I speak to much this same point in this old stack overflow response, though to exactly the opposite conclusion, and to exactly the opposite pet peeve. https://stackoverflow.com/a/5316014/34707 Let me see if I can try to explain why I think reasonable people can disagree here and why I ultimately

Re: magicDict

2021-04-23 Thread Carter Schonwald
This makes sense to me, and provides a good explanation for why I mix up the terms. So usual parlance is reify brings stuff back down/ reflect bounces it up? On Fri, Apr 23, 2021 at 2:16 AM Spiwack, Arnaud wrote: > While I do value consistency, let me pet-peeve for a minute here (sorry in > ad

Re: magicDict

2021-04-22 Thread Spiwack, Arnaud
While I do value consistency, let me pet-peeve for a minute here (sorry in advance Edward for the rant). The word “reify” comes from the latin “res”, which means object/thing. It should always mean something along the line of “making more concrete”. In normalisation by evaluation, for instance, you

RE: magicDict

2021-04-22 Thread Simon Peyton Jones via ghc-devs
Ah, yes... I can never remember which is reify and which is reflect. I'm fine either way. Maybe reifyDict is better. S | -Original Message- | From: Krzysztof Gogolewski | Sent: 22 April 2021 20:18 | To: Spiwack, Arnaud | Cc: Simon Peyton Jones ; GHC developers | Subjec

Re: magicDict

2021-04-22 Thread Edward Kmett
Happy to see progress being made here. I think Ryan and others have spoken to any issues I would otherwise raise with the implementation itself. Currently I find myself reaching for unsafeCoerce over magicDict in most situations, and I'd really like to be able to stop doing that! I'm +1 on the nam

Re: magicDict

2021-04-22 Thread Krzysztof Gogolewski
How about 'reifyDict'? The reflection library uses 'reify' to create a dictionary and 'reflect' to extract a value out of it. https://hackage.haskell.org/package/reflection-2.1.6/docs/Data-Reflection.html#v:reify On Thu, Apr 22, 2021 at 3:27 PM Spiwack, Arnaud wrote: > > Let me upvote `reflectDi

Re: magicDict

2021-04-22 Thread Spiwack, Arnaud
Let me upvote `reflectDict`. On Thu, Apr 22, 2021 at 12:41 PM Simon Peyton Jones via ghc-devs < ghc-devs@haskell.org> wrote: > Ed, and other ghc-devs > > We are busy tidying up magicDict, and making it much more type-safe: see > >- https://gitlab.haskell.org/ghc/ghc/-/issues/16646 >- http