Re: Default module header `module Main where`

2017-05-16 Thread Iavor Diatchki
One potential difference between the two is that the current behavior allows the `Main` module to import `main` from another module, while the new behavior would fail in that case. For example, a file that has only a single line: import SomeOtherModule(main) This still seems like a fairly

Re: Default module header `module Main where`

2017-05-16 Thread Matthias Fischmann
you're inside the module, so you have access to all top-level bindings, not just to the export list. the issue with the implicit `module Main(main) where` is that it errors if main is not defined, even though that's a perfectly harmless situation. (i hope i got the question right?) On Tue,

Re: [ANNOUNCE] GHC 8.2.1 release candidate 2

2017-05-16 Thread Ben Gamari
Markus Trippelsdorf writes: > On 2017.05.15 at 22:47 -0400, Ben Gamari wrote: >> >> >> The GHC team is very pleased to announce the second candidate of the >> 8.2.1 release of the Glasgow Haskell Compiler. Source and binary >> distributions are available at >> >>

Re: Default module header `module Main where`

2017-05-16 Thread Adam Bergmark
GHCIs current behavior seems inconsistent with this, why is foo accessible and why don't I get an unused warning like i do if i have an explicit `module Main (main) where`? ``` $ cat Main.hs main :: IO () main = pure () foo :: Int foo = 1 $ ghci Main.hs -Wall GHCi, version 8.0.2:

Re: Default module header `module Main where`

2017-05-16 Thread José Manuel Calderón Trilla
Agreed, this sounds sensible. Can anyone think of any unintended consequences? -Jose On Tue, May 16, 2017, at 09:50 AM, Iavor Diatchki wrote: > That seems fairly reasonable to me. > > -Iavor > > On Tue, May 16, 2017 at 7:18 AM, Joachim Breitner breitner.de> wrote:>> Hi, >>

Re: Default module header `module Main where`

2017-05-16 Thread Iavor Diatchki
That seems fairly reasonable to me. -Iavor On Tue, May 16, 2017 at 7:18 AM, Joachim Breitner wrote: > Hi, > > a very small proposal to be considered for Haskell': > > Currently, the report states > > An abbreviated form of module, consisting only of the module

Default module header `module Main where`

2017-05-16 Thread Joachim Breitner
Hi, a very small proposal to be considered for Haskell': 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

[Haskell] PPDP 2017: ** REVISED PAPER DEADLINE 26 May **

2017-05-16 Thread Brigitte Pientka
CALL FOR PAPERS 19th International Symposium on Principles and Practice of Declarative Programming PPDP 2017 Namur, Belgium, October 9-11,