haskell-ricochet icon indicating copy to clipboard operation
haskell-ricochet copied to clipboard

Add type signatures with corresponding documentation for our Lenses

Open froozen opened this issue 10 years ago • 3 comments

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.

froozen avatar Oct 24 '15 20:10 froozen

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.

sternenseemann avatar Oct 28 '15 15:10 sternenseemann

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

froozen avatar Oct 30 '15 19:10 froozen

The best way currently indeed.

sternenseemann avatar Oct 30 '15 19:10 sternenseemann