Re: Default module header `module Main where`
On 19/05/17 07:12 PM, Francesco Ariis wrote: On Fri, May 19, 2017 at 06:32:30PM -0400, Joachim Breitner wrote: I thought about this. But I fear that this will require a language extension or flag, and then the developers (quite rightly) say that it does not pull its weight of supporting both variants, and it gets lost. But maybe I should give it a shot if they accept it. Indeed this strikes me as a not a good extension to have: every extension further fragments the ecosystem and is yet another thing to care about if you are reading someone else's code, etc. - the cost probably outweights the benefit on this one. But it seems a good proposal for H2020, as (if it is accepted), the costs linked with an extension/flag (added complexity, fragmentation of the community) aren't there. The "extensions before report modification" is a solid rule, maybe the committee wants to add an exception for proposals which cannot realistically be "packaged" (and achieve widespread use) into extensions? I feel it's rather ironic that there exists a class of proposals that are considered acceptable for Haskell' but too radical for GHC, considering that the stands are usually completely opposite. The obvious way out of this conundrum is to communicate with GHC. If the Haskell' committee gives a proposal some sort of conditional acceptance status, that should count for something with the GHC HQ. After all, they'd presumably have to implement it once it's officially a part of the next standard, so implementing it sooner as a proposal is not that much more to ask. ___ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Re: Default module header `module Main where`
On Fri, May 19, 2017 at 06:32:30PM -0400, Joachim Breitner wrote: > I thought about this. But I fear that this will require a language > extension or flag, and then the developers (quite rightly) say that it > does not pull its weight of supporting both variants, and it gets lost. > But maybe I should give it a shot if they accept it. Indeed this strikes me as a not a good extension to have: every extension further fragments the ecosystem and is yet another thing to care about if you are reading someone else's code, etc. - the cost probably outweights the benefit on this one. But it seems a good proposal for H2020, as (if it is accepted), the costs linked with an extension/flag (added complexity, fragmentation of the community) aren't there. The "extensions before report modification" is a solid rule, maybe the committee wants to add an exception for proposals which cannot realistically be "packaged" (and achieve widespread use) into extensions? ___ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Re: Default module header `module Main where`
Hi, I thought about this. But I fear that this will require a language extension or flag, and then the developers (quite rightly) say that it does not pull its weight of supporting both variants, and it gets lost. But maybe I should give it a shot if they accept it. Joachim Am Freitag, den 19.05.2017, 17:35 -0400 schrieb Mario Blažević: > On 2017-05-16 10:18 AM, Joachim Breitner wrote: > > Hi, > > > > a very small proposal to be considered for Haskell': > > I like it, but it should probably be a GHC proposal first. I > don't > think Haskell' is supposed to make any change to the standard that > hasn't been already implemented and tested. In this particular case, > GHC > HQ might opt to implement your proposal but hide it behind a > command-line option, or to enable it by default only in GHCi. There > are > already precedents for this. > > > > > > Currently, the report states > > > > An abbreviated form of module, consisting only of the module > > body, > > is permitted. If this is used, the header is assumed to be > > ‘module > > Main(main) where’. > > > > I propose to change that to > > > > An abbreviated form of module, consisting only of the module > > body, > > is permitted. If this is used, the header is assumed to be > > ‘module > > Main where’. > > > > The rationale is that a main-less main module is still useful, e.g. > > when you are working a lot in GHCi, and offload a few extensions to > > a > > separate file. Currently, tools like hdevtools will complain about > > a > > missing main function when editing such a file. > > > > It would also work better with GHC’s -main-is flag, and avoid > > problems > > like the one described in https://ghc.haskell.org/trac/ghc/ticket/1 > > 3704 > > > > > > I don’t see any downsides. When compiling to a binary, > > implementations > > are still able to detect that a Main module is not imported by any > > other module and only the main function is used, and optimize as if > > only main were exported. > > > > Greetings, > > Joachim > > > > > > > > > > > > ___ > > Haskell-prime mailing list > > Haskell-prime@haskell.org > > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime > > > > -- Joachim Breitner m...@joachim-breitner.de http://www.joachim-breitner.de/ signature.asc Description: This is a digitally signed message part ___ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Re: Default module header `module Main where`
as a guideline what you say is true, and at least in this case as the motivation is user focused it should be validated thusly :) On Fri, May 19, 2017 at 5:35 PM, Mario Blaževićwrote: > On 2017-05-16 10:18 AM, Joachim Breitner wrote: > >> Hi, >> >> a very small proposal to be considered for Haskell': >> > > I like it, but it should probably be a GHC proposal first. I don't > think Haskell' is supposed to make any change to the standard that hasn't > been already implemented and tested. In this particular case, GHC HQ might > opt to implement your proposal but hide it behind a command-line option, or > to enable it by default only in GHCi. There are already precedents for this. > > > >> Currently, the report states >> >> An abbreviated form of module, consisting only of the module body, >> is permitted. If this is used, the header is assumed to be ‘module >> Main(main) where’. >> >> I propose to change that to >> >> An abbreviated form of module, consisting only of the module body, >> is permitted. If this is used, the header is assumed to be ‘module >> Main where’. >> >> The rationale is that a main-less main module is still useful, e.g. >> when you are working a lot in GHCi, and offload a few extensions to a >> separate file. Currently, tools like hdevtools will complain about a >> missing main function when editing such a file. >> >> It would also work better with GHC’s -main-is flag, and avoid problems >> like the one described in https://ghc.haskell.org/trac/ghc/ticket/13704 >> >> >> I don’t see any downsides. When compiling to a binary, implementations >> are still able to detect that a Main module is not imported by any >> other module and only the main function is used, and optimize as if >> only main were exported. >> >> Greetings, >> Joachim >> >> >> >> >> >> ___ >> Haskell-prime mailing list >> Haskell-prime@haskell.org >> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime >> >> > > -- > Mario Blazevic > mblaze...@stilo.com > Stilo International > > This message, including any attachments, is for the sole use of the > intended recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure, copying, or > distribution is strictly prohibited. If you are not the intended > recipient(s) please contact the sender by reply email and destroy > all copies of the original message and any attachments. > > ___ > Haskell-prime mailing list > Haskell-prime@haskell.org > http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime > ___ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime
Re: Default module header `module Main where`
On 2017-05-16 10:18 AM, Joachim Breitner wrote: Hi, a very small proposal to be considered for Haskell': I like it, but it should probably be a GHC proposal first. I don't think Haskell' is supposed to make any change to the standard that hasn't been already implemented and tested. In this particular case, GHC HQ might opt to implement your proposal but hide it behind a command-line option, or to enable it by default only in GHCi. There are already precedents for this. Currently, the report states An abbreviated form of module, consisting only of the module body, is permitted. If this is used, the header is assumed to be ‘module Main(main) where’. I propose to change that to An abbreviated form of module, consisting only of the module body, is permitted. If this is used, the header is assumed to be ‘module Main where’. The rationale is that a main-less main module is still useful, e.g. when you are working a lot in GHCi, and offload a few extensions to a separate file. Currently, tools like hdevtools will complain about a missing main function when editing such a file. It would also work better with GHC’s -main-is flag, and avoid problems like the one described in https://ghc.haskell.org/trac/ghc/ticket/13704 I don’t see any downsides. When compiling to a binary, implementations are still able to detect that a Main module is not imported by any other module and only the main function is used, and optimize as if only main were exported. Greetings, Joachim ___ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime -- Mario Blazevic mblaze...@stilo.com Stilo International This message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure, copying, or distribution is strictly prohibited. If you are not the intended recipient(s) please contact the sender by reply email and destroy all copies of the original message and any attachments. ___ Haskell-prime mailing list Haskell-prime@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime