<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 18 Dec 2020 at 03:43, Eric Seidel <<a href="mailto:eric@seidel.io">eric@seidel.io</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In my experience, FFI is the kind of extension that you want to<br>
isolate to a single module, and like Cale (or Iavor with the fancier<br>
type system extensions) I like the indicator at the top of the file<br>
that this module will be dealing with FFI concerns. </blockquote><div><br></div><div>I've seen other people express this viewpoint, and I'd like to understand it a bit more. In what way do you see the LANGUAGE pragma at the top of the module as being useful? <br></div><div><br></div><div>To me it's just noise, and unnecessary friction on the developer's workflow. I see LANGUAGE pragmas as useful for experimental or new extensions, when we want to know what code might break if we change it, or we want to add a new extension without breaking old code, or for extensions that we need to be opt-in for a good reason (e.g. TemplateHaskell, which has a significant impact on how we compile things). For long-standing stable extensions, especially ones that are already guarded by syntax, I think LANGUAGE is hurting rather than helping.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In that sense,<br>
FFI feels a lot like MagicHash to me, a very important and useful<br>
extension, but one that you don't want (or at least don't *need*)<br>
enabled everywhere. So it's interesting to me that while FFI has<br>
8 votes now, MagicHash (and UnboxedTuples and UnboxedSums) only<br>
has a single vote.<br></blockquote><div><br></div><div>To some extent this is historical. Unboxed and unlifted types were always seen as "GHC extensions" to standard Haskell. Another compiler would very likely have a different way of defining primitive operations, and may or may not have explicit unboxed types. With GHC, the goal has always been to provide ways to do what you want without using these extensions, and over time the use of these has become more concentrated in the low-level libraries, as it should be. For those reasons I'm happy for the unboxed/unlifted family of extensions to remain opt-in. The FFI is a different matter: it was designed to be something that any compiler could implement regardless of its choice of low-level primitives and types.</div><div><br></div><div>Cheers</div><div>Simon<br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't see excluding FFI from GHC2021 as an argument that it should<br>
be avoided or deprecated, just that it's not a part of the every day<br>
Haskell toolkit. I think it deserves to continue to be part of the<br>
Haskell standard, but is also niche enough to warrant selective<br>
enablement where it's needed. In other words, I think it would be<br>
perfectly fine if the Haskell standard mandated FFI as an extension<br>
that could be enabled on demand (in fact this is how I thought it<br>
worked when I first learned that FFI was included in Haskell2010).<br>
<br>
That all said, there's clearly nothing wrong with enabling it<br>
universally, it's been the default for a while and hasn't caused<br>
any problems I'm aware of. So if Simon M and others feel strongly<br>
about including FFI, I don't want to stand in the way. But I am<br>
curious why we shouldn't include the other parts of the low-level<br>
Haskell toolkit as well.<br>
<br>
Eric<br>
<br>
> On Dec 17, 2020, at 11:47, Cale Gibbard <<a href="mailto:cgibbard@gmail.com" target="_blank">cgibbard@gmail.com</a>> wrote:<br>
> <br>
> My impression of the GHC2021 thing was that it's an arbitrary<br>
> collection of extensions that would make for a sensible default,<br>
> rather than something that was in any way tied to a standardisation<br>
> process.<br>
> <br>
> ForeignFunctionInterface is obviously not going anywhere, but also,<br>
> its use is generally confined to particular modules, where the {-#<br>
> Language ForeignFunctionInterface #-} pragma at the top would be good<br>
> documentation for what sort of module we're about to see. I was also<br>
> slightly concerned that switching that on may have an impact on<br>
> overall compiler performance, seeing as it may need to interact with<br>
> the driver in more ways than most extensions, but I don't really know<br>
> and haven't yet done any testing.<br>
> <br>
> I also had no idea it was turned on by default in Haskell2010, though<br>
> I'm not sure it matters all that much what was turned on in<br>
> Haskell2010 for these purposes either?<br>
> <br>
> That said, I could go either way on this one.<br>
> <br>
> If we're going to turn FFI on, why not throw in all the other<br>
> extensions to FFI? Given that they introduce their own bits of syntax,<br>
> so could hardly affect anything by accident, I think it would be<br>
> appropriate.<br>
> <br>
> <br>
> <br>
> On Thu, 17 Dec 2020 at 11:40, Simon Marlow <<a href="mailto:marlowsd@gmail.com" target="_blank">marlowsd@gmail.com</a>> wrote:<br>
>> <br>
>> Dear Committee<br>
>> <br>
>> We're in danger of actually *removing* an extension from the default set of extensions that is enabled in GHC, which is not what I understood GHC2021 was all about. And it's not because anyone (at least as far as I know) actually thinks that ForeignFunctionInterface is a bad idea and should be deprecated or replaced. What other reasons could there be for turning off an extension that has been on by default for so many years?<br>
>> <br>
>> ForeignFunctionInterface is part of Haskell2010. Are we saying we disagree with the decision to make it a part of the language standard?  I hope not!<br>
>> <br>
>> Please let's think very hard before doing this!<br>
>> <br>
>> Cheers<br>
>> Simon<br>
>> <br>
>> On Mon, 14 Dec 2020 at 22:22, Joachim Breitner <<a href="mailto:mail@joachim-breitner.de" target="_blank">mail@joachim-breitner.de</a>> wrote:<br>
>>> <br>
>>> Dear Committe,<br>
>>> <br>
>>> three weeks in, we have all votes. So now things are looking more concrete.<br>
>>> <br>
>>> As always, the table<br>
>>> <a href="https://github.com/ghc-proposals/ghc-proposals/blob/ghc2021/proposals/0000-ghc2021.rst#data" rel="noreferrer" target="_blank">https://github.com/ghc-proposals/ghc-proposals/blob/ghc2021/proposals/0000-ghc2021.rst#data</a><br>
>>> has the current data.<br>
>>> <br>
>>> Would it be helpful to add columns to that table for each committee<br>
>>> member? So that you can quickly see who voted what?<br>
>>> <br>
>>> The following in are safely in (= need more than one vote to change to get out):<br>
>>> <br>
>>> BangPatterns, BinaryLiterals, ConstrainedClassMethods, ConstraintKinds,<br>
>>> DeriveDataTypeable, DeriveFoldable, DeriveFunctor, DeriveGeneric,<br>
>>> DeriveLift, DeriveTraversable, EmptyCase, EmptyDataDecls,<br>
>>> EmptyDataDeriving, ExplicitForAll, FlexibleContexts, FlexibleInstances,<br>
>>> GADTSyntax, GeneralisedNewtypeDeriving, HexFloatLiterals,<br>
>>> ImportQualifiedPost, InstanceSigs, KindSignatures,<br>
>>> MultiParamTypeClasses, NamedFieldPuns, NumericUnderscores, PolyKinds,<br>
>>> PostfixOperators, RankNTypes, StandaloneDeriving, StarIsType,<br>
>>> TypeApplications, TypeSynonymInstances<br>
>>> <br>
>>> The following are barely in (exactly 8 votes in favor, and 3 against):<br>
>>> <br>
>>> ExistentialQuantification, NamedWildCards, StandaloneKindSignatures,<br>
>>> TypeOperators<br>
>>> <br>
>>> The following are short one vote (7 in favor, 4 against):<br>
>>> <br>
>>> DerivingStrategies, ForeignFunctionInterface, GADTs, MonoLocalBinds,<br>
>>> NegativeLiterals, RecordWildCards, ScopedTypeVariables, TupleSections,<br>
>>> TypeFamilies<br>
>>> <br>
>>> <br>
>>> I am sure we can have plenty of discussion for each of these. Probably<br>
>>> without end. As Simon says, mailing lists don't scale. So I think we<br>
>>> have two choices:<br>
>>> <br>
>>> 1. Let the numbers decide, and accept whatever comes out. According to<br>
>>> the process (which we should only follow if we find it helpful) we’d<br>
>>> maybe update our votes, and maybe point out new facets, for one week,<br>
>>> and then just take whatever has 8 votes.<br>
>>> <br>
>>> or<br>
>>> <br>
>>> 2. Explore a more efficient discussion format.<br>
>>> <br>
>>> For the latter I mentioned <a href="http://kialo.com" rel="noreferrer" target="_blank">kialo.com</a> before, and maybe it is worth a<br>
>>> try, so I set up a discussion there:<br>
>>> <a href="https://www.kialo.com/which-haskell-extensions-should-go-into-ghc2021-43548?path=43548.0" rel="noreferrer" target="_blank">https://www.kialo.com/which-haskell-extensions-should-go-into-ghc2021-43548?path=43548.0</a><br>
>>> <br>
>>> So what do you see there?<br>
>>> <br>
>>> There is a discussion tree:<br>
>>> <br>
>>> The root is “what goes in GHC2021”<br>
>>> <br>
>>> The next layer are all extensions with 7 or 8 votes.<br>
>>> (I assume we should focus on those initially, but feel free to add<br>
>>> more or ask me to.)<br>
>>> For example:  TupleSections<br>
>>> <br>
>>> And then each of these has a column where we can collect Pros and cons.<br>
>>> For example:<br>
>>> Pro: Opt-in Syntax<br>
>>> Con: Possible clash with extra-comma syntax extensions.<br>
>>> <br>
>>> So you can treat it like a wiki, but with structure to organize the<br>
>>> discussion.<br>
>>> <br>
>>> In fact, each pro and con is itself a node where you can add supporting<br>
>>> and disagreeing comments. This means that if you _disagree_ that<br>
>>> TupleSections are actually Opt-in syntax, there is a dedicated place to<br>
>>> raise that point, rather than putting “Not actually opt-in” in the Con<br>
>>> column of TupleSections…<br>
>>> <br>
>>> A good way to navigate the discussion seems to be the radial icon in<br>
>>> the top left; it opens a radial view of the whole discussion, and you<br>
>>> can read arguments by hovering.<br>
>>> <br>
>>> <br>
>>> The site doesn't offer voting, it is only about structuring the<br>
>>> discussion, and it is designed for much larger and much more<br>
>>> contentious debates (e.g. “Brexit”). So we’ll see how well it works for<br>
>>> us and if it’s helpful.<br>
>>> <br>
>>> Cheers,<br>
>>> Joachim<br>
>>> <br>
>>> <br>
>>> --<br>
>>> Joachim Breitner<br>
>>>  <a href="mailto:mail@joachim-breitner.de" target="_blank">mail@joachim-breitner.de</a><br>
>>>  <a href="http://www.joachim-breitner.de/" rel="noreferrer" target="_blank">http://www.joachim-breitner.de/</a><br>
>>> <br>
>>> <br>
>>> _______________________________________________<br>
>>> ghc-steering-committee mailing list<br>
>>> <a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
>>> <a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
>> <br>
>> _______________________________________________<br>
>> ghc-steering-committee mailing list<br>
>> <a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
>> <a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
> _______________________________________________<br>
> ghc-steering-committee mailing list<br>
> <a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
> <a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
<br>
_______________________________________________<br>
ghc-steering-committee mailing list<br>
<a href="mailto:ghc-steering-committee@haskell.org" target="_blank">ghc-steering-committee@haskell.org</a><br>
<a href="https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee" rel="noreferrer" target="_blank">https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee</a><br>
</blockquote></div></div>