RE: Cabal woes

2019-04-15 Thread Simon Peyton Jones via ghc-devs
That’s a tremendously helpful summary, thank you Iavor.  And Michail’s summary 
was also very helpful.

Most of this is doubtless well-known to habitual cabal users, but it might be 
useful to explain the user model, in a way that covers these points, somewhere 
close to the Cabal home page.

Simon

From: Iavor Diatchki 
Sent: 15 April 2019 23:39
To: Simon Peyton Jones 
Cc: Brandon Allbery ; ghc-devs@haskell.org
Subject: Re: Cabal woes

Hello,

in case it is useful, here is how I think about what's happening with cabal.   
At present, `cabal-install` supports two different modes of operation: the old 
style (aka `v1`) and the new style (aka `v2`) and---at least for me---the two 
require a slightly different mental model of what is going on.

In the old model, there is a user package database, and users would use "cabal 
install" to install libraries their manually (e.g., using `cabal-install`).   
Later, when building various artifacts cabal would prefer using the packages 
installed in the user's database.  This database supported having multiple 
versions of a package, but NOT multiple builds of the same version of a package 
(e.g., against different dependencies).  As a result, builds would sometimes 
fail, because the dependencies of packages would clash with each other (the 
unfortunate "cabal hell").

With the new model, there is still a "user" level location where libraries are 
installed, but it is not really directly manipulated by the user---rather it 
acts as more of a "cache" containing all versions of all libraries every built 
and---crucially---it supports having multiple builds of the same version of a 
package against different dependencies.   When users build an artifact using 
the new style (aka "v2"), cabal automatically checks if a suitable version of 
the library is already built in its cache, and if not it adds it there.

The important difference between the two (at least in my mind) is that with the 
new style, you never just install a library on its own.  Rather, you install it 
as a part of a project, so Cabal can compute which version it should install so 
that you get a version compatible with the rest of the project.   Since in this 
model you never really install libraries directly, the `install` command 
defaults to installing executables, which is what the first error is trying to 
say.

So, if you want to try out `hspec` with the `v2` style of Cabal, you'd just add 
it as a dependencies in the `cabal` file of your project, and then use `cabal 
v2-build` to build the project, without having to install it manually first.

I hope this helps,
-Iavor



On Mon, Apr 15, 2019 at 3:01 PM Simon Peyton Jones via ghc-devs 
mailto:ghc-devs@haskell.org>> wrote:
Thanks.  But alas I have no clue about whether I want a v1-install or a 
v2-install, nor how to achieve them if I knew what they were.  I just want to 
install ‘hspec’ so that I can use it when compiling a program.  How would I do 
that?

The instructions here 
https://wiki.haskell.org/Cabal-Install
 just say “cabal install hspec” which is what I tried.  Those instructions are 
pointed to from here 
https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package,
 which in turn are pointed to from the main Cabal home page 
https://www.haskell.org/cabal/.

I must be missing something.

Simon

From: Brandon Allbery mailto:allber...@gmail.com>>
Sent: 15 April 2019 22:54
To: Simon Peyton Jones mailto:simo...@microsoft.com>>
Cc: ghc-devs@haskell.org
Subject: Re: Cabal woes

I think you wanted v1-install to install a library into the user package 
database, since your cabal is 3.x and the v2-* commands are now the default 
(that is, you did what used to be cabal new-install or cabal v2-install).

On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs 
mailto:ghc-devs@haskell.org>> wrote:
I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux) system.
But I fail; see below.
For some reason cabal complains about installing a library.  (That seems 
peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding 
–lib.

Re: Cabal woes

2019-04-15 Thread Mikhail Glushenkov
Hi Brandon,

On Mon, 15 Apr 2019 at 23:46, Brandon Allbery  wrote:
>
> Mikhail, the use case not addressed here is people who are used to v1-style 
> and want to keep using it — and possibly aren't in a great position to rewire 
> their setup to fit how v2 thinks. Personally, I have situations where I use 
> v2 and others where v1 works better.

Sure, that's why we kept v1-* set of commands for now, and also have
implemented 'v2-install --lib' (which would have worked for Simon if
not for the #5990 issue).
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Cabal woes

2019-04-15 Thread Brandon Allbery
But it fails this way instead, because 3.x works differently. Probably
should have checked docs given it's a new major version of cabal-install.

On Mon, Apr 15, 2019 at 6:44 PM Simon Peyton Jones 
wrote:

> Simon has a cabal-install that claims to be 3.0.0.0
>
>
> Ah yes, I installed it thus:
>
> ·sudo add-apt-repository ppa:hvr/ghc-wsl
>
> ·sudo apt-get update
>
> ·sudo apt install cabal-install-3.0
>
>
>
> Why did I do that?  Because earlier versions of cabal crashed with a
> mysterious “The futex facility returned an unexpected” something like this
> https://github.com/Microsoft/WSL/issues/3881 or this
> https://github.com/reflex-frp/reflex-platform/issues/293
>
>
>
> Apparently Herbert’s 3.0 does not fail in this way.
>
>
>
> Simon
>
>
>
> *From:* ghc-devs  *On Behalf Of *Brandon
> Allbery
> *Sent:* 15 April 2019 23:24
> *To:* Oleg Grenrus 
> *Cc:* ghc-devs@haskell.org Devs 
> *Subject:* Re: Cabal woes
>
>
>
> The facts here are in the original message: Simon has a cabal-install that
> claims to be 3.0.0.0, and is treating "install" as "v2-install". So
> evidently *someone* has released it in some fashion, perhaps
> inappropriately.
>
>
>
> On Mon, Apr 15, 2019 at 6:22 PM Oleg Grenrus  wrote:
>
> cabal-install-3 isn't released. Please check the facts.
>
> - Oleg
>
> On 16.4.2019 1.17, Brandon Allbery wrote:
>
> I vaguely recall seeing that bug come up with respect to v2-install. And
> in fact am a bit surprised that 3 has been released, since this is
> highlighting that neither it nor the Haskell ecosystem is quite ready for
> it.
>
>
>
> I'd also have expected (and thought I'd seen) "cabal install" in recent
> 2.x warn that it would be "v1-install" in the future.
>
>
>
> On Mon, Apr 15, 2019 at 6:13 PM Simon Peyton Jones 
> wrote:
>
> Aha!  That works.  I would never in a million years have found that by
> myself.  Thank you.
>
>
>
> But
>
>- It is terribly mysterious that “cabal install hspec” doesn’t, well,
>install hspec.
>- It must surely be a bug that “cabal install –lib hspec” simply
>crashes.
>
>
>
> Simon
>
>
>
> *From:* Brandon Allbery 
> *Sent:* 15 April 2019 23:03
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>
>
> Yes, I think a lot of documentation will need to be updated because this.
> You want "cabal v1-install" with cabal 3.
>
>
>
> On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones 
> wrote:
>
> Thanks.  But alas I have no clue about whether I want a v1-install or a
> v2-install, nor how to achieve them if I knew what they were.  I just want
> to install ‘hspec’ so that I can use it when compiling a program.  How
> would I do that?
>
>
>
> The instructions here https://wiki.haskell.org/Cabal-Install
> 
> just say “cabal install hspec” which is what I tried.  Those instructions
> are pointed to from here
> https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package
> ,
> which in turn are pointed to from the main Cabal home page
> https://www.haskell.org/cabal/
> 
> .
>
>
>
> I must be missing something.
>
>
>
> Simon
>
>
>
> *From:* Brandon Allbery 
> *Sent:* 15 April 2019 22:54
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>
>
> I think you wanted v1-install to install a library into the user package
> database, since your cabal is 3.x and the v2-* commands are now the default
> (that is, you did what used to be cabal new-install or cabal v2-install).
>
>
>
> On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs <
> ghc-devs@haskell.org> wrote:
>
> I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux)
> system.
>
> But I fail; see below.
>
> For some reason cabal complains about installing a library.  (That seems
> peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding
> –lib.
>
> Alas, cabal then crashes outright, which should never happen.
>
> So I’m stuck.  What should I do?
>
> Thanks
>
> Simon
>
>
>
> simonpj@MSRC-9870733:~$ cabal --version
>
> cabal-install version 3.0.0.0
>
> compiled using version 3.0.0.0 of the Cabal library
>
> 

Re: Cabal woes

2019-04-15 Thread Brandon Allbery
Mikhail, the use case not addressed here is people who are used to v1-style
and want to keep using it — and possibly aren't in a great position to
rewire their setup to fit how v2 thinks. Personally, I have situations
where I use v2 and others where v1 works better.

On Mon, Apr 15, 2019 at 6:43 PM Mikhail Glushenkov <
mikhail.glushen...@gmail.com> wrote:

> Hello Simon,
>
> On Mon, 15 Apr 2019 at 23:14, Simon Peyton Jones via ghc-devs
>  wrote:
> >
> > It is terribly mysterious that “cabal install hspec” doesn’t, well,
> install hspec.
>
> In the cabal v2-* model [1] installing libraries globally is no longer
> the recommended mode of operation, which is why you now need to pass
> --lib to 'install' to do that.
>
> There are now better alternatives for most use cases of 'install --lib':
>
> * For just trying out some set of libraries in REPL, you can use
> `cabal new-repl --build-depends=foo,bar,baz` outside of a project
> instead of ghci. [2] If you have .ghc.environment file generation
> turned on, you can also use plain ghci inside your project, and it
> will pick up the project context. [3]
> * For running Haskell scripts that expect extra libraries in the
> global package DB you can use `#! cabal` instead of `#! runghc`. [4]
>
> > It must surely be a bug that “cabal install –lib hspec” simply crashes.
>
> This is a bug that we haven't fixed yet [5]. Should've just worked.
>
>
> [1] https://cabal.readthedocs.io/en/latest/nix-local-build-overview.html
> [2]
> https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-v2-repl
> [3]
> https://cabal.readthedocs.io/en/latest/nix-local-build.html#cfg-field-write-ghc-environment-files
> [4]
> https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-v2-run
> [5] https://github.com/haskell/cabal/issues/5990
>


-- 
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Cabal woes

2019-04-15 Thread Simon Peyton Jones via ghc-devs
Simon has a cabal-install that claims to be 3.0.0.0

Ah yes, I installed it thus:

·sudo add-apt-repository ppa:hvr/ghc-wsl

·sudo apt-get update

·sudo apt install cabal-install-3.0

Why did I do that?  Because earlier versions of cabal crashed with a mysterious 
“The futex facility returned an unexpected” something like this 
https://github.com/Microsoft/WSL/issues/3881 or this 
https://github.com/reflex-frp/reflex-platform/issues/293

Apparently Herbert’s 3.0 does not fail in this way.

Simon

From: ghc-devs  On Behalf Of Brandon Allbery
Sent: 15 April 2019 23:24
To: Oleg Grenrus 
Cc: ghc-devs@haskell.org Devs 
Subject: Re: Cabal woes

The facts here are in the original message: Simon has a cabal-install that 
claims to be 3.0.0.0, and is treating "install" as "v2-install". So evidently 
*someone* has released it in some fashion, perhaps inappropriately.

On Mon, Apr 15, 2019 at 6:22 PM Oleg Grenrus 
mailto:oleg.gren...@iki.fi>> wrote:

cabal-install-3 isn't released. Please check the facts.

- Oleg

On 16.4.2019 1.17, Brandon Allbery wrote:
I vaguely recall seeing that bug come up with respect to v2-install. And in 
fact am a bit surprised that 3 has been released, since this is highlighting 
that neither it nor the Haskell ecosystem is quite ready for it.

I'd also have expected (and thought I'd seen) "cabal install" in recent 2.x 
warn that it would be "v1-install" in the future.

