Search Haskell Channel Logs

Wednesday, February 8, 2017

#haskell channel featuring c_wraith, lpaste_, EvanR, threestrikes, kadoban, lambdabot, and 5 others.

Taggnostr 2017-02-08 14:04:47
hello
Sornaensis 2017-02-08 14:05:54
haskell is such a joy to develop with :3
Taggnostr 2017-02-08 14:05:57
I'm executing ghci -e from another program, and getting the error Error: HOME: getAppUserDataDirectory: does not exist (no environment variable)
Sornaensis 2017-02-08 14:06:12
sounds like they don't have a data directory set
Sornaensis 2017-02-08 14:06:33
can I ask why you are calling ghci from another program?
Taggnostr 2017-02-08 14:06:59
it's an irc bot, I have a command to evaluate haskell snippets
Sornaensis 2017-02-08 14:07:21
Taggnostr: use mueval
Taggnostr 2017-02-08 14:07:23
the weird thing is that the command works fine from the bot, but not from the tests
Sornaensis 2017-02-08 14:07:31
don't call ghci -i
Sornaensis 2017-02-08 14:07:33
-e*
geekosaur 2017-02-08 14:07:42
how are these tests being run?
EvanR 2017-02-08 14:07:49
ghci -e "haskell code for delete users file system"
Sornaensis 2017-02-08 14:07:50
Taggnostr: https://hackage.haskell.org/package/mueval
Taggnostr 2017-02-08 14:08:17
EvanR, it's a private bot, so only I can use the command
EvanR 2017-02-08 14:08:27
heh
Sornaensis 2017-02-08 14:08:31
pls no
geekosaur 2017-02-08 14:08:39
you hope
EvanR 2017-02-08 14:08:41
"these controls are isomorphic"
Sornaensis 2017-02-08 14:08:44
mueval works the same but prevents you from doing dumb stuff
EvanR 2017-02-08 14:08:46
"only i can use them"
threestrikes 2017-02-08 14:09:02
Hi I just made a couple changes to a cloned repository from git. I already compiled the program earlier and it worked. I should theoretically be able to re compile the same program without having to create another clone, correct?
Taggnostr 2017-02-08 14:09:22
geekosaur, the bot is written in python, I'm not sure why it fails from the tests, perhaps the test runner prevent access to envvars and/or the home
dmwit 2017-02-08 14:10:06
threestrikes: sure
Taggnostr 2017-02-08 14:10:41
Sornaensis, looking into mueval, thanks for the suggestion
threestrikes 2017-02-08 14:14:43
I used the command "stack install" to recompile the program, which was the same command I used to install it the first time. Am I missing something?
Taggnostr 2017-02-08 14:15:44
Sornaensis, I'm getting https://github.com/gwern/mueval/issues/16
geekosaur 2017-02-08 14:20:48
threestrikes, if you are making changes to a dependency, you will need to tell stack to use the local copy that has the changes
geekosaur 2017-02-08 14:21:29
otherwise it uses (its cached copy of) what it pulled from upstream, not yours
kadoban 2017-02-08 14:21:48
If you have it referring to a git repo, you have to tell it to use a different commit-hash or whatever.
threestrikes 2017-02-08 14:21:50
thats the message I got I just didn't understand what it was saying
threestrikes 2017-02-08 14:22:09
or how to change it
kadoban 2017-02-08 14:22:17
It'll probably be a bit clearer if you lpaste the message and the relevant files, like stack.yaml
threestrikes 2017-02-08 14:23:37
I'll try to read up on git and see if there are any tutorials, if I can't figure it out I'll upload to lpaste and beg for help later :)
threestrikes 2017-02-08 14:23:53
Thanks
halogenandtoast 2017-02-08 14:30:30
Does anyone have experience with hedis who can decipher what this means `No instance for (RedisCtx (Either t0) Redis)`
halogenandtoast 2017-02-08 14:30:37
I'll post some code
lpaste_ 2017-02-08 14:31:26
halogenandtoast pasted "Stories.hs" at http://lpaste.net/352251
c_wraith 2017-02-08 14:36:25
halogenandtoast: in general, the error message means exactly what it says. A type is being inferred to require an instance the RedisCtx class, but the concrete type being inferred has no such instance.
c_wraith 2017-02-08 14:36:39
...an instance *of* the...
c_wraith 2017-02-08 14:36:58
> "1" + "2"
lambdabot 2017-02-08 14:37:01
error:
lambdabot 2017-02-08 14:37:01
• No instance for (Num [Char]) arising from a use of '+'
lambdabot 2017-02-08 14:37:01
• In the expression: "1" + "2"
geekosaur 2017-02-08 14:38:03
however when the type has a digit appended, it often means you failed to relate some value to its type correctly such that inferred a new instance to be needed
c_wraith 2017-02-08 14:39:35
halogenandtoast: which line of the paste is the error attributed to?
halogenandtoast 2017-02-08 14:41:00
Actually I've messed up that error message. That error message was from a previous build run.
halogenandtoast 2017-02-08 14:41:39
getting the original code now
lpaste_ 2017-02-08 14:41:51
halogenandtoast revised "Stories.hs": "Stories.hs" at http://lpaste.net/352251
halogenandtoast 2017-02-08 14:42:11
the error occured on line 5
c_wraith 2017-02-08 14:42:43
well, now the Either in the error message makes more sense
c_wraith 2017-02-08 14:43:13
> pure 1 :: Either Int Int
lambdabot 2017-02-08 14:43:16
Right 1
halogenandtoast 2017-02-08 14:44:44
While I now have my code compiling (because I'm doing something different) I'd like to understand what I didn't understand in the first place (that prompted me to write the incorrect code). What is the relation between `pure 1 :: Either Int Int` and what I did previously?