yesod 0.5.0.2 → 0.5.0.3
raw patch · 3 files changed
+13/−8 lines, 3 files
Files
- Yesod/Form/Fields.hs +7/−1
- scaffold.hs +5/−6
- yesod.cabal +1/−1
Yesod/Form/Fields.hs view
@@ -95,6 +95,8 @@ then (FormMissing, fromMaybe False orig) else case lookup name env of Nothing -> (FormSuccess False, False)+ Just "" -> (FormSuccess False, False)+ Just "false" -> (FormSuccess False, False) Just _ -> (FormSuccess True, True) let fi = FieldInfo { fiLabel = label@@ -214,7 +216,11 @@ boolInput :: String -> FormInput sub master Bool boolInput n = GForm $ do env <- askParams- let res = FormSuccess $ fromMaybe "" (lookup n env) /= ""+ let res = case lookup n env of+ Nothing -> FormSuccess False+ Just "" -> FormSuccess False+ Just "false" -> FormSuccess False+ Just _ -> FormSuccess True let xml = addBody [$hamlet| %input#$n$!type=checkbox!name=$n$ |]
scaffold.hs view
@@ -120,7 +120,7 @@ directory, bytestring, persistent,- persistent-sqlite,+ persistent-~lower~, template-haskell, hamlet ghc-options: -Wall@@ -313,7 +313,6 @@ writeFile' "Controller.hs" [$codegen| {-# LANGUAGE TemplateHaskell #-}-{-# LANGUAGE PackageImports #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module Controller ( with~sitearg~@@ -401,7 +400,7 @@ import qualified Text.Cassius as H import qualified Text.Julius as H import Language.Haskell.TH.Syntax-import Database.Persist.Sqlite+import Database.Persist.~upper~ import Yesod (MonadCatchIO) hamletFile :: FilePath -> Q Exp@@ -427,16 +426,16 @@ connStr :: String #ifdef PRODUCTION-connStr = "production.db3"+connStr = "~connstr2~" #else-connStr = "debug.db3"+connStr = "~connstr1~" #endif connectionCount :: Int connectionCount = 10 withConnectionPool :: MonadCatchIO m => (ConnectionPool -> m a) -> m a-withConnectionPool = withSqlitePool connStr connectionCount+withConnectionPool = with~upper~Pool connStr connectionCount runConnectionPool :: MonadCatchIO m => SqlPersist m a -> ConnectionPool -> m a runConnectionPool = runSqlPool
yesod.cabal view
@@ -1,5 +1,5 @@ name: yesod-version: 0.5.0.2+version: 0.5.0.3 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>