On Mon, Apr 15, 2019 at 6:13 PM Simon Peyton Jones 
mailto:simo...@microsoft.com>> wrote:
Aha!  That works.  I would never in a million years have found that by myself.  
Thank you.

But

  *   It is terribly mysterious that “cabal install hspec” doesn’t, well, 
install hspec.
  *   It must surely be a bug that “cabal install –lib hspec” simply crashes.

Simon

From: Brandon Allbery mailto:allber...@gmail.com>>
Sent: 15 April 2019 23:03
To: Simon Peyton Jones mailto:simo...@microsoft.com>>
Cc: ghc-devs@haskell.org
Subject: Re: Cabal woes

Yes, I think a lot of documentation will need to be updated because this. You 
want "cabal v1-install" with cabal 3.

On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones 
mailto:simo...@microsoft.com>> wrote:
Thanks.  But alas I have no clue about whether I want a v1-install or a 
v2-install, nor how to achieve them if I knew what they were.  I just want to 
install ‘hspec’ so that I can use it when compiling a program.  How would I do 
that?

The instructions here 
https://wiki.haskell.org/Cabal-Install
 just say “cabal install hspec” which is what I tried.  Those instructions are 
pointed to from here 
https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package,
 which in turn are pointed to from the main Cabal home page 
https://www.haskell.org/cabal/.

I must be missing something.

Simon

From: Brandon Allbery mailto:allber...@gmail.com>>
Sent: 15 April 2019 22:54
To: Simon Peyton Jones mailto:simo...@microsoft.com>>
Cc: ghc-devs@haskell.org
Subject: Re: Cabal woes

I think you wanted v1-install to install a library into the user package 
database, since your cabal is 3.x and the v2-* commands are now the default 
(that is, you did what used to be cabal new-install or cabal v2-install).

