Several new language proposals/RFC

I add several new languge proposals to Haskell.

But before this I wish to say that a Haskell community has almost none attentions to language proposals and many authors loose their excitement without any discussion and they abandon their proposals.
So I ask to visit Open GHC proposals, choose interesting topics for you and comment/react/discuss there. Don’t look at their date - accepting the proposals could take a lot of months, a discussing could take years. Pulls with mark “Needs revision” are already reviewed by the Committee., the rest - are not.

So, several my new Proposals:

  • For universality we wish to have curried constraints and nested foralls. The only thinng that blocks that - current syntax of the signatures in pat-synonyms. So my proposals suggest to change requested separator from => to |- - New requested separator for Pattern Synonyms

  • ViewPattens extension has the same syntax as RequiredTypeArguments. This is bad. So the proposal New syntax for View Patterns suggest to chage syntax from (expr -> pat) to (pat <- expr).

  • the compiler has limited capacity to infer kinds from forall declarations. More and more parethneses appears in signatures. So a small proposal Kinded Forall suggest more simple signatures, like next

foo :: forall m n r (a :: Type) :: Nat.  Vec m a -> Vec n a -> Vec r a -> ...  -> t
  • Some times signatures are nor verbose enough to tell the difference between functions. This leads to lack of self-documenting and we need to add more additional information about function in commentaries. So the proposal Decorated Signatures suggest to add decorators to signatures.

I add links to proposal discusdion pages, the link to the text of proposal is in the first comments there!
The discussion is welcomed! And here and there.

1 Like

Haskell is a mature and very complicated language. Combined with the fact that we are working with a language report that hasn’t been updated in 16 years (but we are working on it: GitHub - haskellfoundation/haskell-2010-revised-report: Haskell 2010 Revised Language Report · GitHub) and has instead acquired over 100 language extensions makes the cost of every additional language extension for the ecosystem and the maintainers of all the tools extremely high. For a GHC proposal to have any chance of being accepted it must reach that high threshold, and most ideas which would objectively make the language better if we were to design it from scratch just fail to cross that threshold. It takes a lot of effort to write a proposal which makes a strong argument and manages to convince the committee.

There are a few kinds of GHC proposals that tend to get accepted more easily, and if you want to get proposals through then you should focus on these:

  • Proposals that fix a bug in the type system: Classical examples would be the design of RoleAnnotations or safe coercions.
  • Proposals that are backed by one or more serious research articles accepted at a major conference: LinearHaskell for example.
  • Proposals that make it possible to write more efficient or safer code in ways that are not possible without the extension: Unboxed* extensions, UnliftedTypes etc.
  • Proposals that provide a principled solution to something which has been handled in an ad-hoc way before: Whitespace-sensitive operator parsing (~, !, @, $, $$, -) by int-index · Pull Request #229 · ghc-proposals/ghc-proposals · GitHub for example.
  • Proposals that fix issues of Haskell that people have been complaining about for decades: Haskell 2010’s impoverished record system, for example.

I think your proposal Extra Commas by VitWW · Pull Request #748 · ghc-proposals/ghc-proposals · GitHub got accepted precisely because it finally solved the issue with trailing commas that users complained about forever. That is already a great success! If you want more people to get onboard with a new proposal then you must, unfortunately, spend a lot of upfront effort and invest it in a proposal and show that you have done all the work. This is just necessary to show that you recognize that once a proposal is accepted, the combined work the community has to invest to maintain it will be significantly higher.

12 Likes

Yeah, I am enough for new syntax, it breaks the whole toolchain

2 Likes

I don’t know how I didn’t run into the conflict between RequiredTypeArguments and ViewPatterns because I know I was using both in the same module at several points. Enabling both to coexist unproblematically would be brilliant because I’m a user of both extensions.

You didn’t “run into” that because there is no conflict; you can use both together. (I won’t say “happily”, because I suspect it needs quite a bit of smarts inside the compiler.)

For example, failing to spell ‘Dependent Haskell’ properly suggests not enough diligence. Persistently claiming proposals are easy at the same time as saying you have not enough competence to implement them — even the superficial trailing commas — suggests not enough effort.

As to why there’s little response, look at wikipedia ‘Warnock’s Dilemma’.

1 Like

That’s good to hear. I may have presumed more diligence on the part of our interlocutor than I should have. As for spelling, though, for all I know, English could well be their 9th or later language, so I wouldn’t feel very confident criticising on that basis, though.

2 Likes

Fair point that English is not their first language. I can tolerate that in general. ‘Dependent Haskell’ is a technical term, spelled that way all through the documentation for RequiredTypeArguments.You’d’a thought diligence would include reading the RTA proposal to establish whether the proposers had anticipated any conflicts; and noting the terminology to use.

1 Like

1 On your Dynamic Existentials proposal, I’ve linked to the discussion thread here on Discourse. (That was your job to link it.) It appears not to have been revised in light of feedback. (Though it’s hard to tell, because so confusingly written.) If you’re not prepared to put in the effort to respond to feedback, why expect others to respond?

2 On your ViewPatterns proposal I’ve provided a link to answer your question as to why what you propose was rejected way back when. (That was your job to answer your own questions. It wasn’t hard to find.)

3 I should point out the huge effort from everybody to get the Extra Commas proposal to a decent level of presentation. I did suggest you find an English speaker and a spell-checker to help first next time. But clearly you haven’t. You do not put forward proposals in their best light. All i’ve seen need considerable work just to understand them. And if I make the effort, they are then unworkable as presented.

ghc does not need more syntactic tweaks — especially when there’s no benefit to the expressivity/semantics. It’s not like there are a horde of ghc developers just waiting for ideas to implement. That’s why there’s a very high bar for getting proposals accepted. So if a proposal seems at first sight unlikely to succeed (though it’s hard to be sure, because so poorly expressed), why would anyone make the effort to provide detailed feedback? Especially when the proposer seems not to be diligent.

4 There’s a load of proposals from you going back more than 2 years. Some seem to be covering the same ground as your recent proposals. Some (from memory) were reviewed as not finding favour. Which do you consider still ‘active’? Please close down the others, to reduce the distractions.

2 Likes

@DavidB Wow! Nice review!

Sure, proposals are comlicated! And proposals for the Haskell are even more complicated because of theoretical limitations!
That is why collective attention to them and verbal brainstorming leads to more excited results.

Which interesting Changes could be in Proposals from my point of view?

  • to produce binary with more quick computation
  • to have more quicker compilation
  • to have much simpler debugging
  • to have more friedly ecosystem
  • to have more simple looking code
  • to have more uni-formated code
  • to have more expressive code
  • to have more abilities

@AntC2

ghc does not need more syntactic tweaks — especially when there’s no benefit to the expressivity/semantics.

Intersting. Do you know that most (but not all) of recent Accepted proposals are focused on “syntax sugar”, like MultiLineStrings, QualifedStrings, InterpolatedStrings and even ExtraCommas?