packages feed

yesod-examples 0.8.0.3 → 0.9.0

raw patch · 13 files changed

+154/−256 lines, 13 filesdep +blaze-htmldep +yesod-coredep −yesod-formdep ~bytestringdep ~persistent-sqlitedep ~persistent-template

Dependencies added: blaze-html, yesod-core

Dependencies removed: yesod-form

Dependency ranges changed: bytestring, persistent-sqlite, persistent-template, text, transformers, yesod

Files

src/ajax.lhs view
@@ -4,15 +4,15 @@  > {-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, OverloadedStrings #-} > import Yesod-> import Yesod.Helpers.Static-> import Data.Monoid (mempty)+> import Yesod.Static+> import Data.Text (Text, unpack)  Like the blog example, we'll define some data first.  > data Page = Page->   { pageName :: String->   , pageSlug :: String->   , pageContent :: String+>   { pageName :: Text+>   , pageSlug :: Text+>   , pageContent :: Text >   }  > loadPages :: IO [Page]@@ -26,7 +26,6 @@ >   { ajaxPages :: [Page] >   , ajaxStatic :: Static >   }-> type Handler = GHandler Ajax Ajax  Next we'll generate a function for each file in our static folder. This way, we get a compiler warning when trying to using a file which does not exist. @@ -34,9 +33,9 @@  Now the routes; we'll have a homepage, a pattern for the pages, and use a static subsite for the Javascript and CSS files. -> mkYesod "Ajax" [$parseRoutes|+> mkYesod "Ajax" [parseRoutes| > /                  HomeR   GET-> /page/#String      PageR   GET+> /page/#Text        PageR   GET > /static            StaticR Static ajaxStatic > |] @@ -49,7 +48,7 @@ >   defaultLayout widget = do >   Ajax pages _ <- getYesod >   content <- widgetToPageContent widget->   hamletToRepHtml [$hamlet|+>   hamletToRepHtml [hamlet| > \<!DOCTYPE html> >  > <html>@@ -80,23 +79,23 @@  And now the cool part: a handler that returns either HTML or JSON data, depending on the request headers. -> getPageR :: String -> Handler RepHtmlJson+> getPageR :: Text -> Handler RepHtmlJson > getPageR slug = do >   Ajax pages _ <- getYesod >   case filter (\e -> pageSlug e == slug) pages of >       [] -> notFound >       page:_ -> defaultLayoutJson (do->           setTitle $ string $ pageName page+>           setTitle $ toHtml $ pageName page >           addHamlet $ html page >           ) (json page) >  where->   html page = [$hamlet|+>   html page = [hamlet| > <h1>#{pageName page} > <article>#{pageContent page} > |] >   json page = jsonMap->       [ ("name", jsonScalar $ pageName page)->       , ("content", jsonScalar $ pageContent page)+>       [ ("name", jsonScalar $ unpack $ pageName page)+>       , ("content", jsonScalar $ unpack $ pageContent page) >       ]  <p>We first try and find the appropriate Page, returning a 404 if it's not there. We then use the applyLayoutJson function, which is really the heart of this example. It allows you an easy way to create responses that will be either HTML or JSON, and which use the default layout in the HTML responses. It takes four arguments: 1) the title of the HTML page, 2) some value, 3) a function from that value to a Hamlet value, and 4) a function from that value to a Json value.</p>@@ -108,5 +107,10 @@ > main :: IO () > main = do >   pages <- loadPages->   let s = static "static/yesod/ajax"+>   s <- static "static/yesod/ajax" >   warpDebug 3000 $ Ajax pages s++And just to avoid some warnings...++> _ignored :: Widget+> _ignored = undefined ajaxPages
src/blog.lhs view
@@ -25,7 +25,6 @@ Each Yesod application needs to define the site argument. You can use this for storing anything that should be loaded before running your application. For example, you might store a database connection there. In our case, we'll store our list of entries.  > data Blog = Blog { blogEntries :: [Entry] }-> type Handler = GHandler Blog Blog  Now we use the first "magical" Yesod set of functions: mkYesod and parseRoutes. If you want to see *exactly* what they do, look at their Haddock docs. For now, we'll try to keep this tutorial simple: @@ -67,10 +66,9 @@  And now the template itself: -> entryTemplate :: TemplateArgs -> Hamlet (Route Blog)+> entryTemplate :: TemplateArgs -> HtmlUrl (Route Blog) > entryTemplate args = [hamlet| >   !!!->  >   <html> >       <head> >           <title>#{templateTitle args}@@ -115,3 +113,8 @@ > main = do >   entries <- loadEntries >   warpDebug 3000 $ Blog entries++And this is just to avoid some warnings...++> _ignored :: Widget+> _ignored = undefined blogEntries
src/chat.hs view
@@ -6,11 +6,9 @@ module Main where  import Yesod-import Yesod.Helpers.Static+import Yesod.Static  import Control.Concurrent.STM-import Control.Concurrent.STM.TChan-import Control.Concurrent.STM.TVar  import Control.Arrow ((***)) import Data.Text (Text, unpack)@@ -18,8 +16,6 @@ -- speaker and content data Message = Message Text Text -type Handler yesod = GHandler yesod yesod- -- all those TChans are dupes, so writing to any one writes to them all, but reading is separate data Chat = Chat   { chatClients    :: TVar [(Int, TChan Message)]@@ -29,7 +25,7 @@  staticFiles "static" -mkYesod "Chat" [$parseRoutes|+mkYesod "Chat" [parseRoutes| /          HomeR   GET /check     CheckR  GET /post      PostR   GET@@ -40,21 +36,20 @@   approot _ = ""   defaultLayout widget = do     content <- widgetToPageContent widget-    hamletToRepHtml [$hamlet|\-    \<!DOCTYPE html>+    hamletToRepHtml [hamlet|+!!! -    <html>-        <head>-            <title>#{pageTitle content}-            <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">-            <script src="@{StaticR chat_js}">-            \^{pageHead content}-        <body>-            \^{pageBody content}-    \+<html>+    <head>+        <title>#{pageTitle content}+        <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">+        <script src="@{StaticR chat_js}">+        ^{pageHead content}+    <body>+        ^{pageBody content} |] -getHomeR :: Handler Chat RepHtml+getHomeR :: Handler RepHtml getHomeR = do   Chat clients next _ <- getYesod   client <- liftIO . atomically $ do@@ -68,8 +63,8 @@     return c   defaultLayout $ do     setTitle "Chat Page"-    addWidget [$hamlet|\-\<!DOCTYPE html>+    toWidget [hamlet|+!!!  <h1>Chat Example <form>@@ -81,7 +76,7 @@ <script>var clientNumber = #{show client} |] -getCheckR :: Handler Chat RepJson+getCheckR :: Handler RepJson getCheckR = do   liftIO $ putStrLn "Check"   Chat clients _ _ <- getYesod@@ -99,9 +94,10 @@   let Message s c = first   jsonToRepJson $ zipJson ["sender", "content"] [s,c] +zipJson :: [Text] -> [Text] -> Json zipJson x y = jsonMap $ map (unpack *** jsonScalar . unpack) $ zip x y -getPostR :: Handler Chat RepJson+getPostR :: Handler RepJson getPostR = do   liftIO $ putStrLn "Post"   Chat clients _ _ <- getYesod@@ -122,4 +118,5 @@ main = do   clients <- newTVarIO []   next <- newTVarIO 0-  warpDebug 3000 $ Chat clients next $ static "static"+  s <- static "static"+  warpDebug 3000 $ Chat clients next s
src/file-echo.lhs view
@@ -1,30 +1,37 @@ > {-# LANGUAGE TypeFamilies, QuasiQuotes, TemplateHaskell, MultiParamTypeClasses, OverloadedStrings #-}  > import Yesod-> import Data.Monoid (mempty) > import qualified Data.ByteString.Char8 as S8 > import qualified Data.Text as T  > data Echo = Echo -> mkYesod "Echo" [$parseRoutes|+> mkYesod "Echo" [parseRoutes| > / Homepage GET POST > |]  > instance Yesod Echo where approot _ = "" +> getHomepage :: Handler RepHtml > getHomepage = defaultLayout $ do->   setTitle $ string "Upload a file"->   addHamlet [$hamlet|-> %form!method=post!action=.!enctype=multipart/form-data+>   setTitle "Upload a file"+>   addHamlet [hamlet|+> <form method=post action=. enctype=multipart/form-data> >   File name:->   %input!type=file!name=file->   %input!type=submit+>   <input type=file name=file+>   <input type=submit > |] +> postHomepage :: Handler [(ContentType, Content)] > postHomepage = do >   (_, files) <- runRequestBody >   fi <- maybe notFound return $ lookup "file" files >   return [(S8.pack $ T.unpack $ fileContentType fi, toContent $ fileContent fi)] +> main :: IO () > main = warpDebug 3000 Echo++To avoid warnings++> _ignored :: Widget+> _ignored = undefined
src/form.lhs view
@@ -2,30 +2,34 @@   > {-# LANGUAGE TypeFamilies, QuasiQuotes, OverloadedStrings, MultiParamTypeClasses, TemplateHaskell #-}-> import Yesod+> import Yesod hiding (Form) > import Control.Applicative > import Data.Text (Text)  > data FormExample = FormExample-> type Handler = GHandler FormExample FormExample-> mkYesod "FormExample" [$parseRoutes|+> mkYesod "FormExample" [parseRoutes| > / RootR GET > |]+> type Form a = Html -> MForm FormExample FormExample (FormResult a, Widget)+> type Formlet a = Maybe a -> Form a > instance Yesod FormExample where approot _ = ""+> instance RenderMessage FormExample FormMessage where+>    renderMessage _ _ = defaultFormMessage  Next, we'll declare a Person datatype with a name and age. After that, we'll create a formlet. A formlet is a declarative approach to forms. It takes a Maybe value and constructs either a blank form, a form based on the original value, or a form based on the values submitted by the user. It also attempts to construct a datatype, failing on validation errors.  > data Person = Person { name :: Text, age :: Int } >     deriving Show-> personFormlet p = fieldsToTable $ Person->     <$> stringField "Name" (fmap name p)->     <*> intField "Age" (fmap age p)+> personFormlet :: Formlet Person+> personFormlet p = renderTable $ Person+>     <$> areq textField "Name" (fmap name p)+>     <*> areq intField "Age" (fmap age p)  We use an applicative approach and stay mostly declarative. The "fmap name p" bit is just a way to get the name from within a value of type "Maybe Person".  > getRootR :: Handler RepHtml > getRootR = do->     (res, wform, enctype) <- runFormGet $ personFormlet Nothing+>     ((res, wform), enctype) <- runFormGet $ personFormlet Nothing  <p>We use runFormGet to bind to GET (query-string) parameters; we could also use runFormPost. The "Nothing" is the initial value of the form. You could also supply a "Just Person" value if you like. There is a three-tuple returned, containing the parsed value, the HTML form as a widget and the encoding type for the form.</p> @@ -37,14 +41,15 @@  <p>extractBody returns the HTML of a widget and "passes" all of the other declarations (the CSS, Javascript, etc) up to the parent widget. The rest of this is just standard Hamlet code and our main function.</p> ->         addHamlet [$hamlet|+>         addHamlet [hamlet| > <p>Last result: #{show res} > <form enctype="#{enctype}"> >     <table>->         \^{form}+>         ^{form} >         <tr> >             <td colspan="2"> >                 <input type="submit"> > |] > +> main :: IO () > main = warpDebug 3000 FormExample
− src/generalized-hamlet.lhs
@@ -1,52 +0,0 @@-This example shows how generalized hamlet templates allow the creation of-different types of values. The key component here is the HamletValue typeclass.-Yesod has instances for:--* Html--* Hamlet url (= (url -> [(String, String)] -> String) -> Html)--* GWidget s m ()--This example uses all three. You are of course free in your own code to make-your own instances.--> {-# LANGUAGE QuasiQuotes, TypeFamilies, MultiParamTypeClasses, OverloadedStrings, TemplateHaskell #-}-> import Yesod-> data NewHamlet = NewHamlet-> mkYesod "NewHamlet" [$parseRoutes|/ RootR GET|]-> instance Yesod NewHamlet where approot _ = ""-> type Widget = GWidget NewHamlet NewHamlet-> -> myHtml :: Html-> myHtml = [$hamlet|<p>Just don't use any URLs in here!|]->-> myInnerWidget :: Widget ()-> myInnerWidget = do->     addHamlet [$hamlet|->   <div #inner>Inner widget->   #{myHtml}-> |]->     addCassius [$cassius|->#inner->     color: red|]-> -> myPlainTemplate :: Hamlet NewHamletRoute-> myPlainTemplate = [$hamlet|-> <p->     <a href=@{RootR}>Link to home-> |]-> -> myWidget :: Widget ()-> myWidget = [$hamlet|->     <h1>Embed another widget->     \^{myInnerWidget}->     <h1>Embed a Hamlet->     \^{addHamlet myPlainTemplate}-> |]-> -> getRootR :: GHandler NewHamlet NewHamlet RepHtml-> getRootR = defaultLayout myWidget-> -> main :: IO ()-> main = warpDebug 3000 NewHamlet
src/i18n.lhs view
@@ -3,15 +3,14 @@ > {-# LANGUAGE TypeFamilies #-} > {-# LANGUAGE MultiParamTypeClasses #-} > {-# LANGUAGE OverloadedStrings #-}+> {-# LANGUAGE CPP #-}  > import Yesod-> import Data.Monoid (mempty) > import Data.Text (Text)  > data I18N = I18N-> type Handler = GHandler I18N I18N -> mkYesod "I18N" [$parseRoutes|+> mkYesod "I18N" [parseRoutes| > /            HomepageR GET > /set/#Text SetLangR  GET > |]@@ -25,12 +24,12 @@ >     let hello = chooseHello ls >     let choices = >             [ ("en", "English") :: (Text, Text)->             , ("es", "Spanish")->             , ("he", "Hebrew")+>             , ("es", "Español")+>             , ("he", "עִבְרִית") >             ] >     defaultLayout $ do >       setTitle "I18N Homepage"->       addHamlet [$hamlet|+>       addHamlet [hamlet| > <h1>#{hello} > <p>In other languages: > <ul>@@ -41,8 +40,8 @@  > chooseHello :: [Text] -> Text > chooseHello [] = "Hello"-> chooseHello ("he":_) = "Shalom"-> chooseHello ("es":_) = "Hola"+> chooseHello ("he":_) = "שלום"+> chooseHello ("es":_) = "¡Hola!" > chooseHello (_:rest) = chooseHello rest  > getSetLangR :: Text -> Handler ()@@ -52,3 +51,6 @@  > main :: IO () > main = warpDebug 3000 I18N++> _ignored :: Widget+> _ignored = undefined
src/pretty-yaml.lhs view
@@ -9,16 +9,15 @@ > import qualified Data.ByteString.Lazy as L  > data PY = PY-> type Handler = GHandler PY PY -> mkYesod "PY" [$parseRoutes|+> mkYesod "PY" [parseRoutes| > / Homepage GET POST > |]  > instance Yesod PY where approot _ = "" -> template :: Maybe (Hamlet url) -> Hamlet url-> template myaml = [$hamlet|+> template :: Maybe (HtmlUrl url) -> HtmlUrl url+> template myaml = [hamlet| > !!! >  > <html>@@ -46,14 +45,14 @@ >     so <- liftIO $ decode $ B.concat $ L.toChunks $ fileContent fi >     hamletToRepHtml $ template $ Just $ objToHamlet so -> objToHamlet :: StringObject -> Hamlet url-> objToHamlet (Scalar s) = [$hamlet|#{s}|]-> objToHamlet (Sequence list) = [$hamlet|+> objToHamlet :: StringObject -> HtmlUrl url+> objToHamlet (Scalar s) = [hamlet|#{s}|]+> objToHamlet (Sequence list) = [hamlet| > <ul >     $forall o <- list >         <li>^{objToHamlet o} > |]-> objToHamlet (Mapping pairs) = [$hamlet|+> objToHamlet (Mapping pairs) = [hamlet| > <dl >     $forall pair <- pairs >         <dt>#{fst pair}@@ -62,3 +61,6 @@  > main :: IO () > main = warpDebug 3000 PY++> _ignored :: Widget+> _ignored = undefined
src/session.lhs view
@@ -3,14 +3,21 @@ > import Control.Applicative ((<$>), (<*>)) >  > data Session = Session-> type Handler = GHandler Session Session-> mkYesod "Session" [$parseRoutes|+> mkYesod "Session" [parseRoutes| > / Root GET POST > |]+> +> instance Yesod Session where+>     approot _ = ""+>     clientSessionDuration _ = 1+>+> instance RenderMessage Session FormMessage where+>    renderMessage _ _ = defaultFormMessage+> > getRoot :: Handler RepHtml > getRoot = do >     sess <- getSession->     hamletToRepHtml [$hamlet|+>     hamletToRepHtml [hamlet| > <form method=post >     <input type=text name=key >     <input type=text name=val@@ -20,12 +27,13 @@ >  > postRoot :: Handler () > postRoot = do->     (key, val) <- runFormPost' $ (,) <$> stringInput "key" <*> stringInput "val"->     setSession key val->     liftIO $ print (key, val)->     redirect RedirectTemporary Root-> -> instance Yesod Session where->     approot _ = ""->     clientSessionDuration _ = 1+>       (key, val) <- runInputPost $ (,) <$> ireq textField "key" <*> ireq textField "val"+>       setSession key val+>       liftIO $ print (key, val)+>       redirect RedirectTemporary Root+>+> main :: IO () > main = warpDebug 3000 Session++> _ignored :: Widget+> _ignored = undefined
− src/widgets.lhs
@@ -1,89 +0,0 @@-> {-# LANGUAGE TypeFamilies, QuasiQuotes, OverloadedStrings, MultiParamTypeClasses, TemplateHaskell #-}-> import Yesod-> import Yesod.Helpers.Static-> import Yesod.Form.Jquery-> import Yesod.Form.Nic-> import Control.Applicative-> import Data.Text (unpack)-> -> data HW = HW { hwStatic :: Static }-> type Handler = GHandler HW HW-> mkYesod "HW" [$parseRoutes|-> / RootR GET-> /form FormR-> /static StaticR Static hwStatic-> /autocomplete AutoCompleteR GET-> |]-> instance Yesod HW where approot _ = ""-> instance YesodJquery HW-> instance YesodNic HW-> wrapper h = [$hamlet|-> <#wrapper>^{h}-> <footer>Brought to you by Yesod Widgets&trade;-> |]-> getRootR = defaultLayout $ wrapper $ do->     i <- lift newIdent->     setTitle $ string "Hello Widgets"->     addCassius [$cassius|->   #$i$->       color: red|]->     addStylesheet $ StaticR $ StaticRoute ["style.css"] []->     addStylesheetRemote "http://localhost:3000/static/style2.css"->     addScriptRemote "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"->     addScript $ StaticR $ StaticRoute ["script.js"] []->     addHamlet [$hamlet|-> <h1 ##{i}>Welcome to my first widget!!!-> <p->     <a href=@RootR@>Recursive link.-> <p->     <a href=@FormR@>Check out the form.-> <p .noscript>Your script did not load. :(-> |]->     addHtmlHead [$hamlet|<meta keywords=haskell|]-> -> handleFormR = do->     (res, form, enctype, nonce) <- runFormPost $ fieldsToTable $ (,,,,,,,,)->         <$> stringField "My Field" Nothing->         <*> stringField "Another field" (Just "some default text")->         <*> intField "A number field" (Just 5)->         <*> jqueryDayField def "A day field" Nothing->         <*> timeField "A time field" Nothing->         <*> boolField "A checkbox" (Just False)->         <*> jqueryAutocompleteField AutoCompleteR "Autocomplete" Nothing->         <*> nicHtmlField "HTML"->                 (Just $ string "You can put <rich text> here")->         <*> maybeEmailField "An e-mail addres" Nothing->     let mhtml = case res of->                     FormSuccess (_, _, _, _, _, _, _, x, _) -> Just x->                     _ -> Nothing->     defaultLayout $ do->         addCassius [$cassius|-> .tooltip->     color: #666->     font-style: italic-> textarea.html->     width: 300px->     height: 150px|]->         addWidget [$hamlet|-> <form method="post" enctype="#{enctype}">->     <table>->         \^{form}->         <tr>->             <td colspan="2">->                 \#{nonce}->                 <input type="submit">->     $maybe html <- mhtml->         \#{html}-> |]->         setTitle $ string "Form"-> -> main = warpDebug 3000 $ HW $ static "static"-> -> getAutoCompleteR :: Handler RepJson-> getAutoCompleteR = do->     term <- runFormGet' $ stringInput "term"->     jsonToRepJson $ jsonList->         [ jsonScalar $ unpack term ++ "foo"->         , jsonScalar $ unpack term ++ "bar"->         , jsonScalar $ unpack term ++ "baz"->         ]
synopsis/hamlet.lhs view
@@ -2,9 +2,11 @@ {-# LANGUAGE QuasiQuotes, OverloadedStrings #-}  import Text.Hamlet-import qualified Data.ByteString.Lazy as L import Data.Text (Text, cons)+import qualified Data.Text.Lazy.IO as L+import Text.Blaze.Renderer.Text (renderHtml) + data Person = Person     { name :: String     , age :: String@@ -16,23 +18,23 @@  renderUrls :: PersonUrls -> [(Text, Text)] -> Text renderUrls Homepage _ = "/"-renderUrls (PersonPage name) _ = '/' `cons` name+renderUrls (PersonPage name') _ = '/' `cons` name' -footer :: Hamlet url-footer = [$hamlet|\+footer :: HtmlUrl url+footer = [hamlet| <div id="footer">Thank you, come again |] -template :: Person -> Hamlet PersonUrls-template person = [$hamlet|+template :: Person -> HtmlUrl PersonUrls+template person = [hamlet| !!!  <html>     <head>         <title>Hamlet Demo     <body>-        <h1>Information on #{string (name person)}-        <p>#{string (name person)} is #{string (age person)} years old.+        <h1>Information on #{name person}+        <p>#{name person} is #{age person} years old.         <h2>             $if isMarried person                 \Married@@ -40,7 +42,7 @@                 \Not married         <ul>             $forall child <- children person-                <li>#{string child}+                <li>#{child}         <p>             <a href="@{page person}">See the page.         \^{footer}@@ -55,7 +57,7 @@             , isMarried = True             , children = ["Adam", "Ben", "Chris"]             }-    L.putStrLn $ renderHamlet renderUrls $ template person+    L.putStrLn $ renderHtml $ (template person) renderUrls  \end{code}  Outputs (new lines added for readability):
synopsis/persistent.lhs view
@@ -1,12 +1,12 @@ This example uses the sqlite backend for Persistent, since it can run in-memory and has no external dependencies. -> {-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, QuasiQuotes, TemplateHaskell, OverloadedStrings #-}+> {-# LANGUAGE GADTs, TypeFamilies, GeneralizedNewtypeDeriving, QuasiQuotes, TemplateHaskell, OverloadedStrings #-} > > import Database.Persist.Sqlite > import Database.Persist.TH > import Control.Monad.IO.Class (liftIO) >-> mkPersist [$persist|Person+> mkPersist sqlSettings [persist|Person >     name String Eq >     age Int Update > |]@@ -21,13 +21,13 @@ >   liftIO $ print key >   p1 <- get key >   liftIO $ print p1->   update key [PersonAge 26]+>   update key [PersonAge =. 26] >   p2 <- get key >   liftIO $ print p2->   p3 <- selectList [PersonNameEq "Michael"] [] 0 0+>   p3 <- selectList [PersonName ==. "Michael"] [] >   liftIO $ print p3 >   delete key->   p4 <- selectList [PersonNameEq "Michael"] [] 0 0+>   p4 <- selectList [PersonName ==. "Michael"] [] >   liftIO $ print p4  The output of the above is:@@ -37,3 +37,6 @@ Just (Person {personName = "Michael", personAge = 26}) [(PersonId 1,Person {personName = "Michael", personAge = 26})] []</pre></code>++> _ignored :: PersonId+> _ignored = undefined personName personAge
yesod-examples.cabal view
@@ -1,5 +1,5 @@ Name:                yesod-examples-Version:             0.8.0.3+Version:             0.9.0 Synopsis:            Example programs using the Yesod Web Framework. Description:         These are the same examples and tutorials found on the documentation site. Homepage:            http://www.yesodweb.com/@@ -15,50 +15,56 @@                      static/yesod/ajax/style.css,                      static/chat.js +flag ghc7+ Executable yesod-blog   Main-is:             src/blog.lhs   Build-depends:       base >= 4 && < 5,-                       yesod >= 0.8 && < 0.9+                       yesod >= 0.9  Executable yesod-ajax   Main-is:             src/ajax.lhs-  Build-depends:       yesod-static+  Build-depends:       yesod-static,+                       blaze-html  >= 0.4.1.3  && < 0.5,+                       yesod >= 0.9  Executable yesod-file-echo   Main-is:             src/file-echo.lhs-  Build-depends:       text+  Build-depends:       text              >= 0.9   && < 0.12,+                       yesod >= 0.9  Executable yesod-pretty-yaml   Main-is:             src/pretty-yaml.lhs   Build-depends:       data-object-yaml >= 0.3.0 && < 0.4,                        data-object >= 0.3.1 && < 0.4,-                       bytestring >= 0.9 && < 0.10+                       bytestring                >= 0.9.1.4  && < 0.10,+                       yesod >= 0.9  Executable yesod-i18n   Main-is:             src/i18n.lhs+  if flag(ghc7)+      cpp-options:     -DGHC7  Executable yesod-session   Main-is:             src/session.lhs -Executable yesod-widgets-  Main-is:             src/widgets.lhs-  Build-depends:       yesod-form--Executable yesod-generalized-hamlet-  Main-is:             src/generalized-hamlet.lhs+-- Executable yesod-widgets+--  Main-is:             src/widgets.lhs+--  Build-depends:       yesod-form  Executable yesod-form   Main-is:             src/form.lhs  Executable yesod-persistent-synopsis   Main-is:             synopsis/persistent.lhs-  Build-depends:       transformers >= 0.2.1 && < 0.3,-                       persistent-sqlite,-                       persistent-template+  Build-depends:       transformers >= 0.2.2 && < 0.3,+                       persistent-sqlite   >= 0.6 && < 0.7,+                       persistent-template >= 0.6 && < 0.7+  extra-libraries:     sqlite3  Executable yesod-hamlet-synopsis   Main-is:             synopsis/hamlet.lhs-  Build-depends:       hamlet+  Build-depends:       hamlet, yesod-core  Executable yesod-chat   Main-is:             src/chat.hs@@ -66,4 +72,4 @@  source-repository head   type:     git-  location: git://github.com/snoyberg/yesoddocs.git+  location: git://github.com/snoyberg/yesod-examples.git