hamlet 0.10.0 → 0.10.1
raw patch · 3 files changed
+10/−11 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Text/Hamlet.hs +8/−9
- Text/Hamlet/Parse.hs +1/−1
- hamlet.cabal +1/−1
Text/Hamlet.hs view
@@ -37,16 +37,11 @@ import Language.Haskell.TH.Syntax import Language.Haskell.TH.Quote import Data.Char (isUpper, isDigit)-import Data.Monoid (Monoid (..)) import Data.Maybe (fromMaybe) import Data.Text (Text, pack) import qualified Data.Text.Lazy as TL-import qualified Data.Text.Lazy.IO as TIO-import qualified System.IO as SIO import Text.Blaze (Html, preEscapedText, toHtml) import qualified Data.Foldable as F-import Control.Applicative ((<$>))-import Control.Monad (ap) type Render url = url -> [(Text, Text)] -> Text type Translate msg = msg -> Html@@ -170,9 +165,11 @@ } h <- f env return $ LamE [VarP r] h- let em (Env (Just urender) Nothing) e =- urender $ \ur -> return (e `AppE` ur) return $ HamletRules i ur em+ where+ em (Env (Just urender) Nothing) e =+ urender $ \ur' -> return (e `AppE` ur')+ em _ _ = error "bad Env" ihamlet :: QuasiQuoter ihamlet = hamletWithSettings ihamletRules defaultHamletSettings@@ -189,9 +186,11 @@ } h <- f env return $ LamE [VarP m, VarP u] h- let em (Env (Just urender) (Just mrender)) e =- urender $ \ur -> mrender $ \mr -> return (e `AppE` mr `AppE` ur) return $ HamletRules i ur em+ where+ em (Env (Just urender) (Just mrender)) e =+ urender $ \ur' -> mrender $ \mr -> return (e `AppE` mr `AppE` ur')+ em _ _ = error "bad Env" hamletWithSettings :: Q HamletRules -> HamletSettings -> QuasiQuoter hamletWithSettings hr set =
Text/Hamlet/Parse.hs view
@@ -110,7 +110,7 @@ nonComments = (many1 $ noneOf "\r\n<") <|> (do _ <- char '<' (do- try $ string "!--"+ _ <- try $ string "!--" _ <- manyTill anyChar $ try $ string "-->" return "") <|> return "<") backslash = do
hamlet.cabal view
@@ -1,5 +1,5 @@ name: hamlet-version: 0.10.0+version: 0.10.1 license: BSD3 license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>