Open gracjan opened 8 years ago
Few things I noticed:
haskell-doc-mode
already seems to be absent from the wiki and .texihaskell-doc-prelude-types
and its generator haskell-doc-extract-and-insert-types
appear to be Haskell 98-specific, which I don't think is terribly useful. That should be changed. The same goes for haskell-doc-strategy-ids
.haskell-process-get-type
. This also affects eldoc
in its current state.Hmm, is there anything of value to salvage from haskell-doc-mode
?
The unicode output of function type signatures seems helpful. For example, haskell-process-do-type
could use that.
Otherwise I don't immediately see a whole lot. There's a lot of code that seems like it would have to be updated for this century. For example, there's an option to use inf-haskell
to do completions, but a new version might as well use interactive-haskell-mode
instead.
So now we need a brave decision to kill it wholesale. Lets do like this:
It seems to be a good time to do stable release before this happens.
@gracjan I'm not sure what the best way to do it is, but since Emacs 25 uses global-eldoc-mode
by default, I'd say something should be done before 25.1 releases (~1 month I believe).
Just yesterday we have fixed the 'async' message from haskell-doc-mode
so there are people using it.
True (though it did take a bit for a report to come in). I was thinking the least that could be done is to make-obsolete
haskell-doc-mode
and perhaps make it an obsolete alias of eldoc-mode
, which would give people warnings when byte-compiling files using it.
The issue that might want to be avoided though is having both (global)eldoc-mode
and haskell-doc-mode
on at the same time.
People do not enable haskell-doc-mode
because they know what they are doing, they just copy some config from somewhere and run with it. For example Emacs Prelude stopped using haskell-doc-mode
only just recently on my request.
Well, it doesn't seem like the eldoc
functionality is given much spotlight (it's not in the manual). If one didn't read the source code, read the 1.45 NEWS section, or already use eldoc mode in their prog-mode
hook then it's not surprising they don't know about it.
Are you saying that a byte-compilation warning might not be good enough (i.e. they wouldn't byte-compile their init file)? If so, then one option is to straight up:
(defun haskell-doc-mode (&optional arg)
(interactive)
(warn "Please use `eldoc-mode' instead.")
(eldoc-mode arg))
I don't care either way, but as yesterday reminded me, it might be best to just get it out of the way as with Emacs 25 there's going to be a lot more eldoc-mode
users.
We can do defalias
and make-obsolete
, I just wanted to make sure that eldoc-mode
has all the funcitionality of haskell-doc-mode
before we kill it.
Don't take my word for it, but from what I can see all that's haskell-doc-mode
-specific is:
haskell-doc-ask-mouse-for-type
, which I'd be a bit surprised if anyone was using.So lets kill it. @fice-t, can you:
defalias
from haskell-doc-mode
to eldoc-mode
.haskell-doc-mode.el
?
Sorry, I suppose I wasn't clear before. There's still a bunch of stuff for eldoc-mode
to work in haskell-mode
still in haskell-doc.el
(haskell-doc-current-info
and everything it uses), but there's also a bunch of stuff (some unused anyway) that can get ripped out.
But it probably should get a rewrite (by someone else who understands it better) later down the road.
In light of issues mulled over in #649 and #820
haskell-doc-mode
should be removed, functionality should be put ineldoc-mode
.eldoc
actually works already withhaskell-mode
:eldoc-mode
eldoc-mode
fromhaskell-doc.el
haskell-doc-mode
from texihaskell-doc-mode
from wikihaskell-doc-mode
from all the random wikis and tutorials out therehaskell-doc-mode
from spacemacs (if needed)