[haddock] #72: Wiki-like interface

haddock haddock at projects.haskell.org
Tue Feb 10 16:54:50 EST 2009


#72: Wiki-like interface
------------------------+---------------------------------------------------
Reporter:  waern        |        Owner:     
    Type:  enhancement  |       Status:  new
Priority:  major        |    Milestone:     
 Version:               |   Resolution:     
Keywords:               |  
------------------------+---------------------------------------------------
Comment (by waern):

 Replying to [comment:2 apfelmus]:
 > For reference, here the corresponding
 [http://www.reddit.com/r/haskell_proposals/comments/7qnwq/haddock_with_embedded_wiki_feature_a_la_rwh_so_we/
 entry] in the Haskell Proposals reddit.
 >
 > Concerning the design, I'd use a classic Lens approach
 >
 > {{{
 >     data Lens a b = Lens { focus :: a -> (b, b -> a) }
 >
 >     instance Category Lens where ...
 > }}}
 >
 > The server side script uses a lens to cut the full source file down to
 haddock only. Changes to the haddock will be mapped to changes to the
 source file which can be recorded as patches. Using lenses to display a
 page can probably be integrated into the wiki engine while haddock is to
 provide the actual lens that maps .hs to documentation.
 >
 > For more on lenses, see also [http://www.sandr.dds.nl/FunctionalForms/
 Functional Forms]. They call it "functional references", though. The term
 "lens" comes from the paper [http://www.cis.upenn.edu/~bcpierce/papers
 /dblenses-pods.pdf Relational Lenses].

 An easier approach would be to let the user edit the original .hs file (or
 whatever file-format is the original), but only allow changes to the
 Haddock markup. It might be good to be able to view the source code when
 editing the documentation anyway - you better know what it is you are
 documenting. Not sure if showing the source code is the right default,
 though.

-- 
Ticket URL: <http://trac.haskell.org/haddock/ticket/72#comment:4>
haddock <http://www.haskell.org/haddock>
Haddock, The Haskell Documentation Tool


More information about the Haddock mailing list