Skip to content

Commit

Permalink
Add html-parse-length
Browse files Browse the repository at this point in the history
  • Loading branch information
bgamari committed Dec 9, 2023
1 parent 07dc142 commit fcbdfe4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions app/Main.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module Main where

import Control.Monad
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Text.HTML.Parser
import System.Environment

main :: IO ()
main = do
files <- getArgs
forM_ files $ \fname -> do
t <- T.readFile fname
print $ length $ parseTokens t

9 changes: 9 additions & 0 deletions html-parse.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,12 @@ test-suite spec
string-conversions,
text
default-language: Haskell2010

-- For performance characterisation during optimisation
executable html-parse-length
main-is: app/Main.hs
--buildable: False
build-depends: base,
html-parse,
text
default-language: Haskell2010

0 comments on commit fcbdfe4

Please sign in to comment.