aula icon indicating copy to clipboard operation
aula copied to clipboard

Move frame out of the handlers

Open fisx opened this issue 10 years ago • 2 comments

  • https://github.com/liqd/aula/commit/4ea328c18312062f7d42afa5184abbd7cf1c0e78#commitcomment-16353983
  • https://github.com/liqd/aula/pull/126#issuecomment-189389039

fisx avatar Feb 26 '16 19:02 fisx

#132

andorp avatar Feb 27 '16 13:02 andorp

first attempt: https://github.com/liqd/aula/commit/a95525b1f69ce3dd8d723e73e9d36b832b40ece2

Since it doesn't reduce the number of calls to makeFrame, I reverted that. Other options:

  1. Use custom end point GetH and call makeFrame it in the HasServer instance.
  2. For forms, call it in our generic form handler.
  3. do it in enter?
  4. new type class HasFrame with instances for all servant combinators that pushes calls to makeFrame from the top of the routing table down to the endpoints. (like enter, but go more of the way on foot, i think.)

I like 3 most, even though I'm not sure if it can be done; followed by a combination of 1, 2.

fisx avatar Feb 29 '16 10:02 fisx