Jugendhackt / haskell-ricochet

(WIP/Experimental) Ricochet implementation as Haskell Library.
GNU General Public License v3.0
22 stars 0 forks source link

Add type signatures with corresponding documentation for our Lenses #32

Open froozen opened 9 years ago

froozen commented 9 years ago

Lenses generated via template haskell don't have any haddock documentation which they should. The only solution I see is writing them manually and documenting them.

sternenseemann commented 9 years ago

I have looked into this issue and talked to the guys in #haskell-lens.

The Problem is that automatic generation of haddock comments or comments at all is not possible using TemplateHaskell at all. There is a related GHC Ticket. Sadly the Milestone seems to be pushed into the future consequently. Fun Fact: Look who's commented on the ticket.

Another approach would be to just write the type signatures and document those whilst letting the lenses be auto-generated. This paste describes how that can be achieved.

froozen commented 9 years ago

I think the approach described in the paste is what we'd want to do.

sternenseemann commented 9 years ago

The best way currently indeed.