ron icon indicating copy to clipboard operation
ron copied to clipboard

Generate lensish API

Open cblp opened this issue 7 years ago • 2 comments

-- now
note_status_assignIfDiffer newStatus = do
    curStatus <- note_status_read
    when (curStatus /= newStatus) $
        note_status_assign newStatus

-- should be
assignIfDiffer new = do
    cur <- read
    when (cur /= new) $
        assign new
- note_status_assignIfDiffer
+ note_status &~ assignIfDiffer

cblp avatar Oct 24 '18 11:10 cblp

Maybe make a ron-lens package with all the fancy stuff for those who like such things?

dpwiz avatar Jan 09 '19 12:01 dpwiz

The problem is that lenses must be generated from the schema, so they go to ron-schema-gen or something like that.

cblp avatar Jan 09 '19 12:01 cblp