ertes 2017-02-17 21:45:09
jle`: that *is* fmap for ((->) r)
MarcelineVQ 2017-02-17 21:45:28
he's doin a thing :>
ertes 2017-02-17 21:45:44
> ((*2) `fmap` (+ 1)) 5
lambdabot 2017-02-17 21:45:44
12
jle` 2017-02-17 21:45:44
ertes: Cooler was asking if fmap = (.) makes sense, and i'm suggesting that they can answer that question using their own deduction :o
ertes 2017-02-17 21:45:55
oh, i'm sorry
ertes 2017-02-17 21:46:11
didn't realise that =)
Cooler 2017-02-17 21:46:14
jle`, no i was asking if it fmap == (.) in case of (->) r
jle` 2017-02-17 21:46:21
it's ok, it's not like the answer is a surprise
jle` 2017-02-17 21:46:32
Cooler: you're wondering if fmap = (.) for the case of `(->) r`
Wizek_ 2017-02-17 21:46:32
dmj`, Potentially, although the vast majority of the imports that I want to de-duplicate are not intra-project. So if I don't import them from outside packages, are you proposing that I re-implement their functionality within my project?
jle` 2017-02-17 21:46:42
Cooler: my reply is, that's a question you can answer for yourself :o
jle` 2017-02-17 21:46:45
does it typecheck?
jle` 2017-02-17 21:46:48
does it follow the laws?
MarcelineVQ 2017-02-17 21:46:56
ertes: could implicit parameters factor into what you're working on now or are they one level too low? https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#implicit-parameter-type-constraints
ertes 2017-02-17 21:47:08
Wizek_: one option is to optimise your editor for rapid importing… that's what i do
jle` 2017-02-17 21:47:16
Cooler: keep in mind that all Functor instances are unique
Cooler 2017-02-17 21:47:19
jle`, well you could have multiple instances for a single typeclass for the same type
jle` 2017-02-17 21:47:34
yeah, that was what my last message was about
jle` 2017-02-17 21:47:59
all Functor instances are unique
ertes 2017-02-17 21:48:00
Wizek_: i have a shortcut to jump to the imports in a separate window, where i generally type a few characters, then tab, then close the window (which automatically sorts my imports, too)
jle` 2017-02-17 21:48:00
if a type has a Functor instance, then that's the *only* Functor instance it can have
Cooler 2017-02-17 21:48:07
ok
ertes 2017-02-17 21:48:28
Wizek_: i have something similar for extensions and exports, too
Wizek_ 2017-02-17 21:48:37
ertes, interesting. What setup?
jle` 2017-02-17 21:48:54
Cooler: but, that is a good point
jle` 2017-02-17 21:48:55
:)
dmj` 2017-02-17 21:49:52
Wizek_: I wouldn't say re-implement, but I'd import moduels from external packages and then export types and functions on types that correspond to your logic. So new functionality can be implemented using only your types
dmj` 2017-02-17 21:50:04
newtype is cheap
dmj` 2017-02-17 21:50:12
and safe
ertes 2017-02-17 21:50:16
Wizek_: emacs + haskell-mode + haskell-interactive-mode + https://github.com/esoeylemez/config/blob/master/emacs/ertes-haskell.el
dmj` 2017-02-17 21:50:41
s/moduels/modules
Wizek_ 2017-02-17 21:50:48
Although I'm not sure that would fully solve my use-case: Lately I've been moving code around and I am getting tired of having to move/copy imports from one file to another even if I put them side-by-side.
Wizek_ 2017-02-17 21:51:14
ertes, thanks, one of these days I might give [spac]emacs a try.
ertes 2017-02-17 21:51:17
Wizek_: i'm using haskell-import-mapping to get short names for common modules, and for all others i can just tab-complete using haskell-interactive-mode (so it uses the packages in scope for the current project)
ertes 2017-02-17 21:52:23
Wizek_: haskell-interactive-mode also has an option to suggest imports fully automatically, but i'm not using that (it requires some kind of backend like hoogle, which is not practical in my setup)
ertes 2017-02-17 21:52:44
(haskell-interactive-mode is part of haskell-mode)
Cooler 2017-02-17 21:55:29
why does (fmap . fmap) f foo == fmap (fmap f) foo ?
cocreature 2017-02-17 21:56:39
Cooler: (fmap . fmap) f foo = (\x -> fmap (fmap x)) f foo = fmap (fmap f) foo
Cooler 2017-02-17 21:58:42
actually nvm
Cooler 2017-02-17 21:58:46
i see it now