[Haskell-beginners] emacs + ghc-mod + cabal repl

Miguel Negrão miguel.negrao-lists at friendlyvirus.org
Sun Mar 23 18:26:22 UTC 2014


Hi Mateus,

Em 19-03-2014 12:38, Mateusz Kowalczyk escreveu:
> On 19/03/14 12:22, Mateusz Kowalczyk wrote:
>> On 19/03/14 10:53, Miguel Negrão wrote:
>>> Em 18-03-2014 18:47, Miguel Negrão escreveu:
>>>
>>> Following that, a couple more questions:
>>>
>>> Is it possible to have the haddock help for functions displayed inside
>>> emacs (no browser) ?
>>
>> Not that I know of. GHCi doesn't support it (yet, maybe it will in the
>> future) and Haskell interface files don't store this information so
>> various tools can't get at it. I'm not aware of any tools that read the
>> Haddock interface files and give you the docs that way. If
>> someone/myself decides to go through with putting the Haddock strings
>> into .hi files, reading documentation in your editor might become
>> possible but I wouldn't hold my breath as it is completely in the ‘it'd
>> be cool if we had this’ stage.
> 
> As a quick follow-up, it might be that Haddock itself will provide an
> interface to its own interface files and then various tools (and GHCi)
> can use that instead. Again, just ideas atm.
> 
>>
>>> How does one jump to the defition of a symbol ?
>>
>> I use hasktags to generate the TAGS table and then use find-tag (bound
>> to M-.) to jump to things. It works fine but it does tend to screw up
>> sometimes. Of course it will only work if your definition is in the
>> generated table, it won't do things like jumping to definitions in the
>> libraries you use etc. I imagine that you could have a massive TAGS
>> table generated from all your sources but I doubt it'd scale very well
>> and would be close to impossible to maintain.
>>
>> It'd be great if we had something like Agda, where all the source is
>> available so we can jump to anything at all, but we don't.

Actually I found something that does this: haskdogs
(http://hackage.haskell.org/package/haskdogs-0.1). It will create tags
for all the imports, it's quite fast. This kind of also solves my first
question, since when navigating to the source of a function usually the
documentation is on a comment over the source.

I gave a try to ergoemacs, since I ctrl-c ctrl-v is in my muscle memory
for some 15 years already, but it conflicts with ghc-mods shortcuts.
Anyone has experience with ergoemacs-mode and ghc-mod ?

best,
Miguel



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140323/f74956e5/attachment.sig>


More information about the Beginners mailing list