Data.List documentation improvements
Simon Marlow
simonmarhaskell at gmail.com
Tue Dec 5 06:59:14 EST 2006
Neil Mitchell wrote:
> Hi
>
>> That would certainly be neat. Maybe it could be implemented in
>> Haskell using
>> YHC's JavaScript backend? (half-joking...)
>
>
> Thats how Hoogle 4 is going to be implemented...
>
>> AJAX requires a server, and the nice thing about Haddock documentation
>> is you
>> can view it with file:// URLs. Maybe there's a way around this
>> though, I'm not
>> an AJAX expert.
>
>
> By "AJAX style" I meant:
>
> <a href="javascript:show_code('map')">Show Code</a>
> <div id="code_map" style="display:none;">
> code for map goes here
> </div>
>
> No need for a server,
Right, that would be easier.
I'm a bit concerned that the concept of "the code for a function" is not as
simple as it seems. Including just the code for the function itself often won't
be useful, because it might be something like
myFunction x y z = myFunction' x y z []
so then do we include the transitive closure of code referenced by the function?
What if we refer to something in a different file, or scattered around the
current file? What about CPP? Presumably functions that are documented
elsewhere should be rendered as links. etc. etc.
Just linking to a point in the source file is much easier.
Making the "include source code" feature optional on a per-function basis would
probably make sense, though.
Cheers,
Simon
More information about the Libraries
mailing list