And also, it’s really weird and seems like a feature that should be removed IMO. It kind of looks like the type variable _ is always in-scope, and it’s unclear if the type of the resulting function is just type variables without an explicit forall or if _ has a special meaning.

 

Anselm Schüler

www.anselmschueler.com

 

From: Anselm Schüler (conversations subemail)
Sent: Tuesday, August 4, 2020 20:09
To: Rowan Goemans; ghc-devs@haskell.org
Subject: RE: AW: RE: Hi. I'm new to this mailing list and have a few questions.

 

True, but this makes the type less readable since id @_ :: _ -> _.

 

Anselm Schüler

www.anselmschueler.com

 

From: Rowan Goemans
Sent: Tuesday, August 4, 2020 19:59
To: ghc-devs@haskell.org
Subject: Re: AW: RE: Hi. I'm new to this mailing list and have a few questions.

 

Just as a heads up. You can achieve what you want already by doing:

f @_ @([String]) :: forall a. (a, [String]) -> ([String], a)

Best regards,

Rowan Goemans

On 8/4/20 7:45 PM, Anselm Schüler (conversations subemail) wrote:

Thank you for the nice introduction :) !

I will check out the GHC proposals site.

And following Simon’s (I hope addressing with first name is OK) suggestion, I’m going to give an outline of the idea.

 

The idea is to extend type application syntax to enable explicit assignment of types to specific type variables.

For instance, say I have f :: forall a b. (a, b) -> (b, a), and I want to apply the type [String] to it. My only option is to do

f @([String]) :: forall b. ([String], b) -> (b, [String])

—but what if, instead, I want a function of type forall a. (a, [String]) -> ([String], a)?

I propose the following syntax:

f @{b = [String]} :: forall a. ([String], b) -> (b, [String])

This wouldn’t break any existing programs since using record syntax here is already disallowed and met with an error message.

A question is of course the symbol used for assignment (~, =, ::, or ->?).

 

I hope the code shows up as a monospace font on your end. I used the IBM Plex Mono font, which is open-source.

 

Anselm Schüler

wwwanselmschueler.com

m...@anselmschueler.com

 

From: Simon Peyton Jones
Sent: Tuesday, August 4, 2020 18:44
To: Richard Eisenberg; "Anselm Schüler (conversations subemail)"
Cc: ghc-devs@haskell.org
Subject: RE: Hi. I'm new to this mailing list and have a few questions.

 

Welcome Anselm  ghc-devs is a very informal mailing list, and we welcome newcomers.

 

For example, I have a feature idea in the back of my mind, which I imagine would be easy to implement

 

What Richard says is right, but you should feel free to fly the kite on this list if you want – or on Haskell Café – to get some idea of whether others seem warm about the idea, before writing a full proposal. 

 

Simon

 

From: ghc-devs <ghc-devs-boun...@haskell.org> On Behalf Of Richard Eisenberg
Sent: 04 August 2020 16:05
To: "Anselm Schüler (conversations subemail)" <conversation@anselmschuelercom>
Cc: ghc-devs@haskell.org
Subject: Re: Hi. I'm new to this mailing list and have a few questions.

 

Hi Anselm,

 

Welcome!

 

A good way of getting used to a list like this one is to wait a little while and observe what kind of messages others send; this will give you a feel for how the list is used. If you're impatient, you can also check out the archives at https://mail.haskell.org/pipermail/ghc-devs/.

 

As for a feature request: if your feature changes the language GHC accepts (most do), the right place to post is at https://githubcom/ghc-proposals/ghc-proposals. There is a description of how to proceed on that page. Proposals submitted there get debated within the community and then eventually sent to a GHC Steering Committee for a vote on acceptance or rejection. Then, we worry about implementing it. If you have a suggestion that does not change the language GHC accepts, you can post an Issue at https://gitlab.haskell.org/ghc/ghc/.

 

I hope this is helpful!

Richard

 

On Aug 4, 2020, at 8:59 AM, Anselm Schüler (conversations subemail) <conversat...@anselmschueler.com> wrote:

 

First of all, in general, I’m new to mailing lists (as used for discussions) in general, so a question about that:

When subscribed to the mailing list, do you get every message, or are some discussions hidden?

 

Second of all, I’d like to know what kinds of messages are appropriate here. I’m not familiar with coding compilers or anything of the like, so I’m somewhat afraid of offering unhelpful comments or being just woefully underqualified to participate here.

For example, I have a feature idea in the back of my mind, which I imagine would be easy to implement (that might be wrong). Is it alright if I submit that here or should I use some other forum?

 

Thank you in advance for the answers.

 

Anselm Schüler

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

 

 

 

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

 

 

_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to