[web-devel] Yesod change: mutable session
Max Cantor
mxcantor at gmail.com
Tue Oct 26 12:22:44 CEST 2010
I can't think of any way in which it would break code, and I have a feeling a post I sent a few days ago was part of what precipitated this change.
However, as long as the previous behavior was well documented, I think it was ok. In fact, the previous behavior seems a bit more elegant in that now the "request" is no longer a pure representation of what the client actually sent but a mutable state.
This might make it more difficult to add functionality in the future (some kind of parallelism which I can't think of at the moment), but if you already wrote the fix, no need to go back, just my $0.02
Max
On Oct 26, 2010, at 2:42 PM, Michael Snoyman wrote:
> Hey all,
>
> One of the things which has been a stumbling block of Yesod users has
> been the semantics of setSession. In particular, it seems strange that
> this does not work:
>
> myHandler = do
> setSession "foo" "bar"
> Just "bar" <- getSession "foo"
>
> Up until now, I have kept the "input" session that the user submitted
> in his/her request separate from the "output" session which will be
> sent in the response. I've just pushed a change to the repo which
> modifies things so the above code works. I don't *think* this will
> break anyone's code, unless you were relying on the old behavior in a
> strange way I can't think of. If this causes anyone problems, please
> let me know soon; Yesod 0.6 should be released either today or
> tomorrow.
>
> Michael
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel
More information about the web-devel
mailing list