Commit Graph

110 Commits

Author SHA1 Message Date
Michael Snoyman
867e7c32dc
Clean up some CPP 2018-07-03 18:57:23 +03:00
Ryan Scott
3408e1e630 Adapt to Semigroup changes in base-4.11 2018-02-04 20:09:37 -05:00
Michael Snoyman
6ad81f6d15
Merge remote-tracking branch 'origin/master' into better-monads 2018-02-02 00:17:37 +02:00
Michael Snoyman
fe233dd958
Merge pull request #1478 from jprider63/master
Update `mkYesodWith` and refactor so that `mkYesod` uses the context parser
2018-01-29 14:57:44 +02:00
James Parker
8796310eef More documentation for mkYesod and mkYesodWith 2018-01-24 23:55:57 -05:00
Michael Snoyman
fa8e1ac00f
Switch to SubHandlerFor
This is much more consistent than suddenly using a ReaderT for subsites.
Thanks to @jprider63 for the inspiration for this, I think it cleans
things up a lot!
2018-01-24 13:01:26 +02:00
James Parker
b71bfae261 Refactor so that mkYesod and mkYesodDispatch use the context parser 2018-01-22 00:45:44 -05:00
James Parker
18910b516b Change mkYesodWith to accept separate lists for contexts and type
arguments
2018-01-22 00:19:04 -05:00
Maximilian Tagher
6b22a0b9be Give more detail in the error message for too large request bodies.
* Just to be helpful to developers, give the maximum body length and their body length
* Also point developers to the function to change that value

