plzwrk 0.0.0.6 → 0.0.0.7
raw patch · 5 files changed
+15/−7 lines, 5 filesdep −random
Dependencies removed: random
Files
- ChangeLog.md +4/−0
- README.md +8/−2
- plzwrk.cabal +1/−2
- src/Web/Framework/Plzwrk/MockJSVal.hs +0/−1
- src/Web/Framework/Plzwrk/TH/HSX.hs +2/−2
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for plzwrk +## 0.0.0.7++- Removes spurious dependencies for faster build.+ ## 0.0.0.6 - Adds `#el` mixin for element lists.
README.md view
@@ -62,10 +62,16 @@ data MyState = MkMyState { _name :: Text, age :: Int, _tags :: [Text] } -- Function hydrating a DOM with elementse from the state -makeP = (\name age -> [hsx'|<p>#t{concat [name, " is the name and ", show age, " is my age."]}#</p>|] <$> _name <*> _age +makeP = (\name age -> + [hsx'|<p>#t{concat [name, " is the name and ", show age, " is my age."]}#</p>|]) + <$> _name + <*> _age -- The same function using functional tags instead of hsx -makeP = (\name age -> p'__ concat [name, " is the name and ", show age, " is my age."]) <$> _name <*> _age +makeP = (\name age -> + p'__ concat [name, " is the name and ", show age, " is my age."]) + <$> _name + <*> _age ``` HTML-creation functions can be nested, allowing for powerful abstractions.
plzwrk.cabal view
@@ -7,7 +7,7 @@ -- hash: 8099ceb0d406f862d89306de053aba4c75999a9e0d74ac6a502458d503e7dcc1 name: plzwrk -version: 0.0.0.6 +version: 0.0.0.7 category: Web synopsis: A front-end framework description: Please see the README on GitHub at <https://github.com/meeshkan/plzwrk#readme> @@ -57,7 +57,6 @@ , haskell-src-meta >= 0.8.5 && < 0.9 , mtl >= 2.2.2 && < 2.3 , parsec >= 3.1.14 && < 3.2 - , random >= 1.1 && < 1.2 , split >= 0.2.3 && < 0.3 , template-haskell >= 2.14.0 && < 2.16 , text >= 1.2.3 && < 1.3
src/Web/Framework/Plzwrk/MockJSVal.hs view
@@ -27,7 +27,6 @@ import Data.IORef import Data.List ( elemIndex ) import Prelude hiding ( lookup ) -import System.Random import Web.Framework.Plzwrk.Base import Web.Framework.Plzwrk.Browserful
src/Web/Framework/Plzwrk/TH/HSX.hs view
@@ -11,7 +11,7 @@ , (<$) ) import Control.Monad ( void )-import Control.Monad.Fail+import qualified Control.Monad.Fail as MF import Data.Char import Data.List ( foldl' ) import Text.Parsec@@ -114,7 +114,7 @@ parseHSX :: MonadFail m => (String, Int, Int) -> String -> m HSX parseHSX (file, line, col) s = case runParser p () "" s of- Left err -> fail $ show err+ Left err -> MF.fail $ show err Right e -> return e where p = do