Skip to content

Commit 69b57d4

Browse files
committed
rename HP.Tag to HP.Token
1 parent aafdb21 commit 69b57d4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

scalpel-core/src/Text/HTML/Scalpel/Internal/Scrape.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ instance MonadReader s m => MonadReader s (ScraperT m) where
6767
local f (MkScraper op) = (fmap MkScraper . mapReaderT . local) f op
6868

6969
-- | A value of 'Scraper' @a@ defines a web scraper that is capable of consuming
70-
-- a list of 'HP.Tag's and optionally producing a value of type @a@.
70+
-- a list of 'HP.Token's and optionally producing a value of type @a@.
7171
type Scraper = ScraperT Identity
7272

7373
scrapeTagSpec :: ScraperT m a -> TagSpec -> m (Maybe a)
7474
scrapeTagSpec (MkScraper r) = runMaybeT . runReaderT r
7575

76-
-- | The 'scrapeT' function executes a 'ScraperT' on a list of 'HP.Tag's
76+
-- | The 'scrapeT' function executes a 'ScraperT' on a list of 'HP.Token's
7777
-- and produces an optional value. Since 'ScraperT' is a monad transformer, the
7878
-- result is monadic.
7979
scrapeT :: ScraperT m a -> [HP.Token] -> m (Maybe a)
8080
scrapeT s = scrapeTagSpec s . tagsToSpec . HP.canonicalizeTokens
8181

82-
-- | The 'scrape' function executes a 'Scraper' on a list of 'HP.Tag's and
82+
-- | The 'scrape' function executes a 'Scraper' on a list of 'HP.Token's and
8383
-- produces an optional value.
8484
scrape :: Scraper a -> [HP.Token] -> Maybe a
8585
scrape = fmap runIdentity . scrapeT

scalpel-core/src/Text/HTML/Scalpel/Internal/Select.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ data SelectContext = SelectContext {
7575
type TagSpec = (TagVector, TagForest, SelectContext)
7676

7777
-- | The 'select' function takes a 'Selectable' value and a list of
78-
-- 'HP.Tag's and returns a list of every subsequence of the given list of
78+
-- 'HP.Token's and returns a list of every subsequence of the given list of
7979
-- Tags that matches the given selector.
8080
select :: Selector -> TagSpec -> [TagSpec]
8181
select s tagSpec = newSpecs

0 commit comments

Comments
 (0)