-
Move Heist.SpliceAPI to map-syntax (https://github.com/mightybyte/map-syntax)
-
Add namespace support to heist
This means that users will be able to specify a namespace under which Heist will operate. If the user specifies a namespace of "h", then the splice '"foo" ## fooSplice' will match the tag <h:foo>. This alone doesn't give us much benefit. But on top of that we will add checking so Heist will throw an error if it encounters any <h:...> tag that does not have a splice bound for it. This will be a big help in finding bugs caused by not having a splice bound.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- image: http://i.imgur.com/567RLZ2.png | |
squiggle :: Path V2 Double | |
squiggle = rotate ((-1)/4 @@ turn) $ metafont $ | |
(4 ^& 1) .--. | |
(10 ^& 4) .--. | |
(15 ^& 5.2) .--. | |
(20 ^& 5) .--. | |
(25 ^& 3) .--. | |
(30 ^& 1.5) .--. |
I hereby claim:
- I am mightybyte on github.
- I am mightybyte (https://keybase.io/mightybyte) on keybase.
- I have a public key whose fingerprint is E354 4097 9E03 BC59 CC6F 444A 0272 6879 EA3E 9B28
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ dist/build/cabal/cabal gen-bounds | |
Resolving dependencies... | |
The following packages need bounds and here is a suggested starting point. | |
You can copy and paste this into the build-depends section in your .cabal | |
file and it should work (with the appropriate removal of commas). | |
Note that version bounds are a statement that you've successfully built and | |
tested your package and expect it to work with any of the specified package | |
versions (PROVIDED that those packages continue to conform with the PVP). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
-- | This module contains convenience functions for helping render | |
-- Heist templates from Snap. | |
module Snap.Heist where | |
------------------------------------------------------------------------------ | |
import Control.Applicative |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Splices.MongoDB where | |
import Prelude | |
import qualified Prelude as P | |
import Control.Monad | |
import Control.Monad.Trans | |
import Data.Maybe (fromJust) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inputHidden = flip inputRead "Error reading hidden" $ \id' inp -> | |
createFormHtml $ \cfg -> applyClasses' [htmlInputClasses] cfg $ | |
H.input ! A.type_ "hidden" | |
! A.name (H.stringValue $ show id') | |
! A.id (H.stringValue $ show id') | |
! A.value (H.stringValue $ fromMaybe "" inp) | |
massInputHtml s d = mapView (fmap addControls) $ massInput inputHidden s d | |
where | |
addControls form = do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This code uses the convenience code I added to digestive-functors-blaze. | |
-- http://bit.ly/hjGRXl | |
{-# LANGUAGE OverloadedStrings, TypeSynonymInstances, | |
NoMonomorphismRestriction #-} | |
import Control.Applicative | |
import Data.String | |
import Snap.Types | |
import Snap.Http.Server (httpServe, defaultConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeSynonymInstances #-} | |
module Text.Digestive.Blaze.Instances where | |
import Data.Maybe | |
import Text.Digestive.Blaze.Html5 (inputText, inputCheckBox, inputTextRead) | |
import Text.Digestive.Forms (FormInput) | |
import Text.Digestive.Types (Form) | |
class HasFormlet a where | |
formlet :: (Monad m, Functor m, FormInput i f) => e -> Maybe a -> Form m i e v a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/digestive-functors-blaze/src/Text/Digestive/Blaze/Html5.hs b/digestive-functors-blaze/src/Text/Digestive/Blaze/Html5.hs | |
index 88b5510..4d647af 100644 | |
--- a/digestive-functors-blaze/src/Text/Digestive/Blaze/Html5.hs | |
+++ b/digestive-functors-blaze/src/Text/Digestive/Blaze/Html5.hs | |
@@ -41,6 +41,7 @@ import Text.Digestive.Forms (FormInput (..)) | |
import qualified Text.Digestive.Forms as Forms | |
import qualified Text.Digestive.Common as Common | |
import Text.Digestive.Forms.Html | |
+import Text.Digestive.Result | |
import Text.Digestive.Transform |
OlderNewer