Skip to content

Instantly share code, notes, and snippets.

@mightybyte
Created May 9, 2011 13:52
Show Gist options
  • Save mightybyte/962551 to your computer and use it in GitHub Desktop.
Save mightybyte/962551 to your computer and use it in GitHub Desktop.
bindStrict
bindStrict :: Monad m => Splice m
bindStrict = do
node <- getParamNode
cs <- runChildren
maybe (return ()) (add cs)
(X.getAttribute bindAttr node)
return []
where
add cs nm = modifyTS $ bindSplice nm $ do
caller <- getParamNode
ctx <- getContext
rawApply cs ctx (X.childNodes caller)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment