Skip to content

Conversation

@masaeedu
Copy link

As an example, this lets us lift:

declareSchema :: ToSchema a => Proxy a -> Declare (Definitions Schema) Schema 

into:

declareSchema' :: ToSchema a => Proxy a -> Declare Components Schema 
declareSchema' = hoistDeclareT schemas . declareSchema

@dylex
Copy link

dylex commented Apr 30, 2022

I also found this useful. To be consistent with Lens, this should maybe be called zoomDeclare.

(To be honest, at the end of the day I ended up just switching to MonadState since it's more flexible and efficient, and has a bunch more functionality available.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants