Skip to content

Commit

Permalink
Add debugViewPaths
Browse files Browse the repository at this point in the history
  • Loading branch information
jaspervdj committed Dec 23, 2012
1 parent 8155062 commit 2f255ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions digestive-functors/src/Text/Digestive/View.hs
Expand Up @@ -31,6 +31,9 @@ module Text.Digestive.View
-- ** Errors
, errors
, childErrors

-- * Debugging
, debugViewPaths
) where


Expand Down Expand Up @@ -213,3 +216,8 @@ errors ref view = map snd $ filter ((== viewPath ref view) . fst) $
childErrors :: Text -> View v -> [v]
childErrors ref view = map snd $
filter ((viewPath ref view `isPrefixOf`) . fst) $ viewErrors view


--------------------------------------------------------------------------------
debugViewPaths :: View v -> [Path]
debugViewPaths (View _ _ form _ _ _) = debugFormPaths form

0 comments on commit 2f255ee

Please sign in to comment.