(I don't think this leaks any sensitive info, because you can always binary search with different request body sizes to find the maximum allowable)
2018-01-18 18:30:34 -08:00
Michael Snoyman
6830a9840c
Merge branch 'better-monads' into no-transformers 2018-01-17 06:43:52 +02:00
Michael Snoyman
ad35ef9431
Deal with another sneaky exception 2018-01-16 16:10:23 +02:00
Michael Snoyman
915d9e2fa6
Finish switching header key to a CI
Fixes #1418
2018-01-15 16:47:49 +02:00
Michael Snoyman
60f65ed267
Cleanup warnings 2018-01-15 15:09:07 +02:00
Michael Snoyman
1a1cb8a45f
Drop mwc-random 2018-01-15 10:18:16 +02:00
Michael Snoyman
fbccfe2306
Merge branch 'better-monads' into no-transformers 2018-01-11 22:49:02 +02:00
Michael Snoyman
103c098cf8
Catch up with Data.Conduit.Combinators 2018-01-10 12:16:31 -08:00
Michael Snoyman
47ee7384ea
Be gone with ye HandlerT! 2017-12-13 09:53:14 +02:00
Michael Snoyman
c5ac821115
Remove some conditionals for old versions 2017-12-12 12:08:06 +02:00
James Parker
6b000ecfb4 Version bump and fix for old versions of TH. 2017-03-27 12:06:44 -04:00
James Parker
997714f4c2 Accept multiple argument types inside brackets 2017-03-27 02:42:47 -04:00
James Parker
adf89bcf84 Contexts can be parsed and included in instances. Standalone deriving is used when
a context is provided. Type variables can be included in routes/TH.
2017-03-27 00:10:32 -04:00
Artem Chuprina
83299bf1be urlParamRenderOverride method for Yesod class
this method replaces urlRenderOverride because the latter lacks support for query string
2016-08-09 22:54:24 +03:00
Mikkel Christiansen
50c4138a5c Take hlint suggestions. 2016-06-28 08:28:23 +02:00
Mikkel Christiansen
cc134b93de Remove compiler warnings for unused var and unused imports. 2016-06-27 19:47:55 +02:00
Michael Snoyman
1036550d00 Add missing Monoid import 2016-06-23 08:15:53 +03:00
Michael Snoyman
90ecc1ebe3 Significant cleanup of runHandler
@nh2 This hopefully makes the logic much clearer to avoid exceptional
cases slipping through.

@gregwebs Maybe you'd like to review this?

For yesod-core 1.5: we should make as many datatypes strict-fielded as
possible in Yesod.Core.Types to make for less corner cases. Also, the
idea of an exception value itself being partial is _really_ terrifying.
2016-06-22 20:28:42 +03:00
Michael Snoyman
33ea980dba Simplify away from returnDeepSessionMap 2016-06-22 18:45:46 +03:00
Michael Snoyman
a3d9a13abe Proper handling of impure exceptions within HandlerError values 2016-06-22 18:24:18 +03:00
Erik de Castro Lopo
96af1e7f39 yesod-core: Fix for a *very* late change in ghc-8.0 TH api 2016-04-23 10:54:41 +10:00
Erik de Castro Lopo
226c381baa yesod-core: Make it work with ghc-8.0
Use CPP hackery to make it compile with ghc-8.0 and ghc 7.10. If
ghc-7.10 works, I assume earlier supported versions of GHC also
work. All tests pass with both GHC versions.

Unfortunately, the TH changes force changes in the type signature
of Yesod.Routes.TH.RenderRoute.mkRouteCons from:

    mkRouteCons :: [ResourceTree Type] -> ([Con], [Dec])

to

    mkRouteCons :: [ResourceTree Type] -> Q ([Con], [Dec])

and I can't see a way around that.
2016-04-19 14:52:03 +10:00
Chris Allen
7123b02500 typo 2016-03-01 15:13:34 -06:00
Eric Easley
56c19a2cd3 Add hook to apply arbitrary function to all handlers 2015-12-09 11:29:13 -08:00
David Turner
badabaa1ca Update comment 2015-11-13 15:15:04 +00:00
David Turner
b9b2d0d609 Use AutoUpdate for session expiry date too 2015-11-13 13:40:19 +00:00
David Turner
ef8bbf5820 Make comment more precise 2015-10-11 07:39:48 +00:00
David Turner
5b4d5ced3b Move auto-updater into YesodRunnerEnv 2015-10-10 15:58:39 +00:00
Mikkel Christiansen
25bbda2087 Remove unused applicative. 2015-08-26 16:10:56 +02:00
Mikkel Christiansen
a47ceec445 GHC 7.10 import warnings removed from yesod-core. 2015-08-26 14:52:39 +02:00
Daniel Díaz
e77f6bd709 Do not use reify unless the type name is in scope. Assume arity 0 when the type is not in scope. 2015-08-23 22:49:04 +02:00
Daniel Díaz
42ec7f53e9 Depend directly on template-haskell. 2015-08-11 22:10:12 +02:00
Daniel Díaz
4897c24d3f Use CPP to adapt to template-haskell changes according to the version of base used. 2015-08-11 22:07:28 +02:00
Daniel Díaz
ea62a38464 mkYesodGeneral arguments can now be monomorphic or polymorphic types. It is possible to impose class instances to polymorphic type arguments. 2015-08-10 07:23:26 +02:00
Daniel Díaz
366bfbd319 Allow Site types to have type parameters. 2015-08-06 00:35:48 +02:00
Daniel Díaz
9991e307e3 Attempt to add support for parametrized types in mkYesod. 2015-08-06 00:13:28 +02:00
Andrew Martin
b88295cf05 stop the module import cycle 2015-06-05 13:20:03 -04:00
Greg Weber
05f2a7631c add Yesod.Core.Unsafe module 2014-11-29 17:45:56 -08:00
Michael Snoyman
a65349612e Support time 1.5 2014-11-25 07:18:11 +02:00
Michael Snoyman
846033b176 Fix some haddocks 2014-11-23 18:54:50 +02:00
Michael Snoyman
f8b9a702b8 Add missing import 2014-11-23 12:13:25 +02:00
Michael Snoyman
0af76fa97b Only update expires time once per hour 2014-11-23 12:10:22 +02:00