Skip to content

Instantly share code, notes, and snippets.

@mjhoy
Created November 11, 2015 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjhoy/25205f7416e1734892a1 to your computer and use it in GitHub Desktop.
Save mjhoy/25205f7416e1734892a1 to your computer and use it in GitHub Desktop.
if-bound
ifBound :: SnapletISplice b
ifBound = do
inp <- getParamNode
let t = X.getAttribute "tag" inp
case t of
Nothing -> return mempty
Just t' -> do
st <- getHS
let s = lookupSplice t' st
case s of
Nothing -> return mempty
Just _x -> runChildren
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment