AW: RE: Hi. I'm new to this mailing list and have a few questions.

Rowan Goemans goemansrowan at gmail.com
Tue Aug 4 17:58:05 UTC 2020


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 <https://github.com/IBM/plex>.
>
> /Anselm Schüler/
>
> /www.anselmschueler.com <http://www.anselmschueler.com>/
>
> /mail at anselmschueler.com <mailto:mail at anselmschueler.com>/
>
> *From: *Simon Peyton Jones <mailto:simonpj at microsoft.com>
> *Sent: *Tuesday, August 4, 2020 18:44
> *To: *Richard Eisenberg <mailto:rae at richarde.dev>; "Anselm Schüler 
> (conversations subemail)" <mailto:conversation at anselmschueler.com>
> *Cc: *ghc-devs at haskell.org <mailto:ghc-devs at 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-bounces at haskell.org> *On Behalf Of *Richard 
> Eisenberg
> *Sent:* 04 August 2020 16:05
> *To:* "Anselm Schüler (conversations subemail)" 
> <conversation at anselmschueler.com>
> *Cc:* ghc-devs at 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/ 
> <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.haskell.org%2Fpipermail%2Fghc-devs%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ce68e6131af494519061c08d83887d962%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637321503404154244&sdata=w4QIMTGeMQ35bEo4xkOn2rIj8z02iMVje4Ar9AXM22k%3D&reserved=0>.
>
> As for a feature request: if your feature changes the language GHC 
> accepts (most do), the right place to post is at 
> https://github.com/ghc-proposals/ghc-proposals 
> <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fghc-proposals%2Fghc-proposals&data=02%7C01%7Csimonpj%40microsoft.com%7Ce68e6131af494519061c08d83887d962%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637321503404164244&sdata=ogVVk5kRFXPc81dZ%2FiyGV9FbgQoQUtzazpFGcrAKUXA%3D&reserved=0>. 
> 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/ 
> <https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.haskell.org%2Fghc%2Fghc%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ce68e6131af494519061c08d83887d962%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637321503404164244&sdata=tg40q%2B9%2BW5KcVzHsPx9oCP7wdw5ipdZCOOdFnzUz3mU%3D&reserved=0>.
>
> I hope this is helpful!
>
> Richard
>
>     On Aug 4, 2020, at 8:59 AM, Anselm Schüler (conversations
>     subemail) <conversation at anselmschueler.com
>     <mailto:conversation at 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/
>
>     /www.anselmschueler.com
>     <https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.anselmschueler.com%2F&data=02%7C01%7Csimonpj%40microsoft.com%7Ce68e6131af494519061c08d83887d962%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637321503404164244&sdata=WJBJ3P%2BFUnTmVs9Z97DHLat9mHr6vC22l0mQ36nafGc%3D&reserved=0>/
>
>     /mail at anselmschueler.com <mailto:mail at anselmschueler.com>/
>
>     _______________________________________________
>     ghc-devs mailing list
>     ghc-devs at haskell.org <mailto:ghc-devs at haskell.org>
>     http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>     <https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devs&data=02%7C01%7Csimonpj%40microsoft.com%7Ce68e6131af494519061c08d83887d962%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637321503404174237&sdata=9y99aKPjfvm7WIH5Xv9JDlN7TIXdVPJZF%2BvAgbUvBUU%3D&reserved=0>
>
>
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20200804/52cd44ab/attachment-0001.html>


More information about the ghc-devs mailing list