Search Haskell Channel Logs

Thursday, January 26, 2017

#haskell channel featuring sm, fragamus, davean, shapr, dram_phone, bitemyapp, and 11 others.

lyxia 2017-01-26 07:45:17
haskell.org/hoogle should be obsolete
fragamus 2017-01-26 07:47:15
I am figuring it out. Asking the question helped.
dram_phone 2017-01-26 07:47:18
http://hoogle.haskell.org is more up-to-date
dram_phone 2017-01-26 07:47:27
But yeah just use stackage
dram_phone 2017-01-26 07:47:47
Basically everyone is using stack these days right?
geekosaur 2017-01-26 07:48:00
of course, nything else is defined as Satan
geekosaur 2017-01-26 07:48:09
do not dare to think of anything else
jarlg 2017-01-26 07:48:51
Personally I'm finding stack integration with Nix quite buggy. Having a better time with cabal+nix.
glguy 2017-01-26 07:52:06
dram_phone: In lowercase letters, no, it's not the case that basically everyone is using stack these days
dram_phone 2017-01-26 07:52:31
uh, sorry
dram_phone 2017-01-26 07:53:20
sorry about that..
scav 2017-01-26 07:54:02
How about making up your own opinion on these things?
bitemyapp 2017-01-26 07:54:20
use both, decide for yourself
bitemyapp 2017-01-26 07:54:31
but I will say that it's sort of pain-that-I'm-used-to thing
bitemyapp 2017-01-26 07:54:48
When Stack came out I was a bit wary because from my POV, sandboxes had "fixed the problems"
scav 2017-01-26 07:54:48
You managed to decide on Haskell, you are already ahead of the curve. Surely you are able to decide on a toolseT?
bitemyapp 2017-01-26 07:55:10
if you don't work with or aren't a beginner yourself, it's hard to see the thousand papercuts that remain even with sandboxes.
MarcelineVQ 2017-01-26 07:55:16
no reason to be exclusive even then :>
bitemyapp 2017-01-26 07:55:22
and no, new-build doesn't really cover it.
bitemyapp 2017-01-26 07:55:43
I know a _lot_ of people that are only using Haskell because of how easy Stack made juggling package snapshots and GHC versions.
electrocat 2017-01-26 07:56:12
hiya, quick question, is there a reason why main is of type 'IO a' and not 'IO ()'. I can do 'main = return 5', which doesn't do anything useful. Is the return value of main just ignored?
bitemyapp 2017-01-26 07:56:14
prior to Stack I was using hvr's GHC PPA and sandboxes and that was pretty okay! but I still had to blow away sandboxes on the reg and switching over to profiling libraries was annoying.
davean 2017-01-26 07:56:51
Yah, not tracking the profiling flag was a huge mistake cabal made
shapr 2017-01-26 07:57:00
electrocat: ooh, I don't know! but now I want to
davean 2017-01-26 07:57:02
though stack directly interfears with what I do on a daily basis
davean 2017-01-26 07:57:12
its not nearly as flexable a tool
bitemyapp 2017-01-26 07:58:02
you're an expert user and understand everything well enough to know how to fix things when they get in a broken/stuck state.
bitemyapp 2017-01-26 07:58:10
e.g. like blowing away a package db
davean 2017-01-26 07:58:17
I haven't done that in nearly a year
bitemyapp 2017-01-26 07:58:23
are you using nix?
davean 2017-01-26 07:58:25
No
bitemyapp 2017-01-26 07:58:30
well, good for you
davean 2017-01-26 07:58:39
cabal solved all the things that caused that to be required for me
bitemyapp 2017-01-26 07:58:40
but if you churn package versions on the reg, it happens often enough.
shapr 2017-01-26 07:58:44
put up a PR for "stack repair" that blows away package db and dirs?
davean 2017-01-26 07:58:47
Nah, the tracking fixed that
bitemyapp 2017-01-26 07:58:53
shapr: I'm not talking about Stack
shapr 2017-01-26 07:58:58
oh, sorry
bitemyapp 2017-01-26 07:59:01
I'm not just talking about what happened to me, I'm talking about what other people got stuck on.
davean 2017-01-26 07:59:08
bitemyapp: I'm not sure what could make that required these days
bitemyapp 2017-01-26 07:59:12
it happened pretty regularly until people started using Stack.
davean 2017-01-26 07:59:40
bitemyapp: yah, but cabal fixed the bugs that caused it in all the cases I can think of
MarcelineVQ 2017-01-26 07:59:43
electrocat: correct, it's discarded. possibly it's IO a because there's no good reason to be more restrictive
davean 2017-01-26 07:59:52
bitemyapp: they were flat out bugs
electrocat 2017-01-26 08:00:12
MarcelineVQ: ah ok, so it's just for convenience?
shapr 2017-01-26 08:00:29
My coworkers can't deal with raw cabal, stack means they will actually install my program.
shapr 2017-01-26 08:00:32
I'm a fan.
davean 2017-01-26 08:00:35
bitemyapp: do you know how one might get into such an error condition any more?
davean 2017-01-26 08:01:13
The closest I can think of is a custom setup
davean 2017-01-26 08:01:22
and nothing saves you from the sins of custom Setup.hs
bitemyapp 2017-01-26 08:01:30
davean: it's hard for me to know because most of the people who could ever get stuck on something like that and not know how to fix it are no longer using plain Cabal. They're all on Stack now.
MarcelineVQ 2017-01-26 08:01:42
electrocat: Not sure, but it seems likely
bitemyapp 2017-01-26 08:01:48
davean: part of my point is that I don't evaluate things based purely on my own experience, I'm evaluating things on what trips up other people.
electrocat 2017-01-26 08:01:49
ok thanks
bitemyapp 2017-01-26 08:01:57
davean: there are a lot of _other_ reasons people use Stack, I mentioned them above.
bitemyapp 2017-01-26 08:02:19
Given how difficult it was to get trivial fixes and changes into Cabal historically, there's value in having Stack as a work-around if nothing else.
davean 2017-01-26 08:02:20
bitemyapp: yes, but this one part of the conversation interests me, and stack bores me
davean 2017-01-26 08:02:34
bitemyapp: oh yes, I have little good to say about how cabal is managed
davean 2017-01-26 08:02:40
very, very little
davean 2017-01-26 08:02:46
I very much do not like the cabal team
bitemyapp 2017-01-26 08:03:09
then you understand where some of the pressure is.
bitemyapp 2017-01-26 08:03:23
if I report an issue with Stack, generally if it's well understood and won't take a ton of work, it gets fixed in a matter of _days_
bitemyapp 2017-01-26 08:03:27
and I didn't even have to fix it myself
bitemyapp 2017-01-26 08:03:42
I file an issue on some pretty basic UX issues with the documentation or args on Cabal, I get road-blocked.
bitemyapp 2017-01-26 08:04:08
GHC is a lot easier to contribute to.
fragamus 2017-01-26 08:08:07
http://lpaste.net/351673
MarcelineVQ 2017-01-26 08:16:40
fragamus: you should repeat your question to go along with that, if you're soliciting help :>
fragamus 2017-01-26 08:18:02
im trying to noodle it out... i was asking for help but im not clear enough to ask a good question
sm 2017-01-26 08:20:02
"help!" :)
ph88 2017-01-26 08:30:21
is it allowed to make a type like data Foo = MkFoo (A | B) ?
dram_phone 2017-01-26 08:31:26
What do you expect it to do?
ph88 2017-01-26 08:33:52
not sure actually :|
Ptival 2017-01-26 08:35:03
hello, I would like to structure a recursive function in such a way that at each recursive step, I get a handle on what's happening and can provide a behaviour (whether to continue, stop, do something...), I think this can be achieved in a continuation-passing style, but was wondering whether someone knows of a principled way of writing this, maybe using Cont/ContT?
ph88 2017-01-26 08:35:13
when i have an applicative style parser and wrap it in a data constructor like Bar <$> char 'B' how can i keep the parser but not put it in Bar. So i have a type like data Bar = Bar and not data Bar = Bar Char
ph88 2017-01-26 08:35:47
Ptival, what would be an example of "what's happening" ?
dram_phone 2017-01-26 08:36:03
ph88: not quite catching up with that
ph88 2017-01-26 08:36:16
dram_phone, it was a new question :|
dram_phone 2017-01-26 08:36:25
oh
Ptival 2017-01-26 08:36:29
ph88: what arguments the recursive call is receiving
dram_phone 2017-01-26 08:36:34
Bar <$ that
dram_phone 2017-01-26 08:36:50
literally a 1-char change
ph88 2017-01-26 08:36:55
cool !
ph88 2017-01-26 08:37:01
does $> exist also ?
suzu 2017-01-26 08:37:08
sure does!
dram_phone 2017-01-26 08:37:24
:t ($>) -- I think I used it just a few days ago
lambdabot 2017-01-26 08:37:26
error:
lambdabot 2017-01-26 08:37:26
• Variable not in scope: $>
lambdabot 2017-01-26 08:37:26
• Perhaps you meant one of these:
suzu 2017-01-26 08:37:44
<* and *> also exist
dram_phone 2017-01-26 08:38:04
These two sure do
ph88 2017-01-26 08:38:37
Ptival, i think you can code it in the return value of your function, you can put "actions" in data structures
dram_phone 2017-01-26 08:38:41
Ptival: Sounds like you want a free monad?
dram_phone 2017-01-26 08:39:50
That would allow you to basically write an 'interpreter' for 'special calls' for a, well, for your recursive function