--hyperlinks-in-source ?

I am using 'standalone-haddock --hyperlink-source' (and I cannot praise this enough) but ... is there some way to get hyperlinks *in* the source? currently, I have to jump back and forth between doc (which has all the links) and source (which I want to navigate - actually, present for others so they can browse) I understand there's a nontrivial design space but I could imagine a basic functionality like: for each identifier i (type, class, constructor, function) that appears in the source, generate the link that haddock would produce for " -- | 'i' " (3.8.7. Hyperlinked Identifiers https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810770608 ) - J.W.

Hi Johannes, I asked this some time ago: https://www.haskell.org/pipermail/haskell-cafe/2013-June/108607.html There is something in the HaRe refactoring tool (seems to be extracted from Programatica project): https://github.com/RefactoringTools/HaRe/tree/master/tools/hs2html However I don't think it's readily usable at this stage (seems to be quite outdated). I also have this need for Nomyx: https://github.com/cdupont/Nomyx/issues/5 I think it would be very useful and used if this was existing and usable :) We could join forces to recreate it? Best, Corentin On Thu, Nov 27, 2014 at 12:58 PM, Johannes Waldmann < waldmann@imn.htwk-leipzig.de> wrote:
I am using 'standalone-haddock --hyperlink-source' (and I cannot praise this enough) but ...
is there some way to get hyperlinks *in* the source?
currently, I have to jump back and forth between doc (which has all the links) and source (which I want to navigate - actually, present for others so they can browse)
I understand there's a nontrivial design space but I could imagine a basic functionality like:
for each identifier i (type, class, constructor, function) that appears in the source, generate the link that haddock would produce for " -- | 'i' "
(3.8.7. Hyperlinked Identifiers https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810770608 )
- J.W.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I've dreamed about this before, ever since I encountered it in Agda's
standard library [1]. Sounds like a substantial amount of work
though...
Erik
[1] http://www.cse.chalmers.se/~nad/listings/lib-0.7/README.html
On Thu, Nov 27, 2014 at 12:58 PM, Johannes Waldmann
I am using 'standalone-haddock --hyperlink-source' (and I cannot praise this enough) but ...
is there some way to get hyperlinks *in* the source?
currently, I have to jump back and forth between doc (which has all the links) and source (which I want to navigate - actually, present for others so they can browse)
I understand there's a nontrivial design space but I could imagine a basic functionality like:
for each identifier i (type, class, constructor, function) that appears in the source, generate the link that haddock would produce for " -- | 'i' "
(3.8.7. Hyperlinked Identifiers https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810770608 )
- J.W.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Wow, this is fantastic. And I love the colors.
On Thu, Nov 27, 2014 at 4:18 PM, Erik Hesselink
I've dreamed about this before, ever since I encountered it in Agda's standard library [1]. Sounds like a substantial amount of work though...
Erik
[1] http://www.cse.chalmers.se/~nad/listings/lib-0.7/README.html
I am using 'standalone-haddock --hyperlink-source' (and I cannot praise this enough) but ...
is there some way to get hyperlinks *in* the source?
currently, I have to jump back and forth between doc (which has all the links) and source (which I want to
On Thu, Nov 27, 2014 at 12:58 PM, Johannes Waldmann
wrote: navigate - actually, present for others so they can browse)
I understand there's a nontrivial design space but I could imagine a basic functionality like:
for each identifier i (type, class, constructor, function) that appears in the source, generate the link that haddock would produce for " -- | 'i' "
(3.8.7. Hyperlinked Identifiers https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810770608 )
- J.W.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I see two possible implementations:
- a standalone tools. The links produced link to another place in the
source code HTML.
- integrated with haddock. The links in the source code points back to the
haddock.
Which on is better?
On Thu, Nov 27, 2014 at 4:25 PM, Corentin Dupont
Wow, this is fantastic. And I love the colors.
On Thu, Nov 27, 2014 at 4:18 PM, Erik Hesselink
wrote: I've dreamed about this before, ever since I encountered it in Agda's standard library [1]. Sounds like a substantial amount of work though...
Erik
[1] http://www.cse.chalmers.se/~nad/listings/lib-0.7/README.html
I am using 'standalone-haddock --hyperlink-source' (and I cannot praise this enough) but ...
is there some way to get hyperlinks *in* the source?
currently, I have to jump back and forth between doc (which has all the links) and source (which I want to
On Thu, Nov 27, 2014 at 12:58 PM, Johannes Waldmann
wrote: navigate - actually, present for others so they can browse)
I understand there's a nontrivial design space but I could imagine a basic functionality like:
for each identifier i (type, class, constructor, function) that appears in the source, generate the link that haddock would produce for " -- | 'i' "
(3.8.7. Hyperlinked Identifiers
https://www.haskell.org/haddock/doc/html/ch03s08.html#idm140354810770608 )
- J.W.
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Thu, Nov 27, 2014 at 10:32 AM, Mikhail Glushenkov < the.dead.shall.rise@gmail.com> wrote:
Hi,
- integrated with haddock. The links in the source code points back to
On 27 November 2014 at 16:28, Corentin Dupont
wrote: the haddock.
IIUC, the proper place for this is hscolour, not haddock.
Indeed --- but it will need to be made much smarter, in particular it must be able to accept from cabal a list of versioned packages to resolve symbols from. -- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

Shameless plug: there's still a lot to go, but see for example demo at
http://robinp.github.io/nemnem/ (gh at https://github.com/robinp/nemnem).
Robin
2014-11-27 17:00 GMT+01:00 Brandon Allbery
On Thu, Nov 27, 2014 at 10:32 AM, Mikhail Glushenkov < the.dead.shall.rise@gmail.com> wrote:
Hi,
- integrated with haddock. The links in the source code points back to
On 27 November 2014 at 16:28, Corentin Dupont
wrote: the haddock.
IIUC, the proper place for this is hscolour, not haddock.
Indeed --- but it will need to be made much smarter, in particular it must be able to accept from cabal a list of versioned packages to resolve symbols from.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Great! I think that's what we need!!
On Thu, Nov 27, 2014 at 5:08 PM, Robin Palotai
Shameless plug: there's still a lot to go, but see for example demo at http://robinp.github.io/nemnem/ (gh at https://github.com/robinp/nemnem). Robin
2014-11-27 17:00 GMT+01:00 Brandon Allbery
: On Thu, Nov 27, 2014 at 10:32 AM, Mikhail Glushenkov < the.dead.shall.rise@gmail.com> wrote:
Hi,
- integrated with haddock. The links in the source code points back to
On 27 November 2014 at 16:28, Corentin Dupont
wrote: the haddock.
IIUC, the proper place for this is hscolour, not haddock.
Indeed --- but it will need to be made much smarter, in particular it must be able to accept from cabal a list of versioned packages to resolve symbols from.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Erik Hesselink
I've dreamed about this before, ever since I encountered it in Agda's standard library [1].
Also, the Coq library documentation has it (a bit earlier, I think) https://coq.inria.fr/distrib/current/stdlib/
participants (6)
-
Brandon Allbery
-
Corentin Dupont
-
Erik Hesselink
-
Johannes Waldmann
-
Mikhail Glushenkov
-
Robin Palotai