Search Haskell Channel Logs

Wednesday, February 1, 2017

#haskell channel featuring geekosaur, zipper, ski, ertes, glguy, Tuplanolla,

ertes 2017-02-01 11:45:10
if you use emacs' package support, you need that
ski 2017-02-01 11:45:37
fuzzyhorns : the general idea is that the smaller scope an identifier has, the shorter (more abbreviated) name you can get away with. also very abstract/uninformative things also tend to get short names
zipper 2017-02-01 11:46:14
ertes: I don't use package initialize
ertes 2017-02-01 11:46:29
zipper: how did you install haskell-mode?
ertes 2017-02-01 11:46:59
zipper: how you initialise it depends on how you installed it
zipper 2017-02-01 11:47:06
`package-install`
zipper 2017-02-01 11:47:18
this to be specific https://github.com/onaio/meow/blob/master/auto-install-packages.el#L76
ertes 2017-02-01 11:47:24
ok, then you need (package-initialize), at least as far as i know
ski 2017-02-01 11:47:30
.. i suppose also with less risk of collision, names are also allowed to get shorter
zipper 2017-02-01 11:47:44
ertes: Wait I do it on line 66
zipper 2017-02-01 11:47:55
before installing packages
ertes 2017-02-01 11:49:53
i can't tell whether you're using emacs' package support or not… if yes, you need package-initialize, if not you probably need load-library… if you install it through your distribution, it probably has some site initialisation code, so you don't need anything
ertes 2017-02-01 11:50:04
in any case you need to make sure it's probably initialised
ertes 2017-02-01 11:50:22
then you should have the haskell-process-type variable available for customize-variable
ertes 2017-02-01 11:50:39
and it should let you choose stack
ertes 2017-02-01 11:53:08
zipper: oh, and make sure you're actually using haskell-interactive-mode
ertes 2017-02-01 11:54:11
zipper: (add-hook 'haskell-mode-hook 'interactive-haskell-mode)
zipper 2017-02-01 11:54:29
ertes: On it
geekosaur 2017-02-01 11:54:30
nd don;t forget silly things like, if you used an OS package and it added it to site-wide init, you'd have to restart emacs to pick that up
ertes 2017-02-01 11:55:59
zipper: i also have an explicit (require 'haskell-interactive-mode) and (require 'haskell-process)… not sure if i need it, but i have it anyway
zipper 2017-02-01 11:56:55
ertes: I at least seem to be doing that
zipper 2017-02-01 11:57:09
geekosaur: I am restarting
zipper 2017-02-01 11:57:18
If it fails now I'll just ignore it for now
zipper 2017-02-01 12:00:43
Fail
zipper 2017-02-01 12:00:46
I'm out
zipper 2017-02-01 12:01:10
I could just cabal configure and see if that works but why?
ertes 2017-02-01 12:05:02
zipper: perhaps you should just try to follow the official installation instructions: https://github.com/haskell/haskell-mode/blob/master/README.md#quick-installation
zipper 2017-02-01 12:05:40
ertes: I should :(
Tuplanolla 2017-02-01 12:18:50
If I make a product type into a sum type, my getters become traversals. Is there a way to zoom on one of the constructors to recover a getter?
zipper 2017-02-01 12:21:08
OMG I figured it out I was using completely different configs than I was on OSX
zipper 2017-02-01 12:21:36
I just pulled out the disk which I copied stuff into and realised I just hadn't put new chnages into version control
zipper 2017-02-01 12:23:07
Thanks ertes
glguy 2017-02-01 12:25:54
Tuplanolla: You can zoom on a Traversal corresponding to one of the constructors of your sum type
Tuplanolla 2017-02-01 12:26:18
This smells like prisms, which Microlens doesn't provide.
glguy 2017-02-01 12:26:52
Well, luckily it merely smells like it, and isn't it
Tuplanolla 2017-02-01 12:27:03
How do I perform this sorcery then?
glguy 2017-02-01 12:27:54
supposing you had a data T = A Int Char | B Bool; you could make _A :: Traversal' T (Int,Char); and _B :: Traversal' T Bool
glguy 2017-02-01 12:28:06
they wouldn't be as useful as full Prisms, but you don't need Prisms for this
glguy 2017-02-01 12:28:16
then you could zoom on _A or _B
Tuplanolla 2017-02-01 12:29:02
Would this actually come with `makePrisms`?
glguy 2017-02-01 12:29:16
Yeah, at least in lens
Tuplanolla 2017-02-01 12:29:29
Cool, thanks.
Tuplanolla 2017-02-01 12:34:47
I don't actually still see how it'd work.
Tuplanolla 2017-02-01 12:40:26
I guess my Venn-diagram-like type is the real problem here.