Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Bardur Arantsson
On 2016-08-04 02:50, Ryan Scott wrote: > I'm > holding out hope that the work in > https://github.com/shayan-najd/NativeMetaprogramming makes things > nicer soon, and then we can revisit this idea. Are there any papers on this? (Or even just blog posts and such.) Sounds really intriguing, but

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Brandon Allbery
On Wed, Aug 3, 2016 at 10:52 PM, Richard Eisenberg wrote: > I do not understand "not portable" here. Do you mean that some > architectures don't support TH? Sounded to me like they're targeting the standards path, which means not tying it to something that's fairly

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Richard Eisenberg
> On Aug 3, 2016, at 8:50 PM, Ryan Scott wrote: > > * Template Haskell: Not portable. Staging issues make it hard to use > as a drop-in replacement for the `deriving` keyword I do not understand "not portable" here. Do you mean that some architectures don't support

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Ryan Scott
> How much of this derivation machinery could NOT be implemented by means of > some kind of a (hypothetical) type-backed metaprogramming facility? I think this would be a wonderful thing to have. Matthew Pickering (cc'd) has expressed a desire to have all the logic for the `bespoke` deriving

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Edward Kmett
It has the benefit that nothing lowercase would ever derive in that position so it is a strict extension of the current syntax. So even it builtin or whatever is a conditional keyword like qualified and as, I don't see any issues with it. 'bespoke' does make me smile, though. =) -Edward On Sun,

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Kosyrev Serge
Kosyrev Serge <_deepf...@feelingofgreen.ru> writes: > How much of this derivation machinery could NOT be implemented by means of > some kind of a (hypothetical) type-backed metaprogramming facility? > > The beauty of an open implementation[1] allowed by such a thing is that: I apologize for the

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Kosyrev Serge
Ryan Scott writes: > That is a good question. Weirdly enough, the current behavior for how > a deriving strategy is resolved (without explicit keywords) isn't > really documented anywhere, so I attempted to figure out what GHC > currently does and documented it here [1].

Re: Request for feedback: deriving strategies syntax

2016-08-03 Thread Ryan Scott
That is a good question. Weirdly enough, the current behavior for how a deriving strategy is resolved (without explicit keywords) isn't really documented anywhere, so I attempted to figure out what GHC currently does and documented it here [1]. I'll reproduce the algorithm (including deriving

Re: A function with absent demand on syntactically used argument?

2016-08-03 Thread Joachim Breitner
Am Mittwoch, den 03.08.2016, 10:10 + schrieb Ömer Sinan Ağacan: > I'm reading the code in WwLib that generates worker functions and I'm confused > about absent lets. Can anyone give an example function that has absent demand > > its argument even though the argument is syntactically used in

A function with absent demand on syntactically used argument?

2016-08-03 Thread Ömer Sinan Ağacan
I'm reading the code in WwLib that generates worker functions and I'm confused about absent lets. Can anyone give an example function that has absent demand on its argument even though the argument is syntactically used in the body? I think we should add some examples to `Note [Absent errors]` in