-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Read
and Show
derivation for Route _
optional
#1773
Comments
No objection from me, seems like a reasonable change. How were you thinking of indicating this? The route syntax may be a good place |
I was probably going to port the code from |
Cool, sounds like a good plan. |
@parsonsmatt did you give this a try? We would also like to not require |
…tances are generated for a route (#1819) * remove read from the list of derived instances, partially closing #1773, #1203 * bump version * adjusting a version bound because the next version breaks compilation * make a RouteOpts type that allows for finer control over what instances are derived for a Route * some lintings * adjust versioning and changelog * actually a more major version bump * verified that export list is complete * add @ since
We've identified that
Read
is particularly slow to derive - twice as slow asEq
orShow
. A 1000 constructor sum type with a singleInt
parameter in each constructor takes about 2.5s on my laptop to compile, whileEq
is a mere 0.8s and no derivation is 0.2s (for reference).If I remove the
Read
derivation in themkYesod
functions, all tests inyesod-core
pass fine, and all tests pass in the work repository with this change too.#1203 is related - by dropping the
Read
derivation, we no longer needRead
in elements in the path pieces.The text was updated successfully, but these errors were encountered: