RE: Unpacking coercions

2018-09-05 Thread Simon Peyton Jones via ghc-devs
OK – a good thread. From it I have learned * What the goal is * That exposing (~#) and (~R#) is not just lexically tricky; it’s deeper than that (Richard’s note below). * That there is a viable, implementation plan; not a thing of beauty perhaps, but ok if carefully documented

Re: Unpacking coercions

2018-09-05 Thread Richard Eisenberg
I don't think that wiki reference is really about this problem. Instead, I think that we'd need Constraint# to be able to offer users ~# and ~R#. The problem, then, is that there is no answer to this question: Constraint is to Type as Constraint# is to what? Currently, if ~# and ~R# are the

Re: Unpacking coercions

2018-09-05 Thread Ryan Scott
> We could utterly lie and say > > data Coercion a b where > > Coercion :: Coercion a a > > > > That would generate the right bits in in the .o file, and we’d totally ignore the .hi file. Gruesome but I think it would work. This was precisely what I had in mind.

RE: Unpacking coercions

2018-09-05 Thread Simon Peyton Jones via ghc-devs
I think the intention is to have that proposal (which proposes a language change) be superseded by this idea (which does not change the language). Oh, I did not know that. I’ll ignore the proposal for now, in that case. All that would take is putting Coercion in TysWiredIn, and moving Coercion

Re: Running GHC 7.10.2 on Ubuntu 18.04 ?

2018-09-05 Thread Ömer Sinan Ağacan
Thanks, that worked! Ömer Vanessa McHale , 5 Eyl 2018 Çar, 17:35 tarihinde şunu yazdı: > GHC 7.10.3 works fine for me when I use the hvr ppa > https://launchpad.net/~hvr/+archive/ubuntu/ghc > > On 09/05/2018 09:23 AM, Ömer Sinan Ağacan wrote: > > Hi, > > I'm trying to use GHC 7.10.2 (the Debian

Re: Running GHC 7.10.2 on Ubuntu 18.04 ?

2018-09-05 Thread Vanessa McHale
GHC 7.10.3 works fine for me when I use the hvr ppa https://launchpad.net/~hvr/+archive/ubuntu/ghc On 09/05/2018 09:23 AM, Ömer Sinan Ağacan wrote: > Hi, > > I'm trying to use GHC 7.10.2 (the Debian 8 bindist from haskell.org) on Ubuntu > 18.04. It's currently failing with linker errors when I

Re: Running GHC 7.10.2 on Ubuntu 18.04 ?

2018-09-05 Thread Ryan Scott
This is likely caused by an old GHC bug that interacts poorly with newer version of binutils (I can't remember the exact bug, unfortunately). I personally use hvr's Ubuntu PPA [1] whenever installing GHC on Ubuntu. This PPA backports patches to old versions of GHC to keep them working with newer

RE: Rational for the special case in mkWWcpr_help

2018-09-05 Thread Simon Peyton Jones via ghc-devs
I think it would yield the same code in the end. Maybe it was just seeking to avoid unnecessary clutter in a particularly common case (eg returning I# x). Seems to have been introduce in commit 731f53de7930c38b5023a871146bd0ec066edf3a Author: simonpj Fri Sep 17 09:15:44 1999 + Simon

Re: Unpacking coercions

2018-09-05 Thread Ryan Scott
> Simple is good. But what is this dead simple idea? I'm referring to David's first e-mail on this thread: https://mail.haskell.org/pipermail/ghc-devs/2018-September/016191.html All that would take is putting Coercion in TysWiredIn, and moving Coercion from Data.Type.Coercion to somewhere in

RE: Does tyCoVarsOfTypesList guarantee a particular order?

2018-09-05 Thread Simon Peyton Jones via ghc-devs
The left to right ordering is guaranteed by RnTypes.extract functions. See Note [Ordering of implicit variables] I don’t think tyCoVarsOfTypesList makes any guarantees. But it probably *could*. If you look at FV.hs, you’ll see that it works right-to-left, putting ‘x’ on the front of the

Running GHC 7.10.2 on Ubuntu 18.04 ?

2018-09-05 Thread Ömer Sinan Ağacan
Hi, I'm trying to use GHC 7.10.2 (the Debian 8 bindist from haskell.org) on Ubuntu 18.04. It's currently failing with linker errors when I compile `main = return ()`: /usr/bin/x86_64-linux-gnu-ld:

RE: Unpacking coercions

2018-09-05 Thread Simon Peyton Jones via ghc-devs
Simple is good. But what is this dead simple idea? Perhaps: https://github.com/ghc-proposals/ghc-proposals/pull/116 But that proposal lists several possible alternatives. Which one did you mean? And all of them are language changes. Making evidence strict would require no language changes to

Re: Unpacking coercions

2018-09-05 Thread Ryan Scott
These aren't mutually exclusive ideas. While I'm sure there's many ways we could solve this problem, David's idea has the distinct advantage of being dead simple. I'd rather not block his vision on some other large refactor that may never materialize. (And if it _does_ materialize, we could revert

Rational for the special case in mkWWcpr_help

2018-09-05 Thread Spiwack, Arnaud
Dear all, The function mkWWcpr_help, which creates a wrapper and a worker after strictness analysis, has a special case when there is a single result of unlifted type: Wrapper: case (..call worker..) of x -> C x Worker: case ( ..body..) of C x -> x But I don't understand how it

Re: Goals for GHC 8.8

2018-09-05 Thread Boespflug, Mathieu
Hi Ben, yes - as for the implementation of the linear types extension, we're aiming for the submission of a Diff before the 8.8 branch is cut. (If the Committee has given the green light by then, of course.) Best, -- Mathieu Boespflug Founder at http://tweag.io. On Tue, 21 Aug 2018 at 21:34,