On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs 
mailto:ghc-devs@haskell.org>> wrote:
I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux) system.
But I fail; see below.
For some reason cabal complains about installing a library.  (That seems 
peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding 
–lib.
Alas, cabal then crashes outright, which should never happen.
So I’m stuck.  What should I do?
Thanks
Simon


simonpj@MSRC-9870733:~$ cabal --version

cabal-install version 3.0.0.0

compiled using version 3.0.0.0 of the Cabal library

simonpj@MSRC-9870733:~$ cabal install hspec

Resolving dependencies...

Up to date

Warning: You asked to install executables, but there are no executables in

target: hspec. Perhaps you want to use --lib to install libraries instead.

simonpj@MSRC-9870733:~$ cabal install --lib 

Re: Cabal woes

2019-04-15 Thread Mikhail Glushenkov
Hello Simon,

On Mon, 15 Apr 2019 at 23:14, Simon Peyton Jones via ghc-devs
 wrote:
>
> It is terribly mysterious that “cabal install hspec” doesn’t, well, install 
> hspec.

In the cabal v2-* model [1] installing libraries globally is no longer
the recommended mode of operation, which is why you now need to pass
--lib to 'install' to do that.

There are now better alternatives for most use cases of 'install --lib':

* For just trying out some set of libraries in REPL, you can use
`cabal new-repl --build-depends=foo,bar,baz` outside of a project
instead of ghci. [2] If you have .ghc.environment file generation
turned on, you can also use plain ghci inside your project, and it
will pick up the project context. [3]
* For running Haskell scripts that expect extra libraries in the
global package DB you can use `#! cabal` instead of `#! runghc`. [4]

> It must surely be a bug that “cabal install –lib hspec” simply crashes.

This is a bug that we haven't fixed yet [5]. Should've just worked.


[1] https://cabal.readthedocs.io/en/latest/nix-local-build-overview.html
[2] https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-v2-repl
[3] 
https://cabal.readthedocs.io/en/latest/nix-local-build.html#cfg-field-write-ghc-environment-files
[4] https://cabal.readthedocs.io/en/latest/nix-local-build.html#cabal-v2-run
[5] https://github.com/haskell/cabal/issues/5990
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Cabal woes

2019-04-15 Thread Iavor Diatchki
Hello,

in case it is useful, here is how I think about what's happening with
cabal.   At present, `cabal-install` supports two different modes of
operation: the old style (aka `v1`) and the new style (aka `v2`) and---at
least for me---the two require a slightly different mental model of what is
going on.

In the old model, there is a user package database, and users would use
"cabal install" to install libraries their manually (e.g., using
`cabal-install`).   Later, when building various artifacts cabal would
prefer using the packages installed in the user's database.  This database
supported having multiple versions of a package, but NOT multiple builds of
the same version of a package (e.g., against different dependencies).  As a
result, builds would sometimes fail, because the dependencies of packages
would clash with each other (the unfortunate "cabal hell").

With the new model, there is still a "user" level location where libraries
are installed, but it is not really directly manipulated by the
user---rather it acts as more of a "cache" containing all versions of all
libraries every built and---crucially---it supports having multiple builds
of the same version of a package against different dependencies.   When
users build an artifact using the new style (aka "v2"), cabal automatically
checks if a suitable version of the library is already built in its cache,
and if not it adds it there.

The important difference between the two (at least in my mind) is that with
the new style, you never just install a library on its own.  Rather, you
install it as a part of a project, so Cabal can compute which version it
should install so that you get a version compatible with the rest of the
project.   Since in this model you never really install libraries directly,
the `install` command defaults to installing executables, which is what the
first error is trying to say.

So, if you want to try out `hspec` with the `v2` style of Cabal, you'd just
add it as a dependencies in the `cabal` file of your project, and then use
`cabal v2-build` to build the project, without having to install it
manually first.

I hope this helps,
-Iavor



On Mon, Apr 15, 2019 at 3:01 PM Simon Peyton Jones via ghc-devs <
ghc-devs@haskell.org> wrote:

> Thanks.  But alas I have no clue about whether I want a v1-install or a
> v2-install, nor how to achieve them if I knew what they were.  I just want
> to install ‘hspec’ so that I can use it when compiling a program.  How
> would I do that?
>
>
>
> The instructions here https://wiki.haskell.org/Cabal-Install just say
> “cabal install hspec” which is what I tried.  Those instructions are
> pointed to from here
> https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package, which in
> turn are pointed to from the main Cabal home page
> https://www.haskell.org/cabal/.
>
>
>
> I must be missing something.
>
>
>
> Simon
>
>
>
> *From:* Brandon Allbery 
> *Sent:* 15 April 2019 22:54
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>
>
> I think you wanted v1-install to install a library into the user package
> database, since your cabal is 3.x and the v2-* commands are now the default
> (that is, you did what used to be cabal new-install or cabal v2-install).
>
>
>
> On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs <
> ghc-devs@haskell.org> wrote:
>
> I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux)
> system.
>
> But I fail; see below.
>
> For some reason cabal complains about installing a library.  (That seems
> peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding
> –lib.
>
> Alas, cabal then crashes outright, which should never happen.
>
> So I’m stuck.  What should I do?
>
> Thanks
>
> Simon
>
>
>
> simonpj@MSRC-9870733:~$ cabal --version
>
> cabal-install version 3.0.0.0
>
> compiled using version 3.0.0.0 of the Cabal library
>
> simonpj@MSRC-9870733:~$ cabal install hspec
>
> Resolving dependencies...
>
> Up to date
>
> Warning: You asked to install executables, but there are no executables in
>
> target: hspec. Perhaps you want to use --lib to install libraries instead.
>
> simonpj@MSRC-9870733:~$ cabal install --lib hspec
>
> Resolving dependencies...
>
> Up to date
>
> Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for
> pattern Just ghcPkgProg
>
>
>
> simonpj@MSRC-9870733:~$ which ghc
>
> /opt/ghc/bin/ghc
>
> simonpj@MSRC-9870733:~$ which ghc-pkg
>
> /opt/ghc/bin/ghc-pkg
>
> simonpj@MSRC-9870733:~$
>
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> 
>
>
>
>

Re: Cabal woes

2019-04-15 Thread Brandon Allbery
The facts here are in the original message: Simon has a cabal-install that
claims to be 3.0.0.0, and is treating "install" as "v2-install". So
evidently *someone* has released it in some fashion, perhaps
inappropriately.

On Mon, Apr 15, 2019 at 6:22 PM Oleg Grenrus  wrote:

> cabal-install-3 isn't released. Please check the facts.
>
> - Oleg
>
> On 16.4.2019 1.17, Brandon Allbery wrote:
>
> I vaguely recall seeing that bug come up with respect to v2-install. And
> in fact am a bit surprised that 3 has been released, since this is
> highlighting that neither it nor the Haskell ecosystem is quite ready for
> it.
>
> I'd also have expected (and thought I'd seen) "cabal install" in recent
> 2.x warn that it would be "v1-install" in the future.
>
> On Mon, Apr 15, 2019 at 6:13 PM Simon Peyton Jones 
> wrote:
>
>> Aha!  That works.  I would never in a million years have found that by
>> myself.  Thank you.
>>
>>
>>
>> But
>>
>>- It is terribly mysterious that “cabal install hspec” doesn’t, well,
>>install hspec.
>>- It must surely be a bug that “cabal install –lib hspec” simply
>>crashes.
>>
>>
>>
>> Simon
>>
>>
>>
>> *From:* Brandon Allbery 
>> *Sent:* 15 April 2019 23:03
>> *To:* Simon Peyton Jones 
>> *Cc:* ghc-devs@haskell.org
>> *Subject:* Re: Cabal woes
>>
>>
>>
>> Yes, I think a lot of documentation will need to be updated because this.
>> You want "cabal v1-install" with cabal 3.
>>
>>
>>
>> On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones 
>> wrote:
>>
>> Thanks.  But alas I have no clue about whether I want a v1-install or a
>> v2-install, nor how to achieve them if I knew what they were.  I just want
>> to install ‘hspec’ so that I can use it when compiling a program.  How
>> would I do that?
>>
>>
>>
>> The instructions here https://wiki.haskell.org/Cabal-Install
>> 
>> just say “cabal install hspec” which is what I tried.  Those instructions
>> are pointed to from here
>> https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package
>> ,
>> which in turn are pointed to from the main Cabal home page
>> https://www.haskell.org/cabal/
>> 
>> .
>>
>>
>>
>> I must be missing something.
>>
>>
>>
>> Simon
>>
>>
>>
>> *From:* Brandon Allbery 
>> *Sent:* 15 April 2019 22:54
>> *To:* Simon Peyton Jones 
>> *Cc:* ghc-devs@haskell.org
>> *Subject:* Re: Cabal woes
>>
>>
>>
>> I think you wanted v1-install to install a library into the user package
>> database, since your cabal is 3.x and the v2-* commands are now the default
>> (that is, you did what used to be cabal new-install or cabal v2-install).
>>
>>
>>
>> On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs <
>> ghc-devs@haskell.org> wrote:
>>
>> I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux)
>> system.
>>
>> But I fail; see below.
>>
>> For some reason cabal complains about installing a library.  (That seems
>> peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding
>> –lib.
>>
>> Alas, cabal then crashes outright, which should never happen.
>>
>> So I’m stuck.  What should I do?
>>
>> Thanks
>>
>> Simon
>>
>>
>>
>> simonpj@MSRC-9870733:~$ cabal --version
>>
>> cabal-install version 3.0.0.0
>>
>> compiled using version 3.0.0.0 of the Cabal library
>>
>> simonpj@MSRC-9870733:~$ cabal install hspec
>>
>> Resolving dependencies...
>>
>> Up to date
>>
>> Warning: You asked to install executables, but there are no executables in
>>
>> target: hspec. Perhaps you want to use --lib to install libraries instead.
>>
>> simonpj@MSRC-9870733:~$ cabal install --lib hspec
>>
>> Resolving dependencies...
>>
>> Up to date
>>
>> Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for
>> pattern Just ghcPkgProg
>>
>>
>>
>> simonpj@MSRC-9870733:~$ which ghc
>>
>> /opt/ghc/bin/ghc
>>
>> simonpj@MSRC-9870733:~$ which ghc-pkg
>>
>> /opt/ghc/bin/ghc-pkg
>>
>> simonpj@MSRC-9870733:~$
>>
>>
>>
>> ___
>> ghc-devs mailing list
>> ghc-devs@haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>> 

Re: Cabal woes

2019-04-15 Thread Oleg Grenrus

cabal-install-3 isn't released. Please check the facts.

- Oleg

On 16.4.2019 1.17, Brandon Allbery wrote:

I vaguely recall seeing that bug come up with respect to v2-install. 
And in fact am a bit surprised that 3 has been released, since this is 
highlighting that neither it nor the Haskell ecosystem is quite ready 
for it.


I'd also have expected (and thought I'd seen) "cabal install" in 
recent 2.x warn that it would be "v1-install" in the future.


On Mon, Apr 15, 2019 at 6:13 PM Simon Peyton Jones 
mailto:simo...@microsoft.com>> wrote:


Aha!  That works.  I would never in a million years have found
that by myself.  Thank you.

But

  * It is terribly mysterious that “cabal install hspec” doesn’t,
well, install hspec.
  * It must surely be a bug that “cabal install –lib hspec” simply
crashes.

Simon

*From:*Brandon Allbery mailto:allber...@gmail.com>>
*Sent:* 15 April 2019 23:03
*To:* Simon Peyton Jones mailto:simo...@microsoft.com>>
*Cc:* ghc-devs@haskell.org 
*Subject:* Re: Cabal woes

Yes, I think a lot of documentation will need to be updated
because this. You want "cabal v1-install" with cabal 3.

On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones
mailto:simo...@microsoft.com>> wrote:

Thanks.  But alas I have no clue about whether I want a
v1-install or a v2-install, nor how to achieve them if I knew
what they were.  I just want to install ‘hspec’ so that I can
use it when compiling a program.  How would I do that?

The instructions here https://wiki.haskell.org/Cabal-Install


just say “cabal install hspec” which is what I tried.  Those
instructions are pointed to from here
https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package

,
which in turn are pointed to from the main Cabal home page
https://www.haskell.org/cabal/

.

I must be missing something.

Simon

*From:*Brandon Allbery mailto:allber...@gmail.com>>
*Sent:* 15 April 2019 22:54
*To:* Simon Peyton Jones mailto:simo...@microsoft.com>>
*Cc:* ghc-devs@haskell.org 
*Subject:* Re: Cabal woes

I think you wanted v1-install to install a library into the
user package database, since your cabal is 3.x and the v2-*
commands are now the default (that is, you did what used to be
cabal new-install or cabal v2-install).

On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via
ghc-devs mailto:ghc-devs@haskell.org>>
wrote:

I’m trying to install ‘hspec’ on my WSL (Windows subsystem
for Linux) system.

But I fail; see below.

For some reason cabal complains about installing a
library.  (That seems peculiar – isn’t that what cabal is
for?)  But it helpfully suggests adding –lib.

Alas, cabal then crashes outright, which should never happen.

So I’m stuck. What should I do?

Thanks

Simon

simonpj@MSRC-9870733:~$ cabal --version

cabal-install version 3.0.0.0

compiled using version 3.0.0.0 of the Cabal library

simonpj@MSRC-9870733:~$ cabal install hspec

Resolving dependencies...

Up to date

Warning: You asked to install executables, but there are
no executables in

target: hspec. Perhaps you want to use --lib to install
libraries instead.

simonpj@MSRC-9870733:~$ cabal install --lib hspec

Resolving dependencies...

Up to date

Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern
failed for pattern Just ghcPkgProg

simonpj@MSRC-9870733:~$ which ghc

/opt/ghc/bin/ghc

simonpj@MSRC-9870733:~$ which ghc-pkg

/opt/ghc/bin/ghc-pkg

simonpj@MSRC-9870733:~$


Re: Cabal woes

2019-04-15 Thread Brandon Allbery
I vaguely recall seeing that bug come up with respect to v2-install. And in
fact am a bit surprised that 3 has been released, since this is
highlighting that neither it nor the Haskell ecosystem is quite ready for
it.

I'd also have expected (and thought I'd seen) "cabal install" in recent 2.x
warn that it would be "v1-install" in the future.

On Mon, Apr 15, 2019 at 6:13 PM Simon Peyton Jones 
wrote:

> Aha!  That works.  I would never in a million years have found that by
> myself.  Thank you.
>
>
>
> But
>
>- It is terribly mysterious that “cabal install hspec” doesn’t, well,
>install hspec.
>- It must surely be a bug that “cabal install –lib hspec” simply
>crashes.
>
>
>
> Simon
>
>
>
> *From:* Brandon Allbery 
> *Sent:* 15 April 2019 23:03
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>
>
> Yes, I think a lot of documentation will need to be updated because this.
> You want "cabal v1-install" with cabal 3.
>
>
>
> On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones 
> wrote:
>
> Thanks.  But alas I have no clue about whether I want a v1-install or a
> v2-install, nor how to achieve them if I knew what they were.  I just want
> to install ‘hspec’ so that I can use it when compiling a program.  How
> would I do that?
>
>
>
> The instructions here https://wiki.haskell.org/Cabal-Install
> 
> just say “cabal install hspec” which is what I tried.  Those instructions
> are pointed to from here
> https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package
> ,
> which in turn are pointed to from the main Cabal home page
> https://www.haskell.org/cabal/
> 
> .
>
>
>
> I must be missing something.
>
>
>
> Simon
>
>
>
> *From:* Brandon Allbery 
> *Sent:* 15 April 2019 22:54
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>
>
> I think you wanted v1-install to install a library into the user package
> database, since your cabal is 3.x and the v2-* commands are now the default
> (that is, you did what used to be cabal new-install or cabal v2-install).
>
>
>
> On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs <
> ghc-devs@haskell.org> wrote:
>
> I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux)
> system.
>
> But I fail; see below.
>
> For some reason cabal complains about installing a library.  (That seems
> peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding
> –lib.
>
> Alas, cabal then crashes outright, which should never happen.
>
> So I’m stuck.  What should I do?
>
> Thanks
>
> Simon
>
>
>
> simonpj@MSRC-9870733:~$ cabal --version
>
> cabal-install version 3.0.0.0
>
> compiled using version 3.0.0.0 of the Cabal library
>
> simonpj@MSRC-9870733:~$ cabal install hspec
>
> Resolving dependencies...
>
> Up to date
>
> Warning: You asked to install executables, but there are no executables in
>
> target: hspec. Perhaps you want to use --lib to install libraries instead.
>
> simonpj@MSRC-9870733:~$ cabal install --lib hspec
>
> Resolving dependencies...
>
> Up to date
>
> Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for
> pattern Just ghcPkgProg
>
>
>
> simonpj@MSRC-9870733:~$ which ghc
>
> /opt/ghc/bin/ghc
>
> simonpj@MSRC-9870733:~$ which ghc-pkg
>
> /opt/ghc/bin/ghc-pkg
>
> simonpj@MSRC-9870733:~$
>
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> 
>
>
>
>
> --
>
> brandon s allbery kf8nh
>
> allber...@gmail.com
>
>
>
>
> --
>
> brandon s allbery kf8nh
>
> allber...@gmail.com
>


-- 
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org

RE: Cabal woes

2019-04-15 Thread Simon Peyton Jones via ghc-devs
Aha!  That works.  I would never in a million years have found that by myself.  
Thank you.

But

  *   It is terribly mysterious that “cabal install hspec” doesn’t, well, 
install hspec.
  *   It must surely be a bug that “cabal install –lib hspec” simply crashes.

Simon

From: Brandon Allbery 
Sent: 15 April 2019 23:03
To: Simon Peyton Jones 
Cc: ghc-devs@haskell.org
Subject: Re: Cabal woes

Yes, I think a lot of documentation will need to be updated because this. You 
want "cabal v1-install" with cabal 3.

On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones 
mailto:simo...@microsoft.com>> wrote:
Thanks.  But alas I have no clue about whether I want a v1-install or a 
v2-install, nor how to achieve them if I knew what they were.  I just want to 
install ‘hspec’ so that I can use it when compiling a program.  How would I do 
that?

The instructions here 
https://wiki.haskell.org/Cabal-Install
 just say “cabal install hspec” which is what I tried.  Those instructions are 
pointed to from here 
https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package,
 which in turn are pointed to from the main Cabal home page 
https://www.haskell.org/cabal/.

I must be missing something.

Simon

From: Brandon Allbery mailto:allber...@gmail.com>>
Sent: 15 April 2019 22:54
To: Simon Peyton Jones mailto:simo...@microsoft.com>>
Cc: ghc-devs@haskell.org
Subject: Re: Cabal woes

I think you wanted v1-install to install a library into the user package 
database, since your cabal is 3.x and the v2-* commands are now the default 
(that is, you did what used to be cabal new-install or cabal v2-install).

On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs 
mailto:ghc-devs@haskell.org>> wrote:
I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux) system.
But I fail; see below.
For some reason cabal complains about installing a library.  (That seems 
peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding 
–lib.
Alas, cabal then crashes outright, which should never happen.
So I’m stuck.  What should I do?
Thanks
Simon


simonpj@MSRC-9870733:~$ cabal --version

cabal-install version 3.0.0.0

compiled using version 3.0.0.0 of the Cabal library

simonpj@MSRC-9870733:~$ cabal install hspec

Resolving dependencies...

Up to date

Warning: You asked to install executables, but there are no executables in

target: hspec. Perhaps you want to use --lib to install libraries instead.

simonpj@MSRC-9870733:~$ cabal install --lib hspec

Resolving dependencies...

Up to date

Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for pattern 
Just ghcPkgProg



simonpj@MSRC-9870733:~$ which ghc

/opt/ghc/bin/ghc

simonpj@MSRC-9870733:~$ which ghc-pkg

/opt/ghc/bin/ghc-pkg

simonpj@MSRC-9870733:~$


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


--
brandon s allbery kf8nh
allber...@gmail.com


--
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Cabal woes

2019-04-15 Thread Brandon Allbery
Yes, I think a lot of documentation will need to be updated because this.
You want "cabal v1-install" with cabal 3.

On Mon, Apr 15, 2019 at 6:00 PM Simon Peyton Jones 
wrote:

> Thanks.  But alas I have no clue about whether I want a v1-install or a
> v2-install, nor how to achieve them if I knew what they were.  I just want
> to install ‘hspec’ so that I can use it when compiling a program.  How
> would I do that?
>
>
>
> The instructions here https://wiki.haskell.org/Cabal-Install just say
> “cabal install hspec” which is what I tried.  Those instructions are
> pointed to from here
> https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package, which in
> turn are pointed to from the main Cabal home page
> https://www.haskell.org/cabal/.
>
>
>
> I must be missing something.
>
>
>
> Simon
>
>
>
> *From:* Brandon Allbery 
> *Sent:* 15 April 2019 22:54
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>
>
> I think you wanted v1-install to install a library into the user package
> database, since your cabal is 3.x and the v2-* commands are now the default
> (that is, you did what used to be cabal new-install or cabal v2-install).
>
>
>
> On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs <
> ghc-devs@haskell.org> wrote:
>
> I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux)
> system.
>
> But I fail; see below.
>
> For some reason cabal complains about installing a library.  (That seems
> peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding
> –lib.
>
> Alas, cabal then crashes outright, which should never happen.
>
> So I’m stuck.  What should I do?
>
> Thanks
>
> Simon
>
>
>
> simonpj@MSRC-9870733:~$ cabal --version
>
> cabal-install version 3.0.0.0
>
> compiled using version 3.0.0.0 of the Cabal library
>
> simonpj@MSRC-9870733:~$ cabal install hspec
>
> Resolving dependencies...
>
> Up to date
>
> Warning: You asked to install executables, but there are no executables in
>
> target: hspec. Perhaps you want to use --lib to install libraries instead.
>
> simonpj@MSRC-9870733:~$ cabal install --lib hspec
>
> Resolving dependencies...
>
> Up to date
>
> Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for
> pattern Just ghcPkgProg
>
>
>
> simonpj@MSRC-9870733:~$ which ghc
>
> /opt/ghc/bin/ghc
>
> simonpj@MSRC-9870733:~$ which ghc-pkg
>
> /opt/ghc/bin/ghc-pkg
>
> simonpj@MSRC-9870733:~$
>
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> 
>
>
>
>
> --
>
> brandon s allbery kf8nh
>
> allber...@gmail.com
>


-- 
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Cabal woes

2019-04-15 Thread Vanessa McHale
If you want to install it globally for use by GHC, I think you want
v1-install.

On 4/15/19 5:00 PM, Simon Peyton Jones via ghc-devs wrote:
>
> Thanks.  But alas I have no clue about whether I want a v1-install or
> a v2-install, nor how to achieve them if I knew what they were.  I
> just want to install ‘hspec’ so that I can use it when compiling a
> program.  How would I do that?
>
>  
>
> The instructions here https://wiki.haskell.org/Cabal-Install
>  just say “cabal install
> hspec” which is what I tried.  Those instructions are pointed to from
> here https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package,
> which in turn are pointed to from the main Cabal home page
> https://www.haskell.org/cabal/.
>
>  
>
> I must be missing something.
>
>  
>
> Simon
>
>  
>
> *From:*Brandon Allbery 
> *Sent:* 15 April 2019 22:54
> *To:* Simon Peyton Jones 
> *Cc:* ghc-devs@haskell.org
> *Subject:* Re: Cabal woes
>
>  
>
> I think you wanted v1-install to install a library into the user
> package database, since your cabal is 3.x and the v2-* commands are
> now the default (that is, you did what used to be cabal new-install or
> cabal v2-install). 
>
>  
>
> On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs
> mailto:ghc-devs@haskell.org>> wrote:
>
> I’m trying to install ‘hspec’ on my WSL (Windows subsystem for
> Linux) system.
>
> But I fail; see below.
>
> For some reason cabal complains about installing a library.  (That
> seems peculiar – isn’t that what cabal is for?)  But it helpfully
> suggests adding –lib. 
>
> Alas, cabal then crashes outright, which should never happen.
>
> So I’m stuck.  What should I do?
>
> Thanks
>
> Simon
>
>  
>
> simonpj@MSRC-9870733:~$ cabal --version
>
> cabal-install version 3.0.0.0
>
> compiled using version 3.0.0.0 of the Cabal library
>
> simonpj@MSRC-9870733:~$ cabal install hspec
>
> Resolving dependencies...
>
> Up to date
>
> Warning: You asked to install executables, but there are no
> executables in
>
> target: hspec. Perhaps you want to use --lib to install libraries
> instead.
>
> simonpj@MSRC-9870733:~$ cabal install --lib hspec
>
> Resolving dependencies...
>
> Up to date
>
> Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed
> for pattern Just ghcPkgProg
>
>  
>
> simonpj@MSRC-9870733:~$ which ghc
>
> /opt/ghc/bin/ghc
>
> simonpj@MSRC-9870733:~$ which ghc-pkg
>
> /opt/ghc/bin/ghc-pkg
>
> simonpj@MSRC-9870733:~$
>
>  
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org 
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
> 
> 
>
>
>  
>
> -- 
>
> brandon s allbery kf8nh
>
> allber...@gmail.com 
>
>
> ___
> ghc-devs mailing list
> ghc-devs@haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
-- 



*Vanessa McHale*
Functional Compiler Engineer | Chicago, IL

Website: www.iohk.io 
Twitter: @vamchale
PGP Key ID: 4209B7B5

Input Output 

Twitter  Github
 LinkedIn



This e-mail and any file transmitted with it are confidential and
intended solely for the use of the recipient(s) to whom it is addressed.
Dissemination, distribution, and/or copying of the transmission by
anyone other than the intended recipient(s) is prohibited. If you have
received this transmission in error please notify IOHK immediately and
delete it from your system. E-mail transmissions cannot be guaranteed to
be secure or error free. We do not accept liability for any loss,
damage, or error arising from this transmission


signature.asc
Description: OpenPGP digital signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Cabal woes

2019-04-15 Thread Simon Peyton Jones via ghc-devs
Thanks.  But alas I have no clue about whether I want a v1-install or a 
v2-install, nor how to achieve them if I knew what they were.  I just want to 
install ‘hspec’ so that I can use it when compiling a program.  How would I do 
that?

The instructions here https://wiki.haskell.org/Cabal-Install just say “cabal 
install hspec” which is what I tried.  Those instructions are pointed to from 
here https://wiki.haskell.org/Cabal/How_to_install_a_Cabal_package, which in 
turn are pointed to from the main Cabal home page 
https://www.haskell.org/cabal/.

I must be missing something.

Simon

From: Brandon Allbery 
Sent: 15 April 2019 22:54
To: Simon Peyton Jones 
Cc: ghc-devs@haskell.org
Subject: Re: Cabal woes

I think you wanted v1-install to install a library into the user package 
database, since your cabal is 3.x and the v2-* commands are now the default 
(that is, you did what used to be cabal new-install or cabal v2-install).

On Mon, Apr 15, 2019 at 5:47 PM Simon Peyton Jones via ghc-devs 
mailto:ghc-devs@haskell.org>> wrote:
I’m trying to install ‘hspec’ on my WSL (Windows subsystem for Linux) system.
But I fail; see below.
For some reason cabal complains about installing a library.  (That seems 
peculiar – isn’t that what cabal is for?)  But it helpfully suggests adding 
–lib.
Alas, cabal then crashes outright, which should never happen.
So I’m stuck.  What should I do?
Thanks
Simon


simonpj@MSRC-9870733:~$ cabal --version

cabal-install version 3.0.0.0

compiled using version 3.0.0.0 of the Cabal library

simonpj@MSRC-9870733:~$ cabal install hspec

Resolving dependencies...

Up to date

Warning: You asked to install executables, but there are no executables in

target: hspec. Perhaps you want to use --lib to install libraries instead.

simonpj@MSRC-9870733:~$ cabal install --lib hspec

Resolving dependencies...

Up to date

Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for pattern 
Just ghcPkgProg



simonpj@MSRC-9870733:~$ which ghc

/opt/ghc/bin/ghc

simonpj@MSRC-9870733:~$ which ghc-pkg

/opt/ghc/bin/ghc-pkg

simonpj@MSRC-9870733:~$


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


--
brandon s allbery kf8nh
allber...@gmail.com
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Cabal woes

2019-04-15 Thread Simon Peyton Jones via ghc-devs
I'm trying to install 'hspec' on my WSL (Windows subsystem for Linux) system.
But I fail; see below.
For some reason cabal complains about installing a library.  (That seems 
peculiar - isn't that what cabal is for?)  But it helpfully suggests adding 
-lib.
Alas, cabal then crashes outright, which should never happen.
So I'm stuck.  What should I do?
Thanks
Simon


simonpj@MSRC-9870733:~$ cabal --version

cabal-install version 3.0.0.0

compiled using version 3.0.0.0 of the Cabal library

simonpj@MSRC-9870733:~$ cabal install hspec

Resolving dependencies...

Up to date

Warning: You asked to install executables, but there are no executables in

target: hspec. Perhaps you want to use --lib to install libraries instead.

simonpj@MSRC-9870733:~$ cabal install --lib hspec

Resolving dependencies...

Up to date

Distribution/Simple/GHC.hs:1959:5-56: Irrefutable pattern failed for pattern 
Just ghcPkgProg



simonpj@MSRC-9870733:~$ which ghc

/opt/ghc/bin/ghc

simonpj@MSRC-9870733:~$ which ghc-pkg

/opt/ghc/bin/ghc-pkg

simonpj@MSRC-9870733:~$


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


Re: Near-daily "Remote mirror update failed" e-mails from GitLab

2019-04-15 Thread Sebastian Graf
Hey,

sorry, I'm a little late to respond. I didn't push to GitHub, at least not 
consciously.

Let me know if you find that I screwed up somewhere.

Cheers,
Sebastian



Von: Ben Gamari 
Gesendet: Samstag, April 6, 2019 8:28 PM
An: Ryan Scott; Sebastian Graf
Cc: ghc-devs@haskell.org
Betreff: Re: Near-daily "Remote mirror update failed" e-mails from GitLab

Ryan Scott  writes:

> Almost every day now I receive an e-mail from GitLab titled "Remote
> mirror update failed", which contains something like:
>
> To
>
> ! [remote rejected] wip/dmd-arity -> wip/dmd-arity (cannot
> lock ref 'refs/heads/wip/dmd-arity': is at
> e1cc1254b81a7adadd8db77c7be625497264ab2b but expected
> f07b61d047967129a3ae0c56f8894d41c5a9b036)
>
> error: failed to push some refs to '[FILTERED]@github.com/ghc/ghc'
>
Hmm, how annoying. Strangely, the `wip/dmd-arity` branch currently
appears to be sitting at the same commit on GitLab and GitHub so I'm not
really sure what to do here.

sgraf, did you ever push a branch manually to the github.com/ghc/ghc
mirror?

Cheers,

- Ben

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


Re: Proposal section numbering messed up

2019-04-15 Thread Matthew Pickering
It seems if you move all the metainfo to above the title then it
renders correctly.

Should be easy enough to fix if someone feels strongly about how these
are rendered.

Matt

On Mon, Apr 15, 2019 at 5:45 PM Matthew Pickering
 wrote:
>
> The ..sectnum is necessary so that when you render all the proposals
> together then the numbering is coherent.
>
> What happens if you move the ..sectnum to above the title?
>
> On that note, I think there should be a site where you can view the
> rendered proposals rather than having to do so via github preview.
>
> Cheers,
>
> Matt
>
>
> On Mon, Apr 15, 2019 at 4:08 PM Ben Gamari  wrote:
> >
> > Simon Peyton Jones via ghc-devs  writes:
> >
> > > Why does this proposal
> > > https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0036-kind-signatures.rst
> > > start with Section 36?  (It is proposal 36.)
> > > Lots of other proposals do this too.
> >
> > That's a great question. The header contains
> >
> > .. sectnum::
> >   :start: 36
> >
> > which mpickering added in [1]. mpickering, what was the motivation for
> > this?
> >
> > Cheers,
> >
> > - Ben
> >
> > [1] 
> > https://github.com/ghc-proposals/ghc-proposals/commit/5c2fa009a369df39cf60ebda84debbf6e5b5490d#diff-f272dc8b5fdcaf6b06c33f7e52a815aa
> > ___
> > 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


Re: Proposal section numbering messed up

2019-04-15 Thread Matthew Pickering
The ..sectnum is necessary so that when you render all the proposals
together then the numbering is coherent.

What happens if you move the ..sectnum to above the title?

On that note, I think there should be a site where you can view the
rendered proposals rather than having to do so via github preview.

Cheers,

Matt


On Mon, Apr 15, 2019 at 4:08 PM Ben Gamari  wrote:
>
> Simon Peyton Jones via ghc-devs  writes:
>
> > Why does this proposal
> > https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0036-kind-signatures.rst
> > start with Section 36?  (It is proposal 36.)
> > Lots of other proposals do this too.
>
> That's a great question. The header contains
>
> .. sectnum::
>   :start: 36
>
> which mpickering added in [1]. mpickering, what was the motivation for
> this?
>
> Cheers,
>
> - Ben
>
> [1] 
> https://github.com/ghc-proposals/ghc-proposals/commit/5c2fa009a369df39cf60ebda84debbf6e5b5490d#diff-f272dc8b5fdcaf6b06c33f7e52a815aa
> ___
> 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


Re: Proposal section numbering messed up

2019-04-15 Thread Ben Gamari
Simon Peyton Jones via ghc-devs  writes:

> Why does this proposal
> https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0036-kind-signatures.rst
> start with Section 36?  (It is proposal 36.)
> Lots of other proposals do this too.

That's a great question. The header contains

.. sectnum::
  :start: 36

which mpickering added in [1]. mpickering, what was the motivation for
this?

Cheers,

- Ben

[1] 
https://github.com/ghc-proposals/ghc-proposals/commit/5c2fa009a369df39cf60ebda84debbf6e5b5490d#diff-f272dc8b5fdcaf6b06c33f7e52a815aa


signature.asc
Description: PGP signature
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Proposal section numbering messed up

2019-04-15 Thread Simon Peyton Jones via ghc-devs
Why does this proposal
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0036-kind-signatures.rst
start with Section 36?  (It is proposal 36.)
Lots of other proposals do this too.
Can it be fixed?
Thanks
Simon
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


RE: Hadrian

2019-04-15 Thread Simon Peyton Jones via ghc-devs
sounds good to me!

|  -Original Message-
|  From: Moritz Angermann 
|  Sent: 15 April 2019 14:29
|  To: Simon Peyton Jones 
|  Cc: Matthew Pickering ; Andrey Mokhov
|  ; ghc-devs@haskell.org
|  Subject: Re: Hadrian
|  
|  I guess we could add
|  
|  $root/ghc-stage1 (shell script)
|  $root/ghc-stage2 (shell script)
|  
|  As long as we understand that those are just convenience scripts.
|  
|  Why $root? Because we can have multiple build directories for different
|  configurations. Thus putting the scripts into the ghc folder would not
|  know which root you wanted. This for the default root this would be:
|  
|  _build/ghc-stage1
|  _build/ghc-stage2
|  
|  Does that sound like an intermittent solution?
|  
|  Cheers,
|Moritz
|  
|  Sent from my iPhone
|  
|  > On 15 Apr 2019, at 8:47 AM, Simon Peyton Jones via ghc-devs  wrote:
|  >
|  > Ah.  I hadn't even tried the stage2 compiler (in the stage1/ directory).
|  Yes, that works.  But perhaps a script to get to it would be helpful,
|  otherwise invoking stage1 will look entirely different to invoking stage2.
|  Not a bid deal, I grant you!
|  >
|  > S
|  >
|  > |  -Original Message-
|  > |  From: Matthew Pickering 
|  > |  Sent: 15 April 2019 13:40
|  > |  To: Simon Peyton Jones 
|  > |  Cc: Andrey Mokhov ;
|  > | ghc-devs@haskell.org
|  > |  Subject: Re: Hadrian
|  > |
|  > |  Does the stage2 compiler which is found in `stage1/bin/ghc` not
|  > | work for  you? I thought the issue was that the stage1 compiler
|  doesn't work.
|  > |
|  > |  Matt
|  > |
|  > |  On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs
|  > |  wrote:
|  > |  >
|  > |  > as a temporary workaround we could create a top-level wrapper
|  > | script,  say `ghc-stage1.sh` that will call Stage1 GHC with the
|  > | right arguments,  just like Hadrian itself does during the build.
|  > |  >
|  > |  > That sound fine, thanks.   Same for ghc-stage2.sh?
|  > |  >
|  > |  > My difficulty is that as of today I simply do not know how to
|  > | invoke my  freshly built GHC!
|  > |  >
|  > |  > Simon
|  > |  >
|  > |  >
|  > |  >
|  > |  > From: Andrey Mokhov   > Sent: 15
|  > | April 2019 12:53  > To: Simon Peyton Jones 
|  > | > Cc: ghc-devs@haskell.org  > Subject: RE: Hadrian  >  >  >  > Hi
|  > | Simon,  >  > Apologies it’s taking so long. It’s not obvious how to
|  > | fix this  properly, and as a temporary workaround we could create a
|  > | top-level  wrapper script, say `ghc-stage1.sh` that will call Stage1
|  > | GHC with the  right arguments, just like Hadrian itself does during
|  > | the build.
|  > |  >
|  > |  > Will this work for you?
|  > |  >
|  > |  > Cheers,
|  > |  > Andrey
|  > |  >
|  > |  >
|  > |  >
|  > |  > From: Simon Peyton Jones [mailto:simo...@microsoft.com]  > Sent:
|  > | 15 April 2019 12:28  > To: Andrey Mokhov
|  > |   > Cc: ghc-devs@haskell.org  >
|  > | Subject: Hadrian  >  >  >  > Andrey and other Hadrian heros  >  >
|  > | Just to say that I am 100% stalled on using Hadrian because the  >
|  > | in-tree binary uses the wrong library files.  I reported this a few
|  > | > weeks ago, but it still seems unchanged  >  > Simon  >  >  >  >
|  > | Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version  >  > The Glorious
|  > | Glasgow Haskell Compilation System, version  > 8.9.0.20190414  >  >
|  > | simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c  >
|  > | T16566.hs  >  >  >  > T16566.hs:1:8: error:
|  > |  >
|  > |  > Bad interface file:
|  > |  > /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi
|  > |  >
|  > |  > mismatched interface file versions (wanted "809020190414",
|  got
|  > |  > "8064")
|  > |  >
|  > |  >   |
|  > |  >
|  > |  > 1 | module T16566 where
|  > |  >
|  > |  >   |^^
|  > |  >
|  > |  > ___
|  > |  > ghc-devs mailing list
|  > |  > ghc-devs@haskell.org
|  > |  >
|  https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.
|  > |  >
|  > | haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devsdata=02%7C
|  > | 01  >
|  > | %7Csimonpj%40microsoft.com%7Cdf9439b6d848493aca9608d6c19f79f6%7C72f9
|  > | 88  >
|  > | bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909288021992421sdata=dd
|  > | sV  > pnCFLP4D7dGqPtuMdv3oahBrOvRWVDlOV2GSwBU%3Dreserved=0
|  > ___
|  > 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


RE: Hadrian

2019-04-15 Thread Simon Peyton Jones via ghc-devs
Ah.  I hadn't even tried the stage2 compiler (in the stage1/ directory).  Yes, 
that works.  But perhaps a script to get to it would be helpful, otherwise 
invoking stage1 will look entirely different to invoking stage2.  Not a bid 
deal, I grant you!

S

|  -Original Message-
|  From: Matthew Pickering 
|  Sent: 15 April 2019 13:40
|  To: Simon Peyton Jones 
|  Cc: Andrey Mokhov ; ghc-devs@haskell.org
|  Subject: Re: Hadrian
|  
|  Does the stage2 compiler which is found in `stage1/bin/ghc` not work for
|  you? I thought the issue was that the stage1 compiler doesn't work.
|  
|  Matt
|  
|  On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs  wrote:
|  >
|  > as a temporary workaround we could create a top-level wrapper script,
|  say `ghc-stage1.sh` that will call Stage1 GHC with the right arguments,
|  just like Hadrian itself does during the build.
|  >
|  > That sound fine, thanks.   Same for ghc-stage2.sh?
|  >
|  > My difficulty is that as of today I simply do not know how to invoke my
|  freshly built GHC!
|  >
|  > Simon
|  >
|  >
|  >
|  > From: Andrey Mokhov 
|  > Sent: 15 April 2019 12:53
|  > To: Simon Peyton Jones 
|  > Cc: ghc-devs@haskell.org
|  > Subject: RE: Hadrian
|  >
|  >
|  >
|  > Hi Simon,
|  >
|  > Apologies it’s taking so long. It’s not obvious how to fix this
|  properly, and as a temporary workaround we could create a top-level
|  wrapper script, say `ghc-stage1.sh` that will call Stage1 GHC with the
|  right arguments, just like Hadrian itself does during the build.
|  >
|  > Will this work for you?
|  >
|  > Cheers,
|  > Andrey
|  >
|  >
|  >
|  > From: Simon Peyton Jones [mailto:simo...@microsoft.com]
|  > Sent: 15 April 2019 12:28
|  > To: Andrey Mokhov 
|  > Cc: ghc-devs@haskell.org
|  > Subject: Hadrian
|  >
|  >
|  >
|  > Andrey and other Hadrian heros
|  >
|  > Just to say that I am 100% stalled on using Hadrian because the
|  > in-tree binary uses the wrong library files.  I reported this a few
|  > weeks ago, but it still seems unchanged
|  >
|  > Simon
|  >
|  >
|  >
|  > Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version
|  >
|  > The Glorious Glasgow Haskell Compilation System, version
|  > 8.9.0.20190414
|  >
|  > simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c
|  > T16566.hs
|  >
|  >
|  >
|  > T16566.hs:1:8: error:
|  >
|  > Bad interface file:
|  > /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi
|  >
|  > mismatched interface file versions (wanted "809020190414", got
|  > "8064")
|  >
|  >   |
|  >
|  > 1 | module T16566 where
|  >
|  >   |^^
|  >
|  > ___
|  > ghc-devs mailing list
|  > ghc-devs@haskell.org
|  > https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.
|  > haskell.org%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-devsdata=02%7C01
|  > %7Csimonpj%40microsoft.com%7Cdf9439b6d848493aca9608d6c19f79f6%7C72f988
|  > bf86f141af91ab2d7cd011db47%7C1%7C0%7C636909288021992421sdata=ddsV
|  > pnCFLP4D7dGqPtuMdv3oahBrOvRWVDlOV2GSwBU%3Dreserved=0
___
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs


Re: Hadrian

2019-04-15 Thread Matthew Pickering
Does the stage2 compiler which is found in `stage1/bin/ghc` not work
for you? I thought the issue was that the stage1 compiler doesn't
work.

Matt

On Mon, Apr 15, 2019 at 1:11 PM Simon Peyton Jones via ghc-devs
 wrote:
>
> as a temporary workaround we could create a top-level wrapper script, say 
> `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like 
> Hadrian itself does during the build.
>
> That sound fine, thanks.   Same for ghc-stage2.sh?
>
> My difficulty is that as of today I simply do not know how to invoke my 
> freshly built GHC!
>
> Simon
>
>
>
> From: Andrey Mokhov 
> Sent: 15 April 2019 12:53
> To: Simon Peyton Jones 
> Cc: ghc-devs@haskell.org
> Subject: RE: Hadrian
>
>
>
> Hi Simon,
>
> Apologies it’s taking so long. It’s not obvious how to fix this properly, and 
> as a temporary workaround we could create a top-level wrapper script, say 
> `ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like 
> Hadrian itself does during the build.
>
> Will this work for you?
>
> Cheers,
> Andrey
>
>
>
> From: Simon Peyton Jones [mailto:simo...@microsoft.com]
> Sent: 15 April 2019 12:28
> To: Andrey Mokhov 
> Cc: ghc-devs@haskell.org
> Subject: Hadrian
>
>
>
> Andrey and other Hadrian heros
>
> Just to say that I am 100% stalled on using Hadrian because the in-tree 
> binary uses the wrong library files.  I reported this a few weeks ago, but it 
> still seems unchanged
>
> Simon
>
>
>
> Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version
>
> The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414
>
> simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs
>
>
>
> T16566.hs:1:8: error:
>
> Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi
>
> mismatched interface file versions (wanted "809020190414", got "8064")
>
>   |
>
> 1 | module T16566 where
>
>   |^^
>
> ___
> 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


RE: Hadrian

2019-04-15 Thread Simon Peyton Jones via ghc-devs
as a temporary workaround we could create a top-level wrapper script, say 
`ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like 
Hadrian itself does during the build.
That sound fine, thanks.   Same for ghc-stage2.sh?
My difficulty is that as of today I simply do not know how to invoke my freshly 
built GHC!
Simon

From: Andrey Mokhov 
Sent: 15 April 2019 12:53
To: Simon Peyton Jones 
Cc: ghc-devs@haskell.org
Subject: RE: Hadrian

Hi Simon,
Apologies it's taking so long. It's not obvious how to fix this properly, and 
as a temporary workaround we could create a top-level wrapper script, say 
`ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like 
Hadrian itself does during the build.
Will this work for you?
Cheers,
Andrey

From: Simon Peyton Jones [mailto:simo...@microsoft.com]
Sent: 15 April 2019 12:28
To: Andrey Mokhov 
mailto:andrey.mok...@newcastle.ac.uk>>
Cc: ghc-devs@haskell.org
Subject: Hadrian

Andrey and other Hadrian heros
Just to say that I am 100% stalled on using Hadrian because the in-tree binary 
uses the wrong library files.  I reported this a few weeks ago, but it still 
seems unchanged
Simon


Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414

simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs



T16566.hs:1:8: error:

Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi

mismatched interface file versions (wanted "809020190414", got "8064")

  |

1 | module T16566 where

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


RE: Hadrian

2019-04-15 Thread Andrey Mokhov
Hi Simon,
Apologies it's taking so long. It's not obvious how to fix this properly, and 
as a temporary workaround we could create a top-level wrapper script, say 
`ghc-stage1.sh` that will call Stage1 GHC with the right arguments, just like 
Hadrian itself does during the build.
Will this work for you?
Cheers,
Andrey

From: Simon Peyton Jones [mailto:simo...@microsoft.com]
Sent: 15 April 2019 12:28
To: Andrey Mokhov 
Cc: ghc-devs@haskell.org
Subject: Hadrian

Andrey and other Hadrian heros
Just to say that I am 100% stalled on using Hadrian because the in-tree binary 
uses the wrong library files.  I reported this a few weeks ago, but it still 
seems unchanged
Simon


Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414

simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs



T16566.hs:1:8: error:

Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi

mismatched interface file versions (wanted "809020190414", got "8064")

  |

1 | module T16566 where

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


Hadrian

2019-04-15 Thread Simon Peyton Jones via ghc-devs
Andrey and other Hadrian heros
Just to say that I am 100% stalled on using Hadrian because the in-tree binary 
uses the wrong library files.  I reported this a few weeks ago, but it still 
seems unchanged
Simon


Bash$ ~/code/HEAD/_build/stage0/bin/ghc --version

The Glorious Glasgow Haskell Compilation System, version 8.9.0.20190414

simonpj@MSRC-3645512:~/tmp$ ~/code/HEAD/_build/stage0/bin/ghc -c T16566.hs



T16566.hs:1:8: error:

Bad interface file: /opt/ghc/8.6.4/lib/ghc-8.6.4/base-4.12.0.0/Prelude.hi

mismatched interface file versions (wanted "809020190414", got "8064")

  |

1 | module T16566 where

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