breadcrumbWidget :: CCState -> Widget
breadcrumbWidget st = do
  path' <- handlerToWidget $ spine (ccsCurrentNode st)
  let nodes = map snd' path'
      snd' (a,b,c) = b
  titles <- handlerToWidget $ mapM lookupCCNodeTitle nodes

  case path' of
    [] -> [whamlet||]
    (root,_,_):_ ->
      [whamlet| <nav class="breadcrumb">
                   $forall (node,mtitle) <- zip nodes titles
                       &gt;
                       $maybe title <- mtitle
                          <a href="@{PrologExecuteTestContR node}">
                             #{show node}:#{title}
                       $nothing
                          <a href="@{PrologExecuteTestContR node}">
                             #{show node}
  |]
breadcrumbWidget :: CCState -> Widget
breadcrumbWidget st = do
  path' <- handlerToWidget $ spine (ccsCurrentNode st)
  let nodes = map snd' path'
      snd' (a,b,c) = b
  titles <- handlerToWidget $ mapM lookupCCNodeTitle nodes

  case path' of
    [] -> [whamlet||]
    (root,_,_):_ ->
      [whamlet| <nav class="breadcrumb">
                   $forall (node,mtitle) <- zip nodes titles
                       &gt;
                       $maybe title <- mtitle
                          <a href="@{PrologExecuteTestContR node}">
                             #{show node}:#{title}
                       $nothing
                          <a href="@{PrologExecuteTestContR node}">
                             #{show node}
  |]
breadcrumbWidget st = do
  path' <- handlerToWidget $ spine (ccsCurrentNode st)
  let nodes = map snd' path'
      snd' (a,b,c) = b
  titles <- handlerToWidget $ mapM lookupCCNodeTitle nodes

  case path' of
    [] -> [whamlet||]
    (root,_,_):_ ->
      [whamlet| <nav class="breadcrumb">
                   $forall (node,mtitle) <- zip nodes titles
                       &gt;
                       $maybe title <- mtitle
                          <a href="@{PrologExecuteTestContR node}">
                             #{show node}:#{title}
                       $nothing
                          <a href="@{PrologExecuteTestContR node}">
                             #{show node}
  |]