Search Haskell Channel Logs

Saturday, February 4, 2017

#haskell channel featuring laserpants, AndreasK, mroman, mbw, libscott, ertes,

mbw 2017-02-04 01:49:49
Ok, one more question. As mentioned previously, I was trying to use the Euterpea package. stack solver failed with this output: http://lpaste.net/352081. After manually adding "heap-0.6.0" to stack.yaml, it worked. Shouldn't this be something that the solver could figure out on its own?
mroman 2017-02-04 01:49:53
no dupChan in BoundedChan though
mroman 2017-02-04 01:49:54
bummer :(
mbw 2017-02-04 01:51:50
Could it be that there is an issue with my stack / cabal setup?
mbw 2017-02-04 01:53:06
Since I have difficulties finding information about this kind of error messages, at least in the context of stack usage.
mbw 2017-02-04 01:55:32
Ok I've had it with this library. It didn't build after all.
AndreasK 2017-02-04 01:59:00
mbw: Can you post your cabal and yaml file? It built for me
AndreasK 2017-02-04 02:01:09
mbw: I used these cabal/stack files: http://lpaste.net/5101709175214309376 http://lpaste.net/172690674943000576
AndreasK 2017-02-04 02:01:29
Starting by creating a new project using stack new and then adding the library as dependency
mbw 2017-02-04 02:02:53
I added the Euterpea dependency under "library", not "executable". Does that make a difference?
mbw 2017-02-04 02:03:54
No, it does not, it seems. I'll paste the output of solver
AndreasK 2017-02-04 02:04:23
mbw: should not for finding a build plan at least, try running stack update maybe your package index is out of date, although I would think that happens automatically
mbw 2017-02-04 02:04:57
http://lpaste.net/352082
mbw 2017-02-04 02:05:12
I run stack update on a daily basis :(
mbw 2017-02-04 02:05:40
But what's weird when you look at this output, it actually rejects "heap-0.6.0", which it seems to need.
mbw 2017-02-04 02:06:18
This is after stack new, adding Euterpea to the .cabal file, and running solver
AndreasK 2017-02-04 02:11:02
mbw: can you try to check this repo out and run stack build on it? https://github.com/AndreasPK/eur
mbw 2017-02-04 02:13:00
on it
mbw 2017-02-04 02:13:19
It built. What the hell man...
AndreasK 2017-02-04 02:13:39
Something wrong with your project folder/cabal file then i guess
mbw 2017-02-04 02:14:26
I just vimdiffed them. If I would s/eur/hsom/g them, they'd be identical.
mbw 2017-02-04 02:15:13
But of course your stack.yaml has all the extra-deps entries.
mbw 2017-02-04 02:15:18
Did you add those manually?
mbw 2017-02-04 02:16:47
I also noted that the changelog of the newest cabal mentions a bug about handling of non-buildable components. Do you have cabal 1.24.2.0?
mbw 2017-02-04 02:17:10
The errors I got were from the cabal backend after all
laserpants 2017-02-04 02:20:55
How come this is fine; f :: Seq a -> Seq a; f xs = deleteAt 0 xs
laserpants 2017-02-04 02:21:10
but not f xs = ys where ys :: Seq a; ys = deleteAt 0 xs
mbw 2017-02-04 02:24:23
Ok I can't even upgrade cabal it seems
pavonia 2017-02-04 02:25:58
laserpants: Because "Seq a" means it has to work for any type a, but the type of xs is already fixed by the type of f
laserpants 2017-02-04 02:26:42
so I can't use a type signature in this case or?
pavonia 2017-02-04 02:27:26
You can but you have to make sure it's the same a, e.g. by using the ScopedTypeVariables extension
laserpants 2017-02-04 02:27:56
pavonia: I see. Thanks
mbw 2017-02-04 02:28:00
AndreasK: Did you add the extra-deps manually?
AndreasK 2017-02-04 02:28:16
mbw: no stack solver --update-config did
AndreasK 2017-02-04 02:29:18
mbw: cabal 1.22.7 in use by stack
AndreasK 2017-02-04 02:30:01
mbw: But I got the first error as well, but it succeeded the the "running with lts-7.18 as preferences part" for me
AndreasK 2017-02-04 02:31:13
You could try downgrading cabal and checking if stack solver works then
AndreasK 2017-02-04 02:31:23
If your really interested
mbw 2017-02-04 02:32:24
I am actually, since this is not the first time I encounter these kind of problems. However, I thought I had to upgrade. But I think "cabal install Cabal caball-install" is not the correct way to do this :/
mbw 2017-02-04 02:32:50
I feel like I'm stuck building all of hackage right now
mbw 2017-02-04 02:33:21
But what do you mean with the "running with lts-7.18 as preferences part"?
mbw 2017-02-04 02:34:20
And how do I actually update cabal!? It seems to be building the same version again...
mbw 2017-02-04 02:34:30
*upgrade
mbw 2017-02-04 02:36:05
nvm, versions of Cabal/cabal-install are different
mbw 2017-02-04 02:41:17
AndreasK: There is an open issue which I suspect might be the cause https://github.com/commercialhaskell/stack/issues/2585
AndreasK 2017-02-04 02:43:18
mbw: http://lpaste.net/2195246811067711488 is my output for stack solver, it also fails to find a buildplan since it doesnt consider packages from hackage at the start, then relaxes the requirements and succeeds
AndreasK 2017-02-04 02:44:17
mbw: But sounds like your link is the cause for that issue
mbw 2017-02-04 02:46:24
I'm currently trying to get what is suggested here https://stackoverflow.com/questions/39713267/trying-to-solve-a-stack-error-library-must-match-0-10-but-the-stack-configur to work
libscott 2017-02-04 03:22:11
is there any way to have a record that has an extra derived value that gets cached? so the constructor can be (Thing a) but actually it also contains a b
hodapp 2017-02-04 03:25:52
you could have, say, a smart constructor that does that, but why would you need it to be cached?
libscott 2017-02-04 03:26:42
hodapp: I want to provide an Ord instance that doesn't need to recalculate the scalar value each time
libscott 2017-02-04 03:26:50
and also not have to pattern match on the scalar part
hodapp 2017-02-04 03:29:24
I think you can force the value to be strict, but that's almost never necessary to do explicitly
ertes 2017-02-04 03:36:28
what's the difference between GHC.Prim and GHC.PrimopWrappers? particular example: mkWeak#
ertes 2017-02-04 03:36:38
the types are equal
ertes 2017-02-04 03:37:19
according to the source code they are equal, too