Re: Which stable GHC release is expected to have support for linear types?

Hi Wolfgang, I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/tweag/ghc/tree/linear-types. Hope this will help! Cheers, Edvard Hübinette

Hi, Edvard! Thanks a lot for putting this together. This is very helpful indeed. All the best, Wolfgang Am Mittwoch, den 05.07.2017, 16:20 +0000 schrieb Edvard Hübinette:
Hi Wolfgang,
I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/tweag/ghc/tree/lin ear-types.
Hope this will help!
Cheers, Edvard Hübinette

Hi, Edvard! I generally followed the instructions on https://github.com/tweag/ghc/tree/linear-types#building-from-source , but when running git checkout tweag/linear-types , I got the following error message:
fatal: Not a git repository: ${BASEDIR}/ghc/.git/modules/.arc-linters/arcanist-external-json-linter
I guess this is because my local directory is not named “ghc”, but “ghc- linear”. In my opinion, the repository should not assume that a local copy of it resides in a directory of a certain name. Is this a GHC issue or an issue with your linear-types branch? All the best, Wolfgang Am Mittwoch, den 05.07.2017, 16:20 +0000 schrieb Edvard Hübinette:
Hi Wolfgang,
I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/tweag/ghc/tree/lin ear-types.
Hope this will help!
Cheers, Edvard Hübinette

On Sun, Jul 9, 2017 at 4:35 PM, Wolfgang Jeltsch
I got the following error message:
fatal: Not a git repository: ${BASEDIR}/ghc/.git/modules/. arc-linters/arcanist-external-json-linter
I guess this is because my local directory is not named “ghc”, but “ghc- linear”. In my opinion, the repository should not assume that a local copy of it resides in a directory of a certain name. Is this a GHC issue or an issue with your linear-types branch?
Sounds like they forgot to undo some Phabricator-specific setup from the master ghc repo. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Hi Wolfgang,
the directory name should not matter (mine is named differently for
example). Renaming the base directory *after* cloning (instead of using git
clone foo dir-name) can sometimes confuse git, if that might be the problem.
In any case, we are unable to reproduce this so if you could provide exact
reproductions steps we can update the guide. Your git version may be useful
as well.
Cheers,
Edvard
2017-07-09 22:35 GMT+02:00 Wolfgang Jeltsch
Hi, Edvard!
I generally followed the instructions on
https://github.com/tweag/ghc/tree/linear-types#building-from-source ,
but when running
git checkout tweag/linear-types ,
I got the following error message:
fatal: Not a git repository: ${BASEDIR}/ghc/.git/modules/. arc-linters/arcanist-external-json-linter
I guess this is because my local directory is not named “ghc”, but “ghc- linear”. In my opinion, the repository should not assume that a local copy of it resides in a directory of a certain name. Is this a GHC issue or an issue with your linear-types branch?
All the best, Wolfgang
Am Mittwoch, den 05.07.2017, 16:20 +0000 schrieb Edvard Hübinette:
Hi Wolfgang,
I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/tweag/ghc/tree/lin ear-types.
Hope this will help!
Cheers, Edvard Hübinette

Hi, Edvard! I renamed the local directory after cloning. If Git really cannot deal with this, then this is yet another reason for preferring darcs over Git. Unfortunately, it would be hard to reproduce this problem, since I took slightly different steps before incorporating the linear-types branch, as I did not yet know about the documentation on getting the linear- types branch at that time. All the best, Wolfgang Am Montag, den 10.07.2017, 11:22 +0200 schrieb Edvard Hübinette:
Hi Wolfgang,
the directory name should not matter (mine is named differently for example). Renaming the base directory after cloning (instead of using git clone foo dir-name) can sometimes confuse git, if that might be the problem.
In any case, we are unable to reproduce this so if you could provide exact reproductions steps we can update the guide. Your git version may be useful as well.
Cheers, Edvard
2017-07-09 22:35 GMT+02:00 Wolfgang Jeltsch
: Hi, Edvard!
I generally followed the instructions on
https://github.com/tweag/ghc/tree/linear-types#building-from-sou rce ,
but when running
git checkout tweag/linear-types ,
I got the following error message:
fatal: Not a git repository: ${BASEDIR}/ghc/.git/modules/.arc- linters/arcanist-external-json-linter
I guess this is because my local directory is not named “ghc”, but “ghc- linear”. In my opinion, the repository should not assume that a local copy of it resides in a directory of a certain name. Is this a GHC issue or an issue with your linear-types branch?
All the best, Wolfgang
Am Mittwoch, den 05.07.2017, 16:20 +0000 schrieb Edvard Hübinette:
Hi Wolfgang,
I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/tweag/ghc/tree /lin ear-types.
Hope this will help!
Cheers, Edvard Hübinette

2017-07-10 13:41 GMT+02:00 Wolfgang Jeltsch
I renamed the local directory after cloning. If Git really cannot deal with this, then this is yet another reason for preferring darcs over Git. [...]
You can happily move around any cloned repository, Git has absolutely no problem with that. What often breaks is some imperfect tooling on top of Git itself, which might be the case here. Just my 2c, S.

Hi, Am Montag, den 10.07.2017, 16:31 +0200 schrieb Sven Panne:
2017-07-10 13:41 GMT+02:00 Wolfgang Jeltsch
: I renamed the local directory after cloning. If Git really cannot deal with this, then this is yet another reason for preferring darcs over Git. [...]
You can happily move around any cloned repository, Git has absolutely no problem with that. What often breaks is some imperfect tooling on top of Git itself, which might be the case here.
I found that this is not true for git modules, which can be very annoying; see https://stackoverflow.com/a/11298947/946226 (Of course, in some sense, git modules are “imperfect tooling on top of Git”, so you are not wrong). Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/

2017-07-11 8:39 GMT+02:00 Joachim Breitner
Am Montag, den 10.07.2017, 16:31 +0200 schrieb Sven Panne:
You can happily move around any cloned repository, Git has absolutely no problem with that. What often breaks is some imperfect tooling on top of Git itself, which might be the case here.
I found that this is not true for git modules, which can be very annoying; see https://stackoverflow.com/a/11298947/946226 [...]
This is only true for repos created with ancient Git versions. With newer versions (>= 1.7.10) there is no problem, see e.g. https://stackoverflow.com/questions/17568543/git-add-doesnt-work/17747571#17... .

Hi! I was finally able to get GHC with the linear types extension running. There is one bit missing though: How do I enable this extension? Apparently there is no extension whose name starts with “Linear”, and when quickly skimming through the list of extensions available for auto- completion in GHCi, I could not find anything related to linear types. All the best, Wolfgang Am Mittwoch, den 05.07.2017, 16:20 +0000 schrieb Edvard Hübinette:
Hi Wolfgang,
I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/tweag/ghc/tree/lin ear-types.
Hope this will help!
Cheers, Edvard Hübinette

Hi! I think I figured it out meanwhile: The linear types extension is enabled all the time. I had thought about this possibility already, but then concluded that this was not the case, since types of the form a -o b were not supported. However, when looking at the diffs, I discovered that at the moment, only the Unicode syntax a ⊸ b is understood. All the best, Wolfgang Am Montag, den 10.07.2017, 18:55 +0300 schrieb Wolfgang Jeltsch:
Hi!
I was finally able to get GHC with the linear types extension running. There is one bit missing though: How do I enable this extension? Apparently there is no extension whose name starts with “Linear”, and when quickly skimming through the list of extensions available for auto-completion in GHCi, I could not find anything related to linear types.
All the best, Wolfgang
Am Mittwoch, den 05.07.2017, 16:20 +0000 schrieb Edvard Hübinette:
Hi Wolfgang,
I've put together a small README for getting this up and running (both for using stack with pre-built Docker images, and from source). It can be found in the repository here: https://github.com/ tweag/ghc/tree/linear-types.
Hope this will help!
Cheers, Edvard Hübinette
ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

On Wed, Jul 12, 2017 at 4:11 PM, Wolfgang Jeltsch
I had thought about this possibility already, but then concluded that this was not the case, since types of the form a -o b were not supported. However, when looking at the diffs, I discovered that at the moment, only the Unicode syntax a ⊸ b is understood.
"-o" is going to give the lexer fits. Come up with a purely symbolic version. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

On Wed, Jul 12, 2017 at 4:11 PM, Wolfgang Jeltsch .info> wrote:
I had thought about this possibility already, but then concluded that this was not the case, since types of the form a -o b were not supported. However, when looking at the diffs, I discovered that at the moment, only the Unicode syntax a ⊸ b is understood. "-o" is going to give the lexer fits. Come up with a purely symbolic version. It was not me who invented the syntax “-o”. Actually, I do not like it either. While it nicely resembles the lollipop (⊸), implementing it requires stealing syntax. This syntax stealing is worse than the syntax stealing of, say, hierarchical modules. With hierarchical modules in
Am Mittwoch, den 12.07.2017, 16:15 -0400 schrieb Brandon Allbery: place, you have to use spaces in function composition, but this is reasonable anyhow. However, with “-o” as a lollipop alternative in place, you have to write the negation of o with a space, which is awkward. Alternatives for “-o” I can think of are “~>”, “-:”, and “-*”, the latter resembling the magic wand operators in the logic of bunched implications and in separation logic, which are similar to the lollipop in linear logic. All the best, Wolfgang

Hi, Am Mittwoch, den 12.07.2017, 23:47 +0300 schrieb Wolfgang Jeltsch:
Alternatives for “-o” I can think of are “~>”, “-:”, and “-*”, the latter resembling the magic wand operators in the logic of bunched implications and in separation logic, which are similar to the lollipop in linear logic.
how about -<> ? Joachim -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/

Am Donnerstag, den 13.07.2017, 11:03 +0200 schrieb Joachim Breitner:
Am Mittwoch, den 12.07.2017, 23:47 +0300 schrieb Wolfgang Jeltsch:
Alternatives for “-o” I can think of are “~>”, “-:”, and “-*”, the latter resembling the magic wand operators in the logic of bunched implications and in separation logic, which are similar to the lollipop in linear logic.
how about -<> ?
Hmm, the “<>” part seems to be a bit heavy compared to the little “-”. All the best, Wolfgang

How about: -+
It almost looks arrow like if you squint, and have a font that lines up the
horizontal lines.
Cheers,
Mike
On 14 Jul 2017 08:32, "Wolfgang Jeltsch"
Am Mittwoch, den 12.07.2017, 23:47 +0300 schrieb Wolfgang Jeltsch:
Alternatives for “-o” I can think of are “~>”, “-:”, and “-*”, the latter resembling the magic wand operators in the logic of bunched implications and in separation logic, which are similar to the lollipop in linear logic.
how about -<> ?
Hmm, the “<>” part seems to be a bit heavy compared to the little “-”. All the best, Wolfgang _______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

How about: -+
It almost looks arrow like if you squint, and have a font that lines up the horizontal lines. Interesting idea. Seems pretty good to me. It does not only look arrow-
Am Freitag, den 14.07.2017, 09:26 +1000 schrieb Mike Ledger: like, but also similar to the lollipop (⊸). Let’s try it out:
fmap :: Functor f => (a -+ b) -> f a -+ f b Yes, this looks quite nice. Let’s compare it to the Unicode version: fmap ∷ Functor f ⇒ (a ⊸ b) → (f a ⊸ f b) They look similar indeed. 😉 All the best, Wolfgang

On 2017-07-14 01:26, Mike Ledger wrote:
How about: -+
It almost looks arrow like if you squint, and have a font that lines up the horizontal lines.
This may play havoc with programming fonts with ligatures where it might be rendered as a single ± symbol. (I haven't tested any of the fonts, I'm just saying it _could_ be an issue.) Regards,

Am Freitag, den 14.07.2017, 06:42 +0200 schrieb Bardur Arantsson:
On 2017-07-14 01:26, Mike Ledger wrote:
How about: -+
It almost looks arrow like if you squint, and have a font that lines up the horizontal lines.
This may play havoc with programming fonts with ligatures where it might be rendered as a single ± symbol.
(I haven't tested any of the fonts, I'm just saying it _could_ be an issue.)
I would expect such fonts to translate “+-”, not “-+”, into “±”. All the best, Wolfgang

On 2017-07-14 21:59, Wolfgang Jeltsch wrote:
Am Freitag, den 14.07.2017, 06:42 +0200 schrieb Bardur Arantsson:
On 2017-07-14 01:26, Mike Ledger wrote:
How about: -+
It almost looks arrow like if you squint, and have a font that lines up the horizontal lines.
This may play havoc with programming fonts with ligatures where it might be rendered as a single ± symbol.
(I haven't tested any of the fonts, I'm just saying it _could_ be an issue.)
I would expect such fonts to translate “+-”, not “-+”, into “±”.
Maybe, but it seems a bit fragile to me... What about -*? At least there's no ambiguity there. Regards,

On Sat, Jul 15, 2017 at 4:57 AM, Bardur Arantsson
Maybe, but it seems a bit fragile to me...
What about -*? At least there's no ambiguity there.
As previously stated: "Alternatives for “-o” I can think of are “~>”, “-:”, and “-*”, the latter resembling the magic wand operators in the logic of bunched implications and in separation logic, which are similar to the lollipop in linear logic." -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Am Samstag, den 15.07.2017, 10:57 +0200 schrieb Bardur Arantsson:
On 2017-07-14 21:59, Wolfgang Jeltsch wrote:
Am Freitag, den 14.07.2017, 06:42 +0200 schrieb Bardur Arantsson:
On 2017-07-14 01:26, Mike Ledger wrote:
How about: -+
It almost looks arrow like if you squint, and have a font that lines up the horizontal lines.
This may play havoc with programming fonts with ligatures where it might be rendered as a single ± symbol. I would expect such fonts to translate “+-”, not “-+”, into “±”.
Maybe, but it seems a bit fragile to me...
I would not care too much about such fonts. In my opinion, the natural way is to generate ± from +-, not from -+. Since there is the option to generate ± from +-, there is no need to additionally generate it from -+. Font designers could just stop doing this if there are doing it at all at the moment.
What about -*? At least there's no ambiguity there.
The problem with -* is that the star is typically higher than the -, so that -* looks a bit awkward. I think, using -+ is a pretty good idea. All the best, Wolfgang
participants (7)
-
Bardur Arantsson
-
Brandon Allbery
-
Edvard Hübinette
-
Joachim Breitner
-
Mike Ledger
-
Sven Panne
-
Wolfgang Jeltsch