Search Haskell Channel Logs

Saturday, February 25, 2017

#haskell channel featuring centril, tommd, Tuplanolla, Axman6, Cale,

centril 2017-02-25 13:05:43
hmm... so I have a bunch of data types for which I want to drive Eq, but they all have that in common that one field in all constructors must not be involved in the Eq computation... is there any way to somehow derive this, or facilitate it ?
Axman6 2017-02-25 13:10:08
centril: wrap that field ina a newtypw whose Eq instance always returns True for (==)?
centril 2017-02-25 13:10:08
Axman6: hmmh... that'd incur the cost of creating wrapper constructors for all fields, I'd rather implement the instances myself
centril 2017-02-25 13:10:08
wrapper constructors to make the interface feel as nice
Axman6 2017-02-25 13:10:08
whatever you pefer
centril 2017-02-25 13:10:20
=)
Tuplanolla 2017-02-25 13:10:35
Here's a great idea, centril: write a shell script to run `-ddump-deriv`, edit it with `sed` and feed it back into the source file.
Tuplanolla 2017-02-25 13:10:45
That'll definitely not break horribly all the time.
centril 2017-02-25 13:10:46
Tuplanolla: haha, nice one :P
centril 2017-02-25 13:11:19
hmm... is it possible to do -ddump-deriv from ghci / stack ?
Cale 2017-02-25 13:14:57
Tuplanolla: You laugh, but there's all kinds of awful stuff we're doing with -ddump-splices and sed at the moment to get stuff building on mobile platforms
Cale 2017-02-25 13:15:47
(mainly because -ddump-splices emits code which is syntactically invalid and needs editing to repair it)
Cale 2017-02-25 13:15:57
At some point we'll actually fix the problems in GHC. :P
tommd 2017-02-25 13:19:11
Does anyone here have a strong opinion on the various git librariese on Hackage?
centril 2017-02-25 13:19:17
is it possible to derive custom classes (yet) ?
tommd 2017-02-25 13:19:43
I'm going to need to automate cloning, pulling, and checkout out commits. Trying to decide what solution is best.
tommd 2017-02-25 13:20:07
`git` takes a great namespace for a package that doesn't perform any of the desired operations.
tommd 2017-02-25 13:20:55
`gitlib` seems up to the task, but it is frustrating that there are zero haddocks outside of the tutorial module.