Skip to content

Commit

Permalink
yesod 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Mar 15, 2013
1 parent cb6a278 commit bef548d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
9 changes: 7 additions & 2 deletions Application.hs
Expand Up @@ -9,6 +9,8 @@ import Settings
import Yesod.Default.Config
import Yesod.Default.Main
import Yesod.Default.Handlers
import Network.Wai.Middleware.Gzip
import Network.Wai.Middleware.Autohead
#if DEVELOPMENT
import Network.Wai.Middleware.RequestLogger (logStdoutDev)
#else
Expand Down Expand Up @@ -60,8 +62,11 @@ getApplication conf = do
iauthors <- loadAuthors >>= newIORef

let foundation = YesodWeb conf s assets iblog ibook iauthors
app <- toWaiAppPlain foundation
return $ logWare app
app <- toWaiApp foundation
return $ gzip def
$ autohead
$ logWare
app
where
#ifdef DEVELOPMENT
logWare = logStdoutDev
Expand Down
2 changes: 1 addition & 1 deletion Foundation.hs
Expand Up @@ -65,7 +65,7 @@ data YesodWeb = YesodWeb
-- split these actions into two functions and place them in separate files.
mkYesodData "YesodWeb" $(parseRoutesFile "config/routes")

type Form x = Html -> MForm YesodWeb YesodWeb (FormResult x, Widget)
type Form x = Html -> MForm Handler (FormResult x, Widget)

-- Please see the documentation for the Yesod typeclass. There are a number
-- of settings which can be configured by overriding methods here.
Expand Down
2 changes: 1 addition & 1 deletion Handler/Blog.hs
Expand Up @@ -59,7 +59,7 @@ getBlogPostR y m s = do
pretty 12 = "December" :: Text
pretty _ = "Some new month"

getFeedR :: Handler RepAtomRss
getFeedR :: Handler TypedContent
getFeedR = do
posts <- getBlogList
f <-
Expand Down
4 changes: 2 additions & 2 deletions Import/Content.hs
Expand Up @@ -31,7 +31,7 @@ import Data.List (foldl')
import qualified Data.Text as T
import qualified Data.Text.Lazy as TL
import Yesod
( liftIO, GHandler, Yesod, RepHtml, notFound, defaultLayout
( liftIO, HandlerT, Yesod, RepHtml, notFound, defaultLayout
, setTitle, toWidget
, redirectWith
)
Expand Down Expand Up @@ -98,7 +98,7 @@ returnContent :: Yesod master
-> Text -- ^ default title
-> [ContentFormat]
-> ContentPath
-> GHandler sub master RepHtml
-> HandlerT master IO RepHtml
returnContent root defTitle cfs pieces = do
mc <- liftIO $ loadContent root cfs pieces
case mc of
Expand Down
13 changes: 6 additions & 7 deletions yesodweb.cabal
Expand Up @@ -85,13 +85,12 @@ executable yesodweb
PatternGuards

build-depends: base >= 4 && < 5
, yesod >= 1.1 && < 1.2
, yesod-core >= 1.1 && < 1.2
, yesod-auth >= 1.1 && < 1.2
, yesod-static >= 1.1 && < 1.2
, yesod-default >= 1.1 && < 1.2
, yesod-form >= 1.2 && < 1.3
, yesod-newsfeed >= 1.1 && < 1.2
, yesod >= 1.2 && < 1.3
, yesod-core >= 1.1 && < 1.3
, yesod-auth >= 1.1 && < 1.3
, yesod-static >= 1.1 && < 1.3
, yesod-form >= 1.2 && < 1.4
, yesod-newsfeed >= 1.1 && < 1.3
, bytestring >= 0.9 && < 0.11
, text >= 0.11 && < 0.12
, template-haskell
Expand Down

0 comments on commit bef548d

Please sign in to comment.