<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Agreed, this sounds sensible.</div>
<div><br></div>
<div>Can anyone think of any unintended consequences?<br></div>
<div><br></div>
<div>-Jose</div>
<div><br></div>
<div>On Tue, May 16, 2017, at 09:50 AM, Iavor Diatchki wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>That seems fairly reasonable to me.<br></div>
<div><br></div>
<div>-Iavor<br></div>
<div><div><br></div>
<div defang_data-gmailquote="yes"><div>On Tue, May 16, 2017 at 7:18 AM, Joachim Breitner <span dir="ltr"><<a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a>></span> wrote:<br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;"><div>Hi,<br></div>
<div> <br></div>
<div> a very small proposal to be considered for Haskell':<br></div>
<div> <br></div>
<div> Currently, the report states<br></div>
<div> <br></div>
<div> An abbreviated form of module, consisting only of the module body,<br></div>
<div> is permitted. If this is used, the header is assumed to be ‘module<br></div>
<div> Main(main) where’.<br></div>
<div> <br></div>
<div> I propose to change that to<br></div>
<div> <br></div>
<div> An abbreviated form of module, consisting only of the module body,<br></div>
<div> is permitted. If this is used, the header is assumed to be ‘module<br></div>
<div> Main where’.<br></div>
<div> <br></div>
<div> The rationale is that a main-less main module is still useful, e.g.<br></div>
<div> when you are working a lot in GHCi, and offload a few extensions to a<br></div>
<div> separate file. Currently, tools like hdevtools will complain about a<br></div>
<div> missing main function when editing such a file.<br></div>
<div> <br></div>
<div> It would also work better with GHC’s -main-is flag, and avoid problems<br></div>
<div> like the one described in <a href="https://ghc.haskell.org/trac/ghc/ticket/13704">https://ghc.haskell.org/trac/<wbr>ghc/ticket/13704</a><br></div>
<div> <br></div>
<div> <br></div>
<div> I don’t see any downsides. When compiling to a binary, implementations<br></div>
<div> are still able to detect that a Main module is not imported by any<br></div>
<div> other module and only the main function is used, and optimize as if<br></div>
<div> only main were exported.<br></div>
<div> <br></div>
<div> Greetings,<br></div>
<div> Joachim<br></div>
<div> <span><span class="colour" style="color:rgb(136, 136, 136)"><br> <br> <br> --<br> Joachim “nomeata” Breitner<br> <a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a> • <a href="https://www.joachim-breitner.de/">https://www.joachim-breitner.<wbr>de/</a><br> XMPP: <a href="mailto:nomeata@joachim-breitner.de">nomeata@joachim-breitner.de</a> • OpenPGP-Key: 0xF0FBF51F<br> Debian Developer: <a href="mailto:nomeata@debian.org">nomeata@debian.org</a></span></span></div>
<div>______________________________<wbr>_________________<br></div>
<div> Haskell-prime mailing list<br></div>
<div> <a href="mailto:Haskell-prime@haskell.org">Haskell-prime@haskell.org</a><br></div>
<div> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>prime</a><br></div>
<div> <br></div>
</blockquote></div>
</div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>Haskell-prime mailing list<br></div>
<div><a href="mailto:Haskell-prime@haskell.org">Haskell-prime@haskell.org</a><br></div>
<div><a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-prime</a><br></div>
</blockquote><div><br></div>
</body>
</html>