Yesod 0.8 migration guide (release candidate?)

Hi all, I've put up the Yesod 0.8 migration guide[1]. I'm planning on releasing this version of Yesod tomorrow night (Saturday, UTC+3). Now's your chance to try and find those last few bugs before release. I have one idea that I wanted to bounce around. The biggest thing in this release is the transition to Text. Overall, this is a good move, but it's just a little bit annoying to lose out on convenience functions like concat and ++. As a convenience, I'm considering exporting the following from the Yesod module: mconcat (from Data.Monoid) <> = mappend (from Data.Monoid) Text (the strict version, from Data.Text) I know there was some talk a while ago of providing a <> operator in base, but I haven't heard anything about it since. I think this could be a very nice convenience, and would appreciate feedback. Michael [1] http://www.yesodweb.com/book/migrate7to8

The scaffolding app in yackage produces code with a type error. Running
"yesod" for a new app with foundation type "Foo" and then building it
(via cabal configure && cabal build) reports:
Foo.hs:91:36:
Couldn't match expected type
`Blaze.ByteString.Builder.Internal.Types.Builder'
with actual type `T.Text'
In the second argument of `joinPath', namely `Settings.staticroot'
In the first argument of `uncurry', namely
`(joinPath a Settings.staticroot)'
In the expression: uncurry (joinPath a Settings.staticroot)
--Chris
On Fri, Apr 15, 2011 at 5:52 AM, Michael Snoyman
Hi all, I've put up the Yesod 0.8 migration guide[1]. I'm planning on releasing this version of Yesod tomorrow night (Saturday, UTC+3). Now's your chance to try and find those last few bugs before release. I have one idea that I wanted to bounce around. The biggest thing in this release is the transition to Text. Overall, this is a good move, but it's just a little bit annoying to lose out on convenience functions like concat and ++. As a convenience, I'm considering exporting the following from the Yesod module: mconcat (from Data.Monoid) <> = mappend (from Data.Monoid) Text (the strict version, from Data.Text) I know there was some talk a while ago of providing a <> operator in base, but I haven't heard anything about it since. I think this could be a very nice convenience, and would appreciate feedback. Michael [1] http://www.yesodweb.com/book/migrate7to8 _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

It looks like you still have a previous version of the package installed
(i.e., from earlier this week). Try registering yesod-core and installing
again: ghc-pkg unregister yesod-core --force && cabal install yesod
General note: hopefully we'll have a better process for betas in the future,
this was really a trial run at things. Thanks for sticking it out and
continuing to help test :)
Michael
On Fri, Apr 15, 2011 at 5:46 PM, Chris Casinghino
The scaffolding app in yackage produces code with a type error. Running "yesod" for a new app with foundation type "Foo" and then building it (via cabal configure && cabal build) reports:
Foo.hs:91:36: Couldn't match expected type `Blaze.ByteString.Builder.Internal.Types.Builder' with actual type `T.Text' In the second argument of `joinPath', namely `Settings.staticroot' In the first argument of `uncurry', namely `(joinPath a Settings.staticroot)' In the expression: uncurry (joinPath a Settings.staticroot)
--Chris
Hi all, I've put up the Yesod 0.8 migration guide[1]. I'm planning on releasing
version of Yesod tomorrow night (Saturday, UTC+3). Now's your chance to
and find those last few bugs before release. I have one idea that I wanted to bounce around. The biggest thing in this release is the transition to Text. Overall, this is a good move, but it's just a little bit annoying to lose out on convenience functions like concat and ++. As a convenience, I'm considering exporting the following from
Yesod module: mconcat (from Data.Monoid) <> = mappend (from Data.Monoid) Text (the strict version, from Data.Text) I know there was some talk a while ago of providing a <> operator in
On Fri, Apr 15, 2011 at 5:52 AM, Michael Snoyman
wrote: this try the base, but I haven't heard anything about it since. I think this could be a very nice convenience, and would appreciate feedback. Michael [1] http://www.yesodweb.com/book/migrate7to8 _______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel

On Fri, Apr 15, 2011 at 10:48 AM, Michael Snoyman
It looks like you still have a previous version of the package installed (i.e., from earlier this week). Try registering yesod-core and installing again: ghc-pkg unregister yesod-core --force && cabal install yesod
Thanks, you're right - I had cleaned out yesod but not yesod-core. One more thing: I notice in the latest version of yesod-form, selectField takes a list with Strings but maybeSelectField takes a list with Texts. Any reason for this difference? Thanks again! --Chris

On Fri, Apr 15, 2011 at 11:43 PM, Chris Casinghino
On Fri, Apr 15, 2011 at 10:48 AM, Michael Snoyman
wrote: It looks like you still have a previous version of the package installed (i.e., from earlier this week). Try registering yesod-core and installing again: ghc-pkg unregister yesod-core --force && cabal install yesod
Thanks, you're right - I had cleaned out yesod but not yesod-core.
One more thing: I notice in the latest version of yesod-form, selectField takes a list with Strings but maybeSelectField takes a list with Texts. Any reason for this difference?
Thanks again!
--Chris
Boy, you're batting 1000 ;). Thanks for that catch, I'll put it in before the release. Michael

Michael Snoyman wrote:
As a convenience, I'm considering exporting the following from the Yesod module: mconcat (from Data.Monoid) <> = mappend (from Data.Monoid) Text (the strict version, from Data.Text) I know there was some talk a while ago of providing a <> operator in base, but I haven't heard anything about it since.
It may not have made it into base yet, but <> is defined in Edward's semigroups package: http://hackage.haskell.org/package/semigroups If you are going to export a <>, make sure it's that one to avoid clashes. Even if you don't export <>, I think it's a good idea to make every Monoid in Yesod a Semigroup instance. And perhaps you'll also find some useful Semigroup instances which aren't Monoids, or shouldn't be Monoids. Thanks, Yitz
participants (3)
-
Chris Casinghino
-
Michael Snoyman
-
Yitzchak Gale