Emily

Results 279 comments of Emily

My workaround has been to ask the user to reload the page manually: ```javascript // app.js $(window).on("error", function(evt) { var e = evt.originalEvent; // get the javascript event if (e.message)...

> AutoRoute works with the following parameter types: > > Text, [Text], Maybe Text, Int, [Int], Maybe Int, Id (for all model types) Oh, alright. Would be nice if this...

Would also be nice if AutoRoute was using smth like `class AutoRouteParam` instead of `Data` (with an overlapping instance going via `Data`), because currently I don't think I have any...

GHC.Generics is a bit tricky to use, but something like generics-eot should be pretty simple. I wrote a tutorial here: https://tek.brick.do/generics-are-simple-write-your-own-to-json-9AM0Bz8yBZBP. ```haskell class Param a where parseParam :: ... instance...

The downside of using runtime dispatch instead of compile-time dispatch is exactly that overriding things becomes hard. You can supply a new `Param` instance trivially, but you can't trivially supply...

In fact, you can't do that even non-trivially, because custom Typeable instances aren't supported. (Otherwise I would've just written a custom Data instance that lies to AutoRoute.)

Btw I'll be happy to code this up in a stream on Saturday — although first I'd like to hear why you decided against GHC.Generics. Maybe what I'm proposing is...

Alright. Another option is to create a global registry that will be used during runtime dispatch — imagine a top-level `IORef` with a [typerep-map](https://github.com/kowainik/typerep-map) inside. Handlers for specific types could...

This would also likely let you get rid of `autoRouteWithIdType` — instead, the codegen will have to register a single `Id' x` handler per model.