digestive-functors-lucid 0.0.0.3 → 0.0.0.4
raw patch · 2 files changed
+14/−17 lines, 2 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
Files
digestive-functors-lucid.cabal view
@@ -1,8 +1,8 @@ Name: digestive-functors-lucid-Version: 0.0.0.3+Version: 0.0.0.4 Synopsis: Lucid frontend for the digestive-functors library Description: Ludic frontend for the digestive-functors library-Homepage: http://github.com/jaspervdj/digestive-functors+Homepage: https://github.com/athanclark/digestive-functors-lucid License: BSD3 License-file: LICENSE Author: Athan Clark <athan.clark@gmail.com>@@ -17,7 +17,7 @@ Exposed-modules: Text.Digestive.Lucid.Html5 Build-depends:- base >= 4 && < 5,+ base >= 4.8 && < 5, lucid >= 2.9, digestive-functors >= 0.6 && < 0.9, text >= 0.11 && < 1.3
src/Text/Digestive/Lucid/Html5.hs view
@@ -1,7 +1,9 @@ ---------------------------------------------------------------------------------{-# LANGUAGE GADTs #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE ExtendedDefaultRules #-}+{-# LANGUAGE+ OverloadedStrings+ , ExtendedDefaultRules+ #-}+ module Text.Digestive.Lucid.Html5 ( inputText , inputTextArea@@ -22,11 +24,8 @@ -------------------------------------------------------------------------------- import Control.Monad (forM_, when)-import Data.Maybe (fromMaybe)-import Data.Monoid (mappend, mempty) import Data.Text (Text, pack) import Lucid-import Lucid.Base -------------------------------------------------------------------------------- import Text.Digestive.View@@ -59,7 +58,7 @@ inputTextArea r c ref view = textarea_ ([ id_ ref' , name_ ref'- ] ++ (rows' r) ++ (cols' c)) $+ ] ++ rows' r ++ cols' c) $ toHtmlRaw $ fieldInputText ref view where ref' = absoluteRef ref view@@ -99,7 +98,7 @@ [ id_ ref' , name_ ref' ] $ forM_ choices $ \(i, c, sel) -> option_- ([value_ (value i)] ++ (ifSingleton sel $ selected_ "selected")) c+ (value_ (value i) : ifSingleton sel (selected_ "selected")) c where ref' = absoluteRef ref view value i = ref' `mappend` "." `mappend` i@@ -115,7 +114,7 @@ inputRadio brs ref view = forM_ choices $ \(i, c, sel) -> do let val = value i input_ $ [type_ "radio", value_ val, id_ val, name_ ref']- ++ (ifSingleton sel checked_)+ ++ ifSingleton sel checked_ label_ [for_ val] c when brs (br_ []) where@@ -130,7 +129,7 @@ [ type_ "checkbox" , id_ ref' , name_ ref'- ] ++ (ifSingleton selected checked_)+ ] ++ ifSingleton selected checked_ where ref' = absoluteRef ref view selected = fieldInputBool ref view@@ -142,11 +141,9 @@ [ type_ "file" , id_ ref' , name_ ref'- , value_ $ pack value ] where ref' = absoluteRef ref view- value = fromMaybe "" $ fieldInputFile ref view --------------------------------------------------------------------------------@@ -159,9 +156,9 @@ -------------------------------------------------------------------------------- label :: Monad m => Text -> View v -> HtmlT m () -> HtmlT m ()-label ref view value = label_+label ref view = label_ [ for_ ref'- ] $ value+ ] where ref' = absoluteRef